summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2009-03-05 18:05:34 -0500
committerWill Woods <wwoods@redhat.com>2009-03-05 18:05:34 -0500
commit87db0232f329e722f9f8cd97ec50285b14069f04 (patch)
tree787a4d4f72f2d5e8a376a64fe8e894287de5d83c /client
parentc9e5a68ad5f6febaed4093817fcce2b9a8d80a5b (diff)
downloaddebuginfofs-87db0232f329e722f9f8cd97ec50285b14069f04.tar.gz
debuginfofs-87db0232f329e722f9f8cd97ec50285b14069f04.tar.xz
debuginfofs-87db0232f329e722f9f8cd97ec50285b14069f04.zip
Rearrange files a bit, and add Requires(post/preun) for semanage
Diffstat (limited to 'client')
-rw-r--r--client/davfs2-debuginfofs.conf22
-rwxr-xr-xclient/debuginfofs.init93
-rw-r--r--client/debuginfofs.sysconfig6
3 files changed, 121 insertions, 0 deletions
diff --git a/client/davfs2-debuginfofs.conf b/client/davfs2-debuginfofs.conf
new file mode 100644
index 0000000..94fe118
--- /dev/null
+++ b/client/davfs2-debuginfofs.conf
@@ -0,0 +1,22 @@
+# davfs2 configuration file for use with debuginfofs
+# -------------------------------------
+# Please read the davfs2.conf (5) man page for a description of the
+# configuration options and syntax rules.
+
+ask_auth 0
+cache_size 100 # MiByte
+table_size 1024
+dir_refresh 600 # seconds
+file_refresh 3600 # seconds
+buf_size 256 # KiByte
+
+# connect_timeout 10 # seconds
+# read_timeout 30 # seconds
+# retry 30 # seconds
+# max_retry 300 # seconds
+# add_header
+#
+# Debugging Options
+# -----------------
+# debug # possible values: config, kernel, cache, http, xml,
+ # httpauth, locks, ssl, httpbody, secrets, most
diff --git a/client/debuginfofs.init b/client/debuginfofs.init
new file mode 100755
index 0000000..e8d63f2
--- /dev/null
+++ b/client/debuginfofs.init
@@ -0,0 +1,93 @@
+#!/bin/bash
+#
+### BEGIN INIT INFO
+# Provides: debuginfofs
+# Required-Start: $local_fs $network $named $remote_fs $syslog
+# Required-Stop: $local_fs $network $named $remote_fs $syslog
+# Short-Description: Remote debuginfo filesystem
+# Description: Mount a remote debuginfo filesystem for use with debugging tools
+### END INIT INFO
+
+# debuginfofs Mounts/unmounts the debuginfo filesystem
+#
+# chkconfig: - 85 15
+# description: debuginfofs mounts a WebDAV share of debuginfo files at the \
+# appropriate place(s) in the filesystem for use by gdb and other \
+# debugging tools.
+# config: /etc/sysconfig/debuginfofs
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Source our configuration
+. /etc/sysconfig/debuginfofs
+
+RETVAL=0
+prog="debuginfofs"
+
+start() {
+ # Mount filesystems.
+
+ # Check that networking is up.
+ [ ${NETWORKING} = "no" ] && exit 1
+
+ # Sanity check binary and configuration
+ [ -x /usr/sbin/mount.davfs ] || exit 1
+ [ -n "$BUILDID_URL" ] || exit 1
+ [ -n "$BUILDID_MOUNTPOINT" ] || exit 1
+ [ -d "$BUILDID_MOUNTPOINT" ] || mkdir -p "$BUILDID_MOUNTPOINT"
+
+ echo -n $"Starting debuginfofs: "
+ mount -t davfs "$BUILDID_URL" "$BUILDID_MOUNTPOINT" \
+ -o ro,conf=/etc/davfs2/debuginfofs.conf $MOUNT_ARGS
+ RETVAL=$?
+
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/debuginfofs
+ [ $RETVAL -eq 0 ] && success $"$prog startup" || failure $"$prog startup"
+ echo
+ return $RETVAL
+}
+
+stop() {
+ echo -n $"Stopping debuginfofs: "
+ umount "$BUILDID_MOUNTPOINT"
+ RETVAL=$?
+ rm -f /var/lock/subsys/debuginfofs
+ [ $RETVAL -eq 0 ] && success $"$prog shutdown" || failure $"$prog shutdown"
+ echo
+ return $RETVAL
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload|force-reload)
+ stop
+ start
+ RETVAL=$?
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/debuginfofs ]; then
+ stop
+ start
+ RETVAL=$?
+ fi
+ ;;
+ status)
+ status $prog
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|condrestart|status}"
+ exit 1
+esac
+
+exit $RETVAL
diff --git a/client/debuginfofs.sysconfig b/client/debuginfofs.sysconfig
new file mode 100644
index 0000000..0ff5f48
--- /dev/null
+++ b/client/debuginfofs.sysconfig
@@ -0,0 +1,6 @@
+# You will need to set this to the correct hostname
+DEBUGINFOFS_SERVER="test1085.test.redhat.com"
+# You shouldn't need to edit these under normal circumstances
+BUILDID_URL="http://$DEBUGINFOFS_SERVER:3309/build-id/"
+BUILDID_MOUNTPOINT="/usr/lib/debug/.build-id"
+MOUNT_ARGS=""