mkimage-profiles/features.in/init/rootfs/image-scripts.d/90-systemd
Michael Shigorin db3da22457 init: sysvinit+NM support
The issue at hand it _nmconnect group that's supported
in ALT NM for polkit-less cases; it has to be added
*before* 50-users hook from deflogin feature fires off.

The existing systemd-related hook has been renamed
to reflect its job better.
2016-11-04 23:21:30 +03:00

26 lines
655 B
Bash
Executable File

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