mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-16 00:33:31 +08:00
system/inittab: update to fix bug #7442
Update inittabs (skeleton/busybox & sysvinit) to remove the trailing REMOUNT_ROOTFS_RW comment used as magic string in system/system.mk to enable/disable remounting the root filesystem rw or not since it affects sysvinit in doing so properly as reported in bug #7442. Instead update the sed expressions to match clean non-commented strings by searching for "-o remount,rw /" and checking that's the end of the line as well to avoid affecting possibly other remounts that a user can have in a custom inittab. Long-term the startup block of inittab should just move to a S00sysinit script or similar so that rcS can pick it up directly. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
bb6fae7791
commit
bcb835b042
@ -5,7 +5,7 @@
|
||||
id:1:initdefault:
|
||||
|
||||
proc::sysinit:/bin/mount -t proc proc /proc
|
||||
rwmo::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
|
||||
rwmo::sysinit:/bin/mount -o remount,rw /
|
||||
dpts::sysinit:/bin/mkdir -p /dev/pts
|
||||
dshm::sysinit:/bin/mkdir -p /dev/shm
|
||||
moun::sysinit:/bin/mount -a
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
# Startup the system
|
||||
null::sysinit:/bin/mount -t proc proc /proc
|
||||
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
|
||||
null::sysinit:/bin/mount -o remount,rw /
|
||||
null::sysinit:/bin/mkdir -p /dev/pts
|
||||
null::sysinit:/bin/mkdir -p /dev/shm
|
||||
null::sysinit:/bin/mount -a
|
||||
|
@ -79,12 +79,12 @@ endif
|
||||
ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
|
||||
# Find commented line, if any, and remove leading '#'s
|
||||
define SYSTEM_REMOUNT_RW
|
||||
$(SED) '/^#.*# REMOUNT_ROOTFS_RW$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab
|
||||
$(SED) '/^#.*-o remount,rw \/$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab
|
||||
endef
|
||||
else
|
||||
# Find uncommented line, if any, and add a leading '#'
|
||||
define SYSTEM_REMOUNT_RW
|
||||
$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
|
||||
$(SED) '/^[^#].*-o remount,rw \/$$/s~^~#~' $(TARGET_DIR)/etc/inittab
|
||||
endef
|
||||
endif
|
||||
TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_RW
|
||||
|
Loading…
Reference in New Issue
Block a user