Commit f35351d8 authored by Alexey Shabalin's avatar Alexey Shabalin Committed by Michael Shigorin

init: avoid add root dev to fstab for vm image

This was erroneously added to overly broad class of images.
parent 90ab85ab
...@@ -19,7 +19,3 @@ sub /etc/initrd.mk 'MODULES_PRELOAD += autofs4' ...@@ -19,7 +19,3 @@ sub /etc/initrd.mk 'MODULES_PRELOAD += autofs4'
# don't allow systemd to set LANG (see also #27408) # don't allow systemd to set LANG (see also #27408)
sub /etc/locale.conf 'LANG=' 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'
#!/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'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment