* [PATCH 0/1] sysvinit: fix problem in switching runlevels
@ 2013-11-11 9:26 Qi.Chen
2013-11-11 9:26 ` [PATCH 1/1] " Qi.Chen
0 siblings, 1 reply; 2+ messages in thread
From: Qi.Chen @ 2013-11-11 9:26 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
This patch has been tested with the following steps.
1. Build an image with nfs-utils and rpcbind.
2. Add to /etc/fstab an nfs mount point with the following commands.
mount -o loop tmp/deploy/images/qemux86/core-image-minimal-qemux86.ext3 root-disk-dir/
mkdir -p root-disk-dir/home/root/test
if ! grep -q 'nfs' root-disk-dir/etc/fstab; then
echo "192.168.7.1:/home/chenqi/test /home/root/test nfs defaults 0 0" >> root-disk-dir/etc/fstab
fi
umount root-disk-dir
3. runqemu qemux86 qemuparams="-serial stdio" bootparams="console=ttyS0"
4. init 1 (Network interface down and no nfs mount point)
5. init 3 (Network interface up and nfs mount point available)
6. init 5 (Network interface up and nfs mount point available)
The following changes since commit 4fdc3d77d4a875b7236536bf78849a4d1f6a7449:
kbd: Fix stdarg related errors on uclibc (2013-11-08 17:31:36 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/sysvinit-runlevels
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/sysvinit-runlevels
Chen Qi (1):
sysvinit: fix problem in switching runlevels
.../init-ifupdown/init-ifupdown_1.0.bb | 2 +-
meta/recipes-core/initscripts/initscripts_1.0.bb | 4 ++--
meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] sysvinit: fix problem in switching runlevels
2013-11-11 9:26 [PATCH 0/1] sysvinit: fix problem in switching runlevels Qi.Chen
@ 2013-11-11 9:26 ` Qi.Chen
0 siblings, 0 replies; 2+ messages in thread
From: Qi.Chen @ 2013-11-11 9:26 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <qi.chen@windriver.com>
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 <Qi.Chen@windriver.com>
---
.../init-ifupdown/init-ifupdown_1.0.bb | 2 +-
meta/recipes-core/initscripts/initscripts_1.0.bb | 4 ++--
meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
index 9d3af34..0f4290c 100644
--- a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
@@ -9,7 +9,7 @@ PR = "r3"
inherit update-rc.d
INITSCRIPT_NAME = "networking"
-INITSCRIPT_PARAMS = "start 40 S . stop 40 0 6 1 ."
+INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 80 0 6 1 ."
SRC_URI = "file://copyright \
file://init \
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 2d58266..d46ba67 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 .
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
index a75e4e1..16fb7b7 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
@@ -35,7 +35,7 @@ PACKAGECONFIG ??= "tcp-wrappers"
PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
INITSCRIPT_NAME = "rpcbind"
-INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
+INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
SYSTEMD_SERVICE_${PN} = "rpcbind.service"
SYSTEMD_AUTO_ENABLE = "disable"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-11 9:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11 9:26 [PATCH 0/1] sysvinit: fix problem in switching runlevels Qi.Chen
2013-11-11 9:26 ` [PATCH 1/1] " Qi.Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox