From 4310bb5e2f9d9e56a0c1e544adf87d7c91d74c76 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 24 Apr 2007 21:00:59 +0000 Subject: Switch to regular SysV init scripts - Rename the start script properly so they are picked up by dh_installinit - Start them at S26, stop them at K14 - preinst,postinst,postrm: Make sure, the old conffiles for NetworkManager(Dispatcher) are removed/renamed properly. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1434 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 87 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 debian/network-manager.init (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init new file mode 100644 index 00000000..d096e950 --- /dev/null +++ b/debian/network-manager.init @@ -0,0 +1,87 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: NetworkManager +# Required-Start: $local_fs dbus dhcdbd hal +# Required-Stop: $local_fs dbus dhcdbd hal +# Should-Start: $syslog +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: S 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" +NAME="NetworkManager" + +DAEMON=/usr/sbin/$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 + +# We need /sbin/ip +[ -x /sbin/ip ] || exit 1 + +. /lib/lsb/init-functions + +test -f /etc/default/rcS && . /etc/default/rcS +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 --pid-file $PIDFILE + +} + +# +# Function that stops the daemon/service. +# +d_stop() { + start-stop-daemon --stop --retry 60 --quiet --pidfile $PIDFILE \ + --oknodo --user $USER --exec $DAEMON + +} + + +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 $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 -- cgit 1.3.0-6-gf8a5 From d002b93c4fcff7a8e9b5274ff4b07d1feed81a51 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 24 Jan 2008 23:21:18 +0000 Subject: * debian/network-manager.init, debian/network-manager.network-manager-dispatcher.init - Fix LSB init header. Use $remote_fs instead of $local_fs as the daemon requires /usr to be mounted. Remove S from Should-Stop. (Closes: #459480) - Shorten retry-time to 5 secs on stop. - Don't fail to start if daemon is already running. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@2059 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init index d096e950..9e6fcf0b 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -1,12 +1,12 @@ #! /bin/sh ### BEGIN INIT INFO # Provides: NetworkManager -# Required-Start: $local_fs dbus dhcdbd hal -# Required-Stop: $local_fs dbus dhcdbd hal +# Required-Start: $remote_fs dbus dhcdbd hal +# Required-Stop: $remote_fs dbus dhcdbd hal # Should-Start: $syslog # Should-Stop: $syslog # Default-Start: 2 3 4 5 -# Default-Stop: S 0 1 6 +# Default-Stop: 0 1 6 # Short-Description: network connection manager # Description: Daemon for automatically switching network # connections to the best available connection. @@ -34,7 +34,6 @@ test -x $DAEMON || exit 0 . /lib/lsb/init-functions -test -f /etc/default/rcS && . /etc/default/rcS test -f /etc/default/NetworkManager && . /etc/default/NetworkManager # @@ -47,7 +46,7 @@ d_start() { fi start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE + --oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE } @@ -55,7 +54,7 @@ d_start() { # Function that stops the daemon/service. # d_stop() { - start-stop-daemon --stop --retry 60 --quiet --pidfile $PIDFILE \ + start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ --oknodo --user $USER --exec $DAEMON } -- cgit 1.3.0-6-gf8a5 From 5b1afa498f15562272686b5a7b167780bc55b213 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 22 Feb 2009 02:05:46 +0000 Subject: Merged revisions 2066,2304-2305,2308,2317-2318,2320-2323,2325,2333,2405-2415,2426-2429,2431-2434,2456-2458,2460,2464,2507-2508,2510,2513-2515,2517,2538-2539,2659-2668,2734-2735,2862 via svnmerge from svn+ssh://biebl@svn.debian.org/svn/pkg-utopia/packages/experimental/networkmanager ........ r2066 | biebl | 2008-01-25 15:36:51 +0100 (Fr, 25 Jan 2008) | 19 lines * SVN snapshot of the upcoming 0.7 release. * Drop patches which are either obsolete, merged upstream or not yet ported - 01-supplicant_timeout.patch - 04-if_fix.patch - 11-man_page_sh_name.patch - 12_readme_format.patch - 13-validate_mac_addr.patch - 20-stable_branch_updates_r2652.patch - 21-endianess_fix_r2754.patch - 22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch - 23-rfkill_return_type.patch - 24-get_mode_fix_r3122.patch - 25-libnl_unique_pid_r3155.patch - 26-libnl_1.0-pre8_r3206.patch - 27-dont_repeat_errors.patch * debian/patches/05-debian_backend.patch - Updated for 0.7. * debian/patches/02-dbus_access_network_manager.patch - Updated for 0.7. ........ r2304 | sjoerd | 2008-06-18 15:05:11 +0200 (Mi, 18 Jun 2008) | 1 line Merge mbiebl's packaging ........ r2305 | sjoerd | 2008-06-18 15:39:30 +0200 (Mi, 18 Jun 2008) | 3 lines * New SVN snapshot * debian/patches/03-system-settings-conf.patch - Removed. Merged upstream ........ r2308 | sjoerd | 2008-06-18 16:54:57 +0200 (Mi, 18 Jun 2008) | 2 lines * Split out libnm-glib-vpn from libnm-glib * debian/rules: Use list-missing ........ r2317 | sjoerd | 2008-06-18 19:39:15 +0200 (Mi, 18 Jun 2008) | 1 line Ensure we install all header files ........ r2318 | sjoerd | 2008-06-18 19:47:38 +0200 (Mi, 18 Jun 2008) | 1 line Don't forget about nm-types.h ........ r2320 | biebl | 2008-06-19 00:18:13 +0200 (Do, 19 Jun 2008) | 2 lines Fix symbols files (remove Debian revision) ........ r2321 | biebl | 2008-06-19 00:20:07 +0200 (Do, 19 Jun 2008) | 5 lines - nm-vpn-properties was removed. Remove the now unnecessary build-deps. - Wrap lines in the long description. - libnm-glib-dev seems to required network-manager-dev ........ r2322 | biebl | 2008-06-19 00:21:18 +0200 (Do, 19 Jun 2008) | 3 lines Merge changelog. 0.7.0~svn3747-1 was never released. A more complete changelog will follow... ........ r2323 | biebl | 2008-06-19 00:23:48 +0200 (Do, 19 Jun 2008) | 2 lines Actually remove the NetworkManagerDispatcher init script. ........ r2325 | biebl | 2008-06-19 01:58:40 +0200 (Do, 19 Jun 2008) | 1 line Fix the package name in libnm-glib-vpn0.symbols ........ r2333 | sjoerd | 2008-06-22 23:27:01 +0200 (So, 22 Jun 2008) | 3 lines * debian/patches/10-execute_system_dhclient_script.patch - Added. Let NM's custom dhclient script execute the systems dhclient script. ........ r2405 | biebl | 2008-08-22 21:39:05 +0200 (Fr, 22 Aug 2008) | 2 lines Update symbols file for svn snapshot r4002 ........ r2406 | biebl | 2008-08-22 21:40:18 +0200 (Fr, 22 Aug 2008) | 2 lines Add "status" action. Requires lsb-base (>= 3.2-14). ........ r2407 | biebl | 2008-08-22 21:43:29 +0200 (Fr, 22 Aug 2008) | 5 lines Disable 05-debian_backend.patch and 10-execute_system_dhclient_script.patch The integration of resolvconf will have to be done differently. The current patches no longer apply. ........ r2408 | biebl | 2008-08-22 21:44:12 +0200 (Fr, 22 Aug 2008) | 2 lines Stop NM at priority 88, exclude private libs from dh_makeshlibs. ........ r2409 | biebl | 2008-08-22 21:46:43 +0200 (Fr, 22 Aug 2008) | 5 lines Update installed files/directories - Install avahi action script and dbus config file - Install nm-dhcp4-config.h header - Install dispatcher.d and system-connections directories created by upstream. ........ r2410 | biebl | 2008-08-22 21:47:21 +0200 (Fr, 22 Aug 2008) | 2 lines Copyright has to be revised. This is a first attempt to remove stale stuff. ........ r2411 | biebl | 2008-08-22 21:47:48 +0200 (Fr, 22 Aug 2008) | 2 lines Update to svn r4002 ........ r2412 | biebl | 2008-08-22 21:49:32 +0200 (Fr, 22 Aug 2008) | 4 lines - Bump Standards Version to 3.8.0 - Suggest avahi-autoipd, NM no longer does IPv4LL - Bump dependency on lsb-base, required by status_of_proc ........ r2413 | biebl | 2008-08-22 22:14:37 +0200 (Fr, 22 Aug 2008) | 1 line Remove, all relevant parts are upstream now ........ r2414 | biebl | 2008-08-22 22:15:21 +0200 (Fr, 22 Aug 2008) | 4 lines Remove 10-execute_system_dhclient_script.patch, patch no longer applies. Resolvconf intergration will have to be addressedd differently. ........ r2415 | biebl | 2008-08-22 22:16:09 +0200 (Fr, 22 Aug 2008) | 2 lines Update to r4004, which contains our custom backend changes. ........ r2426 | smcv | 2008-09-30 19:21:44 +0200 (Di, 30 Sep 2008) | 2 lines * Newer tarball * debian/patches/03-run-resolvconf.patch: Use (and depend on) resolvconf ........ r2427 | biebl | 2008-10-01 13:40:09 +0200 (Mi, 01 Okt 2008) | 5 lines Revert r2426 After a short discussion on irc, it deemed to be best to revert this change as upstream has added resolvconf in r4043 ........ r2428 | sjoerd | 2008-10-03 00:17:18 +0200 (Fr, 03 Okt 2008) | 1 line Update to svn version 4142 ........ r2429 | sjoerd | 2008-10-03 00:40:18 +0200 (Fr, 03 Okt 2008) | 1 line Update the various symbols files ........ r2431 | biebl | 2008-10-03 01:55:09 +0200 (Fr, 03 Okt 2008) | 2 lines Strip off debian revision ........ r2432 | biebl | 2008-10-03 01:57:04 +0200 (Fr, 03 Okt 2008) | 2 lines Pass the correct path of resolvconf and dhclient to ./configure ........ r2433 | biebl | 2008-10-03 01:57:25 +0200 (Fr, 03 Okt 2008) | 2 lines Install the ifupdown plugin and enable it by default. ........ r2434 | sjoerd | 2008-10-03 13:40:53 +0200 (Fr, 03 Okt 2008) | 3 lines * debian/patches/03-nm_get_debian_hostname.patch: - Added. Temporary minimal patch to get hostname from /etc/hostname. There is work being done upstream for a more extensive version. ........ r2456 | sjoerd | 2008-10-10 00:31:49 +0200 (Fr, 10 Okt 2008) | 1 line Update to svn revision 4160 ........ r2457 | sjoerd | 2008-10-10 00:34:20 +0200 (Fr, 10 Okt 2008) | 1 line remove 03-nm_get_debian_hostname.patch, a more complete implementation is merged upstream ........ r2458 | sjoerd | 2008-10-10 00:36:36 +0200 (Fr, 10 Okt 2008) | 1 line unfuck the changelog ........ r2460 | sjoerd | 2008-10-18 21:02:32 +0200 (Sa, 18 Okt 2008) | 1 line Update snapshot to svn version 4191 ........ r2464 | sjoerd | 2008-10-18 22:30:07 +0200 (Sa, 18 Okt 2008) | 1 line target experimental ........ r2507 | sjoerd | 2008-11-29 22:05:27 +0100 (Sa, 29 Nov 2008) | 1 line Start preparing new upstream release (0.7.0) ........ r2508 | sjoerd | 2008-11-29 22:22:54 +0100 (Sa, 29 Nov 2008) | 1 line debian/libnm-util0.symbols: Updated ........ r2510 | sjoerd | 2008-11-29 23:15:59 +0100 (Sa, 29 Nov 2008) | 1 line debian/libnm-glib0.symbols: Updated ........ r2513 | sjoerd | 2008-11-30 15:07:06 +0100 (So, 30 Nov 2008) | 2 lines * debian/patches/03-F3507g.patch - Added. Fix gsm support for Ericsson F3507g Mobile Broadband cards ........ r2514 | biebl | 2008-11-30 15:07:49 +0100 (So, 30 Nov 2008) | 6 lines Update all symbols files - Strip of debian revision number - Use the final 0.7.0 version number for the ~svn??? snapshots which were never released anyway. ........ r2515 | sjoerd | 2008-11-30 15:08:29 +0100 (So, 30 Nov 2008) | 1 line Fix typo in the name ........ r2517 | sjoerd | 2008-12-04 00:52:46 +0100 (Do, 04 Dez 2008) | 1 line debian/control: Recommend ppp ........ r2538 | biebl | 2008-12-06 00:53:36 +0100 (Sa, 06 Dez 2008) | 5 lines * debian/patches/04-ltversioning.patch - Bump soname of libnm-util due to an ABI break between 0.6.6 and 0.7. (Closes: #503682) * Update control, install and symbols file for the new libnm-util library name. ........ r2539 | biebl | 2008-12-06 01:12:06 +0100 (Sa, 06 Dez 2008) | 2 lines * debian/patches/05-dhclient_lease_files.patch - Change the location of the dhclient lease files to /var/lib/dhcp3. ........ r2659 | biebl | 2008-12-16 07:48:51 +0100 (Di, 16 Dez 2008) | 4 lines Rework the changelog for (0.7.0~svn4191-1) List all changes between 0.6.6-2 and 0.7.0~svn4191-1 ........ r2660 | biebl | 2008-12-16 08:55:37 +0100 (Di, 16 Dez 2008) | 2 lines Close bug reports that are fixed by this new upstream release. ........ r2661 | biebl | 2008-12-16 09:03:46 +0100 (Di, 16 Dez 2008) | 5 lines * debian/control - Add Conflicts/Replaces: network-manager-pptp (<< 0.7~~) as the pppd plugin is now shipped by this package. - Add Breaks for network-manager-{gnome,kde} (<< 0.7~~) as the 0.6 versions of those packages do not work with network-manager 0.7. ........ r2662 | biebl | 2008-12-16 09:18:47 +0100 (Di, 16 Dez 2008) | 2 lines Add the vpn (core) plugins also to the Breaks list. ........ r2663 | biebl | 2008-12-16 09:28:27 +0100 (Di, 16 Dez 2008) | 3 lines * debian/network-manager.README.Debian - Merge the README.Debian from Ubuntu which describes the new managed/unmanaged modes. ........ r2664 | biebl | 2008-12-16 09:39:13 +0100 (Di, 16 Dez 2008) | 2 lines * debian/nm-system-settings.conf - Set default mode to unmanaged. ........ r2665 | biebl | 2008-12-16 09:42:40 +0100 (Di, 16 Dez 2008) | 1 line changelog tweaks ........ r2666 | biebl | 2008-12-16 09:55:59 +0100 (Di, 16 Dez 2008) | 3 lines * debian/copyright - Revised and updated. libnm-glib and libnm-util are licensed under the LGPL v2 or later. ........ r2667 | biebl | 2008-12-16 09:56:31 +0100 (Di, 16 Dez 2008) | 1 line Upload to experimental ........ r2668 | biebl | 2008-12-16 10:04:31 +0100 (Di, 16 Dez 2008) | 1 line Refresh 03-F3507g.patch with -p1 ........ r2734 | biebl | 2009-01-13 08:10:58 +0100 (Di, 13 Jan 2009) | 2 lines * debian/control - Add ${misc:Depends} to all binary packages. ........ r2735 | biebl | 2009-01-13 08:15:00 +0100 (Di, 13 Jan 2009) | 2 lines Let network-manager depend on dhcp3-client directly, as the dependency on dhcdbd has been removed. (Closes: #509655) ........ r2862 | biebl | 2009-02-20 02:47:38 +0100 (Fr, 20 Feb 2009) | 3 lines * debian/rules - Include debhelper.mk before any other files as recommended by the cdbs documentation. ........ git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@2884 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init index 9e6fcf0b..18797994 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -1,8 +1,8 @@ #! /bin/sh ### BEGIN INIT INFO # Provides: NetworkManager -# Required-Start: $remote_fs dbus dhcdbd hal -# Required-Stop: $remote_fs dbus dhcdbd hal +# Required-Start: $remote_fs dbus hal +# Required-Stop: $remote_fs dbus hal # Should-Start: $syslog # Should-Stop: $syslog # Default-Start: 2 3 4 5 @@ -29,9 +29,6 @@ USER=root # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 -# We need /sbin/ip -[ -x /sbin/ip ] || exit 1 - . /lib/lsb/init-functions test -f /etc/default/NetworkManager && . /etc/default/NetworkManager @@ -77,8 +74,11 @@ case "$1" in d_start 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 -- cgit 1.3.0-6-gf8a5 From 26b28e491ae69bd4e0727b28cbd84e7efa98f328 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 8 Apr 2009 04:24:45 +0000 Subject: * debian/network-manager.dirs,init - Do no longer install the /var/run/NetworkManager directory. * debian/network-manager.init - Store the NetworkManager pid file directly in /var/run. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@3037 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init index 18797994..3fc396db 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -20,8 +20,7 @@ NAME="NetworkManager" DAEMON=/usr/sbin/$NAME -PIDDIR=/var/run/NetworkManager -PIDFILE=$PIDDIR/$NAME.pid +PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/network-manager USER=root @@ -37,13 +36,8 @@ 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 \ - --oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE + --oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS } -- cgit 1.3.0-6-gf8a5 From c3c5a459732cf6643ae2cf39790bbb0438fc9d31 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 16 Aug 2009 01:00:26 +0000 Subject: * debian/network-manager.init - Update LSB header. Add "network-manager" to Provides as this name is apparently used within the gdm init script and to be more in line with the recommend practice to name the Provides like the init script. Don't remove the "NetworkManager" Provides as other scripts might already depend on that name. (Closes: #539753) git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@3218 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init index 3fc396db..058dbd24 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -1,6 +1,6 @@ #! /bin/sh ### BEGIN INIT INFO -# Provides: NetworkManager +# Provides: NetworkManager network-manager # Required-Start: $remote_fs dbus hal # Required-Stop: $remote_fs dbus hal # Should-Start: $syslog -- cgit 1.3.0-6-gf8a5 From bb9609f8be78310f6e531997d12a3e6d0b8342d4 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 17 Aug 2009 21:41:55 +0000 Subject: Remove NetworkManager from Provides According to pere no init script in the archive is using it. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@3224 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init index 058dbd24..0771e530 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -1,6 +1,6 @@ #! /bin/sh ### BEGIN INIT INFO -# Provides: NetworkManager network-manager +# Provides: network-manager # Required-Start: $remote_fs dbus hal # Required-Stop: $remote_fs dbus hal # Should-Start: $syslog -- cgit 1.3.0-6-gf8a5 From 1ad150b02b1ac1ac15175159d9a295c2eb16d35b Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 24 Nov 2009 23:09:32 +0000 Subject: * debian/network-manager.init - Kill the D-Bus activated nm-system-settings daemon on "stop". Update README.Debian accordingly. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@3293 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init index 0771e530..250971bb 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -23,7 +23,6 @@ DAEMON=/usr/sbin/$NAME PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/network-manager -USER=root # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 @@ -37,8 +36,7 @@ test -f /etc/default/NetworkManager && . /etc/default/NetworkManager # d_start() { start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS - + --oknodo --exec $DAEMON -- $DAEMON_OPTS } # @@ -46,8 +44,11 @@ d_start() { # d_stop() { start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ - --oknodo --user $USER --exec $DAEMON - + --oknodo --exec $DAEMON + + # kill the system settings daemon + start-stop-daemon --stop --retry 5 --quiet \ + --oknodo --exec /usr/sbin/nm-system-settings } -- cgit 1.3.0-6-gf8a5 From db348dabb3bad31bb00bc967aa44fb4a5e0321d3 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 21 Jan 2010 23:38:01 +0000 Subject: Update init script * debian/network-manager.init - Update LSB header: Replace hal dependency with udev. - The nm-system-settings daemon has been merged into the NetworkManager daemon, so we no longer need to kill nm-system-settings on "stop". git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/experimental/networkmanager@3393 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init index 250971bb..ea6d2ee9 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -1,8 +1,8 @@ #! /bin/sh ### BEGIN INIT INFO # Provides: network-manager -# Required-Start: $remote_fs dbus hal -# Required-Stop: $remote_fs dbus hal +# Required-Start: $remote_fs dbus udev +# Required-Stop: $remote_fs dbus udev # Should-Start: $syslog # Should-Stop: $syslog # Default-Start: 2 3 4 5 @@ -44,11 +44,7 @@ d_start() { # d_stop() { start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ - --oknodo --exec $DAEMON - - # kill the system settings daemon - start-stop-daemon --stop --retry 5 --quiet \ - --oknodo --exec /usr/sbin/nm-system-settings + --oknodo $USER --exec $DAEMON } -- cgit 1.3.0-6-gf8a5 From 9c4894900c0d7856c344c5bbb47c68fcc0960b75 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 8 Feb 2010 16:01:27 +0000 Subject: * debian/network-manager.init - Don't use "set -e". - Print meaningful messages on start and stop in case the daemon is already running resp. already stopped. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@3513 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/network-manager.init | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'debian/network-manager.init') diff --git a/debian/network-manager.init b/debian/network-manager.init index ea6d2ee9..18323a88 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -12,8 +12,6 @@ # 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" NAME="NetworkManager" @@ -36,7 +34,7 @@ test -f /etc/default/NetworkManager && . /etc/default/NetworkManager # d_start() { start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --oknodo --exec $DAEMON -- $DAEMON_OPTS + --exec $DAEMON -- $DAEMON_OPTS } # @@ -44,7 +42,7 @@ d_start() { # d_stop() { start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ - --oknodo $USER --exec $DAEMON + --exec $DAEMON } @@ -52,18 +50,26 @@ case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" d_start - log_end_msg $? + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already started" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" d_stop - log_end_msg $? + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already stopped" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac ;; restart|force-reload) - log_daemon_msg "Restarting $DESC" "$NAME" - d_stop - d_start - log_end_msg $? + $0 stop + $0 start ;; status) status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? -- cgit 1.3.0-6-gf8a5