fi
# modify nsswitch.conf if needed
-NSSWITCH="/etc/nsswitch.conf"
-if [ -z "`grep \"^sudoers:\" $NSSWITCH`" ]
+if [ -z "`grep \"^sudoers:\" /etc/nsswitch.conf`" ]
then
- echo "sudoers: files ldap" >> $NSSWITCH
+ echo "sudoers: files ldap" >> /etc/nsswitch.conf
fi
# handle state directory transition from /var/run/sudo to /var/lib/sudo,
;;
esac
-# modify nsswitch.conf
-NSSWITCH="/etc/nsswitch.conf"
-if [ -w $NSSWITCH ] ; then
- sed -i /^sudoers:/d $NSSWITCH
+# remove sudoers entries, if any, from nsswitch.conf
+if [ -w /etc/nsswitch.conf ] ; then
+ sed -i /^sudoers:/d /etc/nsswitch.conf
fi
#DEBHELPER#