generic-poky/meta/recipes-core/initscripts/initscripts-1.0
Chen Qi e6e44cf9c1 checkroot.sh: check for conflicting configurations
In our current boot scripts, two ways are used to determine whether
the rootfs is read-only or not. One by checking the READ_ONLY_ROOTFS
value in /etc/default/rcS, the other by checking the /etc/fstab entry.

>From a normal Linux user's point of view, the way of checking the
/etc/fstab entry is preferred. However, as there are several boot scripts
that need to know whether rootfs is read-only or not, checking /etc/fstab
in each script brings too much overhead. Thus, these boot scripts
use the READ_ONLY_ROOTFS value in /etc/default/rcS.

In normal use cases, there would be no problem, as both /etc/default/rcS and
the /etc/fstab are modified at rootfs time. However, if the user changes
the mount option for rootfs in /etc/fstab to read-write, and he/she forgets
to change the value in /etc/default/rcS, there would be unexpected results.
For example, the udev-cache would still be disabled.

So at a minimal, a check for conflicting configurations between /etc/fstab
and /etc/default/rcS should be added in checkroot.sh so that there would be
reasonable warnings if users have configured the system in a non-consistent
way.

[YOCTO #4880]

(From OE-Core rev: 1565a0c5a3f245703e280ca90cf11d3f9374788a)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 13:19:42 +01:00
..
arm Major layout change to the packages directory 2010-08-27 15:29:45 +01:00
GPLv2.patch Upstream-Status update for several recipes 2011-05-17 15:14:43 +01:00
banner.sh Major layout change to the packages directory 2010-08-27 15:29:45 +01:00
bootmisc.sh initscripts: let populate-volatile.sh create the /tmp link 2013-02-06 09:37:27 +00:00
checkfs.sh initscripts: add shebang where it was missing completely 2012-01-24 11:05:29 +00:00
checkroot.sh checkroot.sh: check for conflicting configurations 2013-08-26 13:19:42 +01:00
devpts Major layout change to the packages directory 2010-08-27 15:29:45 +01:00
devpts.sh initscripts: remove space from shebang, just cosmetics 2012-01-24 11:05:30 +00:00
dmesg.sh initscripts: add dmesg file to /var/log 2013-07-10 09:42:00 +01:00
functions initscripts: let status return 0 when proc is running well 2013-05-30 20:59:11 +01:00
halt initscripts: remove space from shebang, just cosmetics 2012-01-24 11:05:30 +00:00
hostname.sh initscripts: overwrite default hostname.sh 2013-07-10 09:42:00 +01:00
logrotate-dmesg.conf initscripts: add dmesg file to /var/log 2013-07-10 09:42:00 +01:00
mountall.sh initscripts: add shebang where it was missing completely 2012-01-24 11:05:29 +00:00
mountnfs.sh replace portmap with rpcbind. 2012-12-31 09:43:24 +00:00
populate-volatile.sh populate-volatile.sh: use 'cp -a' to avoid potential problem 2013-08-16 11:14:36 +01:00
read-only-rootfs-hook.sh initscripts: fix read-only-rootfs-hook.sh to start earlier 2013-04-10 16:49:24 +01:00
reboot initscripts: remove space from shebang, just cosmetics 2012-01-24 11:05:30 +00:00
rmnologin.sh initscripts: remove space from shebang, just cosmetics 2012-01-24 11:05:30 +00:00
save-rtc.sh initscripts: Make /etc/timestamp consistent again. 2012-02-23 23:59:35 +00:00
sendsigs initscripts: remove space from shebang, just cosmetics 2012-01-24 11:05:30 +00:00
single initscripts: remove space from shebang, just cosmetics 2012-01-24 11:05:30 +00:00
sysfs.sh initscripts/sysfs.sh: mount debugfs if present 2012-09-24 11:30:37 +01:00
umountfs initscripts: remove space from shebang, just cosmetics 2012-01-24 11:05:30 +00:00
umountnfs.sh initscripts: mount and unmount cifs network filesystems 2012-02-24 23:25:53 +00:00
urandom initscripts: remove space from shebang, just cosmetics 2012-01-24 11:05:30 +00:00
volatiles base-files: add /run directory from FHS 3 draft specification 2013-05-29 22:07:56 +01:00