mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 18:24:49 +00:00
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:
parent
bfccc6273b
commit
3a2eb0bbcb
|
@ -500,6 +500,7 @@ initscript/RedHat/NetworkManager
|
|||
initscript/Gentoo/Makefile
|
||||
initscript/Gentoo/NetworkManager
|
||||
initscript/Debian/Makefile
|
||||
initscript/Debian/NetworkManager
|
||||
initscript/Slackware/Makefile
|
||||
initscript/Slackware/rc.networkmanager
|
||||
initscript/SUSE/Makefile
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
EXTRA_DIST = NetworkManager
|
||||
EXTRA_DIST = NetworkManager.in
|
||||
DISTCLEANFILES = NetworkManager
|
||||
|
||||
initddir = $(sysconfdir)/init.d
|
||||
initd_SCRIPTS = NetworkManager
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue