From f12e1291b51ba6692b6809570d6a9b73c70a7fe9 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 11 Nov 2013 17:26:09 +0800 Subject: sysvinit: fix problem in switching runlevels Previously, if we switch to runlevel 1 and then switch back to runlevel 5, the network interface will be brought down and the NFS service will not be restarted correctly. The problem is that the networking and rpcbind services are brought down in runlevel 1 but not brought up in runlevel 5. This patch fixes the above problem. It's based on the assumption that in sysvinit-based system, runlevel 1 does not have networking support. This patch adjusts some init script parameters used by update-rc.d. It makes sure that networking starts before rpcbind which in turn starts before mountnfs.sh. When switching to runlevel 0, 1 and 6, the umountnfs.sh is run first before stopping rpcbind service, and the network is brought down afterwards. [YOCTO #5513] Signed-off-by: Chen Qi Signed-off-by: Saul Wold --- meta/recipes-core/initscripts/initscripts_1.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/recipes-core/initscripts') diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index 2d582660fa..d46ba67b2a 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb @@ -108,7 +108,7 @@ do_install () { update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 . update-rc.d -r ${D} sendsigs start 20 0 6 . update-rc.d -r ${D} urandom start 30 S 0 6 . - update-rc.d -r ${D} umountnfs.sh start 31 0 6 . + update-rc.d -r ${D} umountnfs.sh start 31 0 1 6 . update-rc.d -r ${D} umountfs start 40 0 6 . update-rc.d -r ${D} reboot start 90 6 . update-rc.d -r ${D} halt start 90 0 . @@ -117,7 +117,7 @@ do_install () { update-rc.d -r ${D} checkroot.sh start 06 S . update-rc.d -r ${D} mountall.sh start 03 S . update-rc.d -r ${D} hostname.sh start 39 S . - update-rc.d -r ${D} mountnfs.sh start 45 S . + update-rc.d -r ${D} mountnfs.sh start 15 2 3 4 5 . update-rc.d -r ${D} bootmisc.sh start 55 S . update-rc.d -r ${D} sysfs.sh start 02 S . update-rc.d -r ${D} populate-volatile.sh start 37 S . -- cgit 1.2.3-korg