forked from altcloud/mkimage-profiles
init: avoid add root dev to fstab for vm image
This was erroneously added to overly broad class of images.
This commit is contained in:
parent
3921d83174
commit
0aa7c20ff5
@ -19,7 +19,3 @@ sub /etc/initrd.mk 'MODULES_PRELOAD += autofs4'
|
||||
|
||||
# don't allow systemd to set LANG (see also #27408)
|
||||
sub /etc/locale.conf 'LANG='
|
||||
|
||||
# aufs2 root is rw in reality; but don't bother if there's a record already
|
||||
grep -q '[[:space:]]/[[:space:]]' /etc/fstab ||
|
||||
sub /etc/fstab '/dev/root / auto defaults 0 0'
|
||||
|
16
features.in/init/stage2/image-scripts.d/91-systemd
Executable file
16
features.in/init/stage2/image-scripts.d/91-systemd
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# the part below relates to systemd as init specifically
|
||||
rpm -q systemd-sysvinit || exit 0
|
||||
|
||||
sub() {
|
||||
local file="$1"
|
||||
shift
|
||||
for i in "$@"; do
|
||||
grep -q "^$i" "$file" || echo "$i" >> "$file"
|
||||
done
|
||||
}
|
||||
|
||||
# aufs2 root is rw in reality; but don't bother if there's a record already
|
||||
grep -q '[[:space:]]/[[:space:]]' /etc/fstab ||
|
||||
sub /etc/fstab '/dev/root / auto defaults 0 0'
|
Loading…
x
Reference in New Issue
Block a user