Package libnss-systemd: Скрипты

Post install

1
2
3
4
5
6
7
8
9
if [ -f /etc/nsswitch.conf ] ; then
            grep -E -q '^(passwd|group):.* systemd' /etc/nsswitch.conf ||
            sed -i.rpmorig -r -e '
                s/^(\s*passwd\s*):(.*)/\1:\2 systemd/
                /^\s*group\s*:.*\s+role\s*$/ s/^(\s*group\s*):(.*)(\s+role)\s*$/\1:\2 systemd\3/
                /^\s*group\s*:.*\s+role\s*$/! s/^(\s*group\s*):(.*)/\1:\2 systemd/
                ' /etc/nsswitch.conf >/dev/null 2>&1 || :
fi
update_chrooted all
Post uninstall

1
2
3
4
5
6
7
8
9
if [ "$1" = "0" ]; then
        if [ -f /etc/nsswitch.conf ] ; then
                sed -i.rpmorig -r -e '
                        /^(passwd|group):/ !b
                        s/[[:blank:]]+systemd\>//
                        ' /etc/nsswitch.conf >/dev/null 2>&1 || :
        fi
fi
update_chrooted all