From: Bdale Garbee Date: Wed, 11 Jan 2012 21:57:50 +0000 (-0700) Subject: be more direct X-Git-Tag: debian/1.8.3p1-3~7 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=8b907c287e3a5ac470b07530eb2bacf3c287de82;p=debian%2Fsudo be more direct --- diff --git a/debian/sudo-ldap.postinst b/debian/sudo-ldap.postinst index f07b331..da4a83c 100644 --- a/debian/sudo-ldap.postinst +++ b/debian/sudo-ldap.postinst @@ -12,10 +12,9 @@ if [ ! -f /etc/sudoers ];then 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, diff --git a/debian/sudo-ldap.postrm b/debian/sudo-ldap.postrm index 15c155b..246f99d 100644 --- a/debian/sudo-ldap.postrm +++ b/debian/sudo-ldap.postrm @@ -22,10 +22,9 @@ case "$1" in ;; 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#