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
This commit is contained in:
@@ -500,6 +500,7 @@ initscript/RedHat/NetworkManager
|
|||||||
initscript/Gentoo/Makefile
|
initscript/Gentoo/Makefile
|
||||||
initscript/Gentoo/NetworkManager
|
initscript/Gentoo/NetworkManager
|
||||||
initscript/Debian/Makefile
|
initscript/Debian/Makefile
|
||||||
|
initscript/Debian/NetworkManager
|
||||||
initscript/Slackware/Makefile
|
initscript/Slackware/Makefile
|
||||||
initscript/Slackware/rc.networkmanager
|
initscript/Slackware/rc.networkmanager
|
||||||
initscript/SUSE/Makefile
|
initscript/SUSE/Makefile
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
EXTRA_DIST = NetworkManager
|
EXTRA_DIST = NetworkManager.in
|
||||||
|
DISTCLEANFILES = NetworkManager
|
||||||
|
|
||||||
initddir = $(sysconfdir)/init.d
|
initddir = $(sysconfdir)/init.d
|
||||||
initd_SCRIPTS = NetworkManager
|
initd_SCRIPTS = NetworkManager
|
||||||
|
@@ -8,22 +8,25 @@
|
|||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: network connection manager
|
# Short-Description: network connection manager
|
||||||
# Description: Daemon for automatically switching network
|
# Description: Daemon for automatically switching network
|
||||||
# connections to the best available connection.
|
# connections to the best available connection.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@prefix@
|
||||||
|
sbindir=@sbindir@
|
||||||
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
DESC="network connection manager"
|
DESC="network connection manager"
|
||||||
NAME="NetworkManager"
|
NAME="NetworkManager"
|
||||||
|
|
||||||
DAEMON=/usr/sbin/$NAME
|
DAEMON=${sbindir}/$NAME
|
||||||
|
|
||||||
PIDDIR=/var/run/NetworkManager
|
PIDDIR=/var/run/NetworkManager
|
||||||
PIDFILE=$PIDDIR/$NAME.pid
|
PIDFILE=$PIDDIR/$NAME.pid
|
||||||
|
|
||||||
SCRIPTNAME=/etc/init.d/network-manager
|
|
||||||
USER=root
|
USER=root
|
||||||
|
|
||||||
# Gracefully exit if the package has been removed.
|
# Gracefully exit if the package has been removed.
|
||||||
@@ -44,7 +47,7 @@ d_start() {
|
|||||||
|
|
||||||
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||||||
--oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE
|
--oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -53,7 +56,7 @@ d_start() {
|
|||||||
d_stop() {
|
d_stop() {
|
||||||
start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \
|
start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \
|
||||||
--oknodo --user $USER --exec $DAEMON
|
--oknodo --user $USER --exec $DAEMON
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -78,7 +81,7 @@ case "$1" in
|
|||||||
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
|
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
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
Reference in New Issue
Block a user