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
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