1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
if [ -f /etc/nsswitch.conf ] ; then sed -i.rpmorig -e ' /^hosts:/ !b /\<mymachines\>/ b s/[[:blank:]]*$/ mymachines/ ' /etc/nsswitch.conf >/dev/null 2>&1 || : sed -i.rpmorig -e ' /^passwd:/ !b /\<mymachines\>/ b s/[[:blank:]]*$/ mymachines/ ' /etc/nsswitch.conf >/dev/null 2>&1 || : sed -i.rpmorig -e ' /^group:/ !b /\<mymachines\>/ b s/[[:blank:]]*$/ mymachines/ ' /etc/nsswitch.conf >/dev/null 2>&1 || : fi update_chrooted all
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
if [ "$1" = "0" ]; then if [ -f /etc/nsswitch.conf ] ; then sed -i.rpmorig -e ' /^hosts:/ !b s/[[:blank:]]\+mymachines\>// ' /etc/nsswitch.conf >/dev/null 2>&1 || : sed -i.rpmorig -e ' /^passwd:/ !b s/[[:blank:]]\+mymachines\>// ' /etc/nsswitch.conf >/dev/null 2>&1 || : sed -i.rpmorig -e ' /^group:/ !b s/[[:blank:]]\+mymachines\>// ' /etc/nsswitch.conf >/dev/null 2>&1 || : fi fi update_chrooted all