From 670fd324bffd5b6e47c2dcf5e58a7f46026be971 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 4 Jul 2008 14:14:21 +0000 Subject: networkmanager: use a proper init script with depends git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4828 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../packages/networkmanager/files/25NetworkManager | 32 ---------------- meta/packages/networkmanager/files/NetworkManager | 43 ++++++++++++++++++++++ meta/packages/networkmanager/networkmanager_svn.bb | 13 ++++--- 3 files changed, 51 insertions(+), 37 deletions(-) delete mode 100644 meta/packages/networkmanager/files/25NetworkManager create mode 100644 meta/packages/networkmanager/files/NetworkManager (limited to 'meta/packages') diff --git a/meta/packages/networkmanager/files/25NetworkManager b/meta/packages/networkmanager/files/25NetworkManager deleted file mode 100644 index 676fde35c5..0000000000 --- a/meta/packages/networkmanager/files/25NetworkManager +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# NetworkManager startup script - -. /etc/profile - -case $1 in - 'start') - echo -n "Starting NetworkManager daemon: NetworkManager" - /usr/sbin/NetworkManager - /usr/sbin/NetworkManagerDispatcher - /usr/sbin/wpa_supplicant -u & - echo "." - ;; - - 'stop') - echo -n "Stopping NetworkManager daemon: NetworkManager" - kill `ps |grep /usr/sbin/NetworkManagerDispatcher | grep -v grep | cut "-d " -f2` - kill `ps |grep /usr/sbin/NetworkManager | grep -v grep | cut "-d " -f2` - kill `ps |grep /usr/sbin/wpa_supplicant | grep -v grep | cut "-d " -f2` - echo "." - ;; - - 'restart') - $0 stop - $0 start - ;; - - *) - echo "Usage: $0 { start | stop | restart }" - ;; -esac diff --git a/meta/packages/networkmanager/files/NetworkManager b/meta/packages/networkmanager/files/NetworkManager new file mode 100644 index 0000000000..4522e0107b --- /dev/null +++ b/meta/packages/networkmanager/files/NetworkManager @@ -0,0 +1,43 @@ +#!/bin/sh +# +### 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 + +. /etc/profile + +case $1 in + 'start') + echo -n "Starting NetworkManager daemon: NetworkManager" + /usr/sbin/NetworkManager + /usr/sbin/NetworkManagerDispatcher + /usr/sbin/wpa_supplicant -u & + echo "." + ;; + + 'stop') + echo -n "Stopping NetworkManager daemon: NetworkManager" + kill `ps |grep /usr/sbin/NetworkManagerDispatcher | grep -v grep | cut "-d " -f2` + kill `ps |grep /usr/sbin/NetworkManager | grep -v grep | cut "-d " -f2` + kill `ps |grep /usr/sbin/wpa_supplicant | grep -v grep | cut "-d " -f2` + echo "." + ;; + + 'restart') + $0 stop + $0 start + ;; + + *) + echo "Usage: $0 { start | stop | restart }" + ;; +esac diff --git a/meta/packages/networkmanager/networkmanager_svn.bb b/meta/packages/networkmanager/networkmanager_svn.bb index d39220bf67..58a15aaa24 100644 --- a/meta/packages/networkmanager/networkmanager_svn.bb +++ b/meta/packages/networkmanager/networkmanager_svn.bb @@ -7,12 +7,12 @@ DEPENDS = "libnl dbus dbus-glib hal gconf-dbus wireless-tools ppp gnome-common" RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client" PV = "0.7+svnr${SRCREV}" -PR = "r5" +PR = "r6" SRC_URI="svn://svn.gnome.org/svn/NetworkManager/;module=trunk;proto=http \ file://no-restarts.diff;patch=1;pnum=0 \ file://makefile-fix.patch;patch=1 \ - file://25NetworkManager \ + file://NetworkManager \ file://99_networkmanager" EXTRA_OECONF = " \ @@ -22,13 +22,16 @@ EXTRA_OECONF = " \ S = "${WORKDIR}/trunk" -inherit autotools pkgconfig +inherit autotools pkgconfig update-rc.d + +INITSCRIPT_NAME = "NetworkManager" +INITSCRIPT_PARAMS = "defaults 22" do_install_append () { install -d ${D}/etc/default/volatiles install -m 0644 ${WORKDIR}/99_networkmanager ${D}/etc/default/volatiles - install -d ${D}/etc/dbus-1/event.d - install -m 0755 ${WORKDIR}/25NetworkManager ${D}/etc/dbus-1/event.d + # This overwrites the provided init script + install -m 0755 ${WORKDIR}/NetworkManager ${D}/etc/init.d/ } do_stage () { -- cgit v1.2.3-54-g00ecf