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

Post install

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

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

#%post -n libnss-resolve
#if [ -f /etc/nsswitch.conf ] ; then
#        grep -E -q '^hosts:.* resolve' /etc/nsswitch.conf ||
#        sed -i.rpmorig -r -e '
#                s/^(hosts):(.*) files( mdns4_minimal .NOTFOUND=return.)? dns myhostname/\1:\2 resolve [!UNAVAIL=return] myhostname files\3 dns/
#                ' /etc/nsswitch.conf >/dev/null 2>&1 || :
#fi
#update_chrooted all

#%postun -n libnss-resolve
#if [ "$1" = "0" ]; then
#        if [ -f /etc/nsswitch.conf ] ; then
#                sed -i.rpmorig -e '
#                        /^hosts:/ !b
#                        s/[[:blank:]]\+resolve\+[[:blank:]]*\[[^]]*\]*/      /
#                        ' /etc/nsswitch.conf >/dev/null 2>&1 || :
#        fi
#fi
#update_chrooted all