#!/bin/sh# the part below relates to systemd as init specificallyrpm -q systemd-sysvinit ||exit 0# file str [str...]# NB: str is also treated as a regex,# be careful if you copy the functionsub(){local file="$1"shiftfor i in"$@";dogrep-q"^$i""$file"||echo"$i">>"$file"done}# tune make-initrdsub /etc/initrd.mk 'FEATURES += systemd''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 alreadygrep-q'[[:space:]]/[[:space:]]' /etc/fstab || sub /etc/fstab '/dev/root / auto defaults 0 0'