[Pkg-utopia-commits] r1105 - packages/unstable/networkmanager/debian
Michael Biebl
biebl at costa.debian.org
Tue Oct 24 21:37:25 UTC 2006
Author: biebl
Date: 2006-10-24 21:37:23 +0000 (Tue, 24 Oct 2006)
New Revision: 1105
Modified:
packages/unstable/networkmanager/debian/network-manager-dispatcher.dbus-event
packages/unstable/networkmanager/debian/network-manager.dbus-event
Log:
Improve the start scripts a bit.
Modified: packages/unstable/networkmanager/debian/network-manager-dispatcher.dbus-event
===================================================================
--- packages/unstable/networkmanager/debian/network-manager-dispatcher.dbus-event 2006-10-24 21:23:24 UTC (rev 1104)
+++ packages/unstable/networkmanager/debian/network-manager-dispatcher.dbus-event 2006-10-24 21:37:23 UTC (rev 1105)
@@ -15,7 +15,7 @@
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="NetworkManager dispatcher"
+DESC="network events dispatcher"
NAME="NetworkManagerDispatcher"
DAEMON=/usr/sbin/$NAME
PIDDIR=/var/run/NetworkManager
@@ -35,7 +35,6 @@
# Function that starts the daemon/service.
#
d_start() {
- log_begin_msg "Starting $DESC"
if [ ! -d $PIDDIR ]; then
mkdir -p $PIDDIR
chown $USER:$USER $PIDDIR
@@ -44,33 +43,34 @@
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE
- log_end_msg $?
}
#
# Function that stops the daemon/service.
#
d_stop() {
- log_begin_msg "Stopping $DESC"
start-stop-daemon --stop --retry 60 --quiet --pidfile $PIDFILE \
--oknodo --user $USER --exec $DAEMON
- log_end_msg $?
}
case "$1" in
start)
+ log_daemon_msg "Starting $DESC" "$NAME"
d_start
;;
stop)
+ log_daemon_msg "Stopping $DESC" "$NAME"
d_stop
;;
restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
d_stop
d_start
+ log_end_msg $?
;;
*)
- log_success_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
Modified: packages/unstable/networkmanager/debian/network-manager.dbus-event
===================================================================
--- packages/unstable/networkmanager/debian/network-manager.dbus-event 2006-10-24 21:23:24 UTC (rev 1104)
+++ packages/unstable/networkmanager/debian/network-manager.dbus-event 2006-10-24 21:37:23 UTC (rev 1105)
@@ -16,7 +16,7 @@
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="NetworkManager daemon"
+DESC="network connection manager"
NAME="NetworkManager"
DAEMON=/usr/sbin/$NAME
@@ -42,47 +42,45 @@
# Function that starts the daemon/service.
#
d_start() {
- log_begin_msg "Starting $DESC"
if [ ! -d $PIDDIR ]; then
mkdir -p $PIDDIR
chown $USER:$USER $PIDDIR
fi
- modprobe capability >/dev/null 2>&1 || true
- test -d /var/lib/NetworkManager || mkdir -p /var/lib/NetworkManager
- chmod 755 /var/lib/NetworkManager
-
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE
- log_end_msg $?
}
#
# Function that stops the daemon/service.
#
d_stop() {
- log_begin_msg "Stopping $DESC"
start-stop-daemon --stop --retry 60 --quiet --pidfile $PIDFILE \
--oknodo --user $USER --exec $DAEMON
- log_end_msg $?
}
case "$1" in
start)
+ log_daemon_msg "Starting $DESC" "$NAME"
d_start
+ log_end_msg $?
;;
stop)
+ log_daemon_msg "Stopping $DESC" "$NAME"
d_stop
+ log_end_msg $?
;;
restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
d_stop
d_start
+ log_end_msg $?
;;
*)
- log_success_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
More information about the Pkg-utopia-commits
mailing list