summaryrefslogtreecommitdiff
path: root/initscript
diff options
context:
space:
mode:
authorMichael Biebl <mbiebl@gmail.com>2008-11-05 16:42:54 +0000
committerMichael Biebl <mbiebl@gmail.com>2008-11-05 16:42:54 +0000
commit3a2eb0bbcb78d02effde3d330f7e814cc803ab6b (patch)
tree127719d9df8f844ff1aa0e940fbaf1406e538675 /initscript
parentbfccc6273bc984cdcebf56b08495473f32a1dd34 (diff)
downloadNetworkManager-3a2eb0bbcb78d02effde3d330f7e814cc803ab6b.tar.gz
Do not hard code the path to the NetworkManager binary
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4265 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'initscript')
-rw-r--r--initscript/Debian/Makefile.am3
-rwxr-xr-xinitscript/Debian/NetworkManager.in (renamed from initscript/Debian/NetworkManager)15
2 files changed, 11 insertions, 7 deletions
diff --git a/initscript/Debian/Makefile.am b/initscript/Debian/Makefile.am
index 85954b839d..890ed77b12 100644
--- a/initscript/Debian/Makefile.am
+++ b/initscript/Debian/Makefile.am
@@ -1,4 +1,5 @@
-EXTRA_DIST = NetworkManager
+EXTRA_DIST = NetworkManager.in
+DISTCLEANFILES = NetworkManager
initddir = $(sysconfdir)/init.d
initd_SCRIPTS = NetworkManager
diff --git a/initscript/Debian/NetworkManager b/initscript/Debian/NetworkManager.in
index 095d75c515..35e323473e 100755
--- a/initscript/Debian/NetworkManager
+++ b/initscript/Debian/NetworkManager.in
@@ -8,22 +8,25 @@
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: network connection manager
-# Description: Daemon for automatically switching network
+# Description: Daemon for automatically switching network
# connections to the best available connection.
### END INIT INFO
set -e
+prefix=@prefix@
+exec_prefix=@prefix@
+sbindir=@sbindir@
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="network connection manager"
NAME="NetworkManager"
-DAEMON=/usr/sbin/$NAME
+DAEMON=${sbindir}/$NAME
PIDDIR=/var/run/NetworkManager
PIDFILE=$PIDDIR/$NAME.pid
-SCRIPTNAME=/etc/init.d/network-manager
USER=root
# Gracefully exit if the package has been removed.
@@ -44,7 +47,7 @@ d_start() {
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE
-
+
}
#
@@ -53,7 +56,7 @@ d_start() {
d_stop() {
start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \
--oknodo --user $USER --exec $DAEMON
-
+
}
@@ -78,7 +81,7 @@ case "$1" in
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
+ echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac