#!/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'
