NetworkManager r4264 - in trunk: . initscript/Debian
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r4264 - in trunk: . initscript/Debian
- Date: Wed, 5 Nov 2008 16:08:53 +0000 (UTC)
Author: dcbw
Date: Wed Nov 5 16:08:52 2008
New Revision: 4264
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4264&view=rev
Log:
2008-11-05 Michael Biebl <mbiebl gmail com>
* initscripts/Debian/NetworkManager
- Update to what Debian is actually using
Modified:
trunk/ChangeLog
trunk/initscript/Debian/NetworkManager
Modified: trunk/initscript/Debian/NetworkManager
==============================================================================
--- trunk/initscript/Debian/NetworkManager (original)
+++ trunk/initscript/Debian/NetworkManager Wed Nov 5 16:08:52 2008
@@ -1,69 +1,87 @@
#! /bin/sh
-#
-# NetworkManager NetworkManager daemon
-# Daemon for automatically switching network
-# connections to the best available connection.
-# This file should be placed in /etc/init.d.
-#
-# Authors: <j bootlab org>
-# Mark Roach <mrroach okmaybe com>
-# Thom May <thom debian org>
-#
-# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels cistron nl
-#
+### BEGIN INIT INFO
+# Provides: NetworkManager
+# Required-Start: $remote_fs dbus hal
+# Required-Stop: $remote_fs dbus hal
+# Should-Start: $syslog
+# Should-Stop: $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: network connection manager
+# Description: Daemon for automatically switching network
+# connections to the best available connection.
+### END INIT INFO
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="Network connection manager daemon"
+DESC="network connection manager"
NAME="NetworkManager"
+
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
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
+. /lib/lsb/init-functions
+
+test -f /etc/default/NetworkManager && . /etc/default/NetworkManager
+
#
# Function that starts the daemon/service.
#
d_start() {
+ if [ ! -d $PIDDIR ]; then
+ mkdir -p $PIDDIR
+ chown $USER:$USER $PIDDIR
+ fi
+
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.
#
d_stop() {
- start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \
--oknodo --user $USER --exec $DAEMON
+
}
case "$1" in
start)
- echo -n "Starting $DESC: $NAME"
+ log_daemon_msg "Starting $DESC" "$NAME"
d_start
- echo "."
+ log_end_msg $?
;;
stop)
- echo -n "Stopping $DESC: $NAME"
+ log_daemon_msg "Stopping $DESC" "$NAME"
d_stop
- echo "."
+ log_end_msg $?
;;
restart|force-reload)
- echo -n "Restarting $DESC: $NAME"
+ log_daemon_msg "Restarting $DESC" "$NAME"
d_stop
- sleep 1
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
;;
esac
exit 0
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]