Fix the boot process udev warning

Phenomena: there is udev warning in boot process
        tar: can't open '/etc/dev.tar': Read-only file system

The reason is that the init script /etc/rcS.d/S04udev will try to tar the /dev as cache to speed up udev at next boot time. Unfortunately, S04udev is too early and the filesystem is not writable yet.

To fix it, this patch split the cache action to another init script, and register it as /etc/rcS.d/S36, which is after the S35mountall, and the filesystem is already writable.

Signed-off-by: Yu Ke <ke.yu@intel.com>
This commit is contained in:
Yu Ke
2010-06-09 12:04:51 +01:00
committed by Joshua Lock
parent efc47a8999
commit 1c803f3ffb
11 changed files with 36 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: udev-cache
# Required-Start: mountall
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: cache /dev to speedup the udev next boot
### END INIT INFO
[ -d /sys/class ] || exit 1
[ -r /proc/mounts ] || exit 1
[ -x /sbin/udevd ] || exit 1
if [ ! -e /etc/dev.tar ]; then
(cd /; tar cf /etc/dev.tar /dev)
fi
exit 0