2008-11-05 Michael Biebl <mbiebl@gmail.com>

* initscripts/Debian/NetworkManager
		- Update to what Debian is actually using



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4264 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Michael Biebl 2008-11-05 16:08:52 +00:00 committed by Dan Williams
parent 98028869cb
commit bfccc6273b
2 changed files with 48 additions and 25 deletions

View file

@ -1,3 +1,8 @@
2008-11-05 Michael Biebl <mbiebl@gmail.com>
* initscripts/Debian/NetworkManager
- Update to what Debian is actually using
2008-11-05 Tambet Ingo <tambet@gmail.com> 2008-11-05 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-setting-8021x.c: Verify PEAP settings as well. * libnm-util/nm-setting-8021x.c: Verify PEAP settings as well.

View file

@ -1,69 +1,87 @@
#! /bin/sh #! /bin/sh
# ### BEGIN INIT INFO
# NetworkManager NetworkManager daemon # Provides: NetworkManager
# Daemon for automatically switching network # Required-Start: $remote_fs dbus hal
# connections to the best available connection. # Required-Stop: $remote_fs dbus hal
# This file should be placed in /etc/init.d. # Should-Start: $syslog
# # Should-Stop: $syslog
# Authors: <j@bootlab.org> # Default-Start: 2 3 4 5
# Mark Roach <mrroach@okmaybe.com> # Default-Stop: 0 1 6
# Thom May <thom@debian.org> # Short-Description: network connection manager
# # Description: Daemon for automatically switching network
# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl # connections to the best available connection.
# ### END INIT INFO
set -e set -e
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 daemon" DESC="network connection manager"
NAME="NetworkManager" NAME="NetworkManager"
DAEMON=/usr/sbin/$NAME DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME PIDDIR=/var/run/NetworkManager
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.
test -x $DAEMON || exit 0 test -x $DAEMON || exit 0
. /lib/lsb/init-functions
test -f /etc/default/NetworkManager && . /etc/default/NetworkManager
# #
# Function that starts the daemon/service. # Function that starts the daemon/service.
# #
d_start() { d_start() {
if [ ! -d $PIDDIR ]; then
mkdir -p $PIDDIR
chown $USER:$USER $PIDDIR
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE \ start-stop-daemon --start --quiet --pidfile $PIDFILE \
--user $USER --exec $DAEMON -- $DAEMON_OPTS --oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE
} }
# #
# Function that stops the daemon/service. # Function that stops the daemon/service.
# #
d_stop() { d_stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE \ start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \
--oknodo --user $USER --exec $DAEMON --oknodo --user $USER --exec $DAEMON
} }
case "$1" in case "$1" in
start) start)
echo -n "Starting $DESC: $NAME" log_daemon_msg "Starting $DESC" "$NAME"
d_start d_start
echo "." log_end_msg $?
;; ;;
stop) stop)
echo -n "Stopping $DESC: $NAME" log_daemon_msg "Stopping $DESC" "$NAME"
d_stop d_stop
echo "." log_end_msg $?
;; ;;
restart|force-reload) restart|force-reload)
echo -n "Restarting $DESC: $NAME" log_daemon_msg "Restarting $DESC" "$NAME"
d_stop d_stop
sleep 1
d_start d_start
echo "." log_end_msg $?
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;; ;;
*) *)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
exit 1 exit 1
;; ;;
esac esac
exit 0 exit 0