sysvinit: fix problem in switching runlevels
authorChen Qi <qi.chen@windriver.com>
Mon, 11 Nov 2013 09:26:09 +0000 (17:26 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Nov 2013 14:03:23 +0000 (14:03 +0000)
commitbe8a0660bf82e9fb73838d67a2abb16f851f1a62
treec8d0c7b6844a8444fc61c3194561ffc76bcbcfae
parente9ea054dd7ba0931525e6dfa2c8a11b7f3b3ff51
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]

(From OE-Core rev: f12e1291b51ba6692b6809570d6a9b73c70a7fe9)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
meta/recipes-core/initscripts/initscripts_1.0.bb
meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb