Package libnss-role: Scripts

Post install

1
2
3
4
5
6
7
if [ "$1" = "1" ]; then
    grep -q '^group:[[:blank:]]*\(.\+[[:blank:]]\+\)*role\($\|[[:blank:]]\)' \
        /etc/nsswitch.conf || \
    sed -i.rpmorig -e 's/^\(group:.\+\)$/\1 role/g' \
        /etc/nsswitch.conf
fi
update_chrooted all
Post uninstall

1
2
3
4
5
6
if [ "$1" = "0" ]; then
    sed -i -e 's/^group:role/group:/g' \
           -e 's/^\(group:\)\(.\+[[:blank:]]*\)*[[:blank:]]\+role\($\|[[:blank:]].*\)$/\1\2\3/g' \
        /etc/nsswitch.conf
fi
update_chrooted all