From: Bdale Garbee Date: Sat, 28 Mar 2009 12:32:38 +0000 (-0600) Subject: fix ldap postinst X-Git-Tag: debian/1.7.0-1~17 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=0cd4e213804686bf5ddb11ff2c86acbc467a58e5;p=debian%2Fsudo fix ldap postinst --- diff --git a/debian/changelog b/debian/changelog index b196229..7ba6db9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ sudo (1.6.9p17-3) UNRELEASED; urgency=low - * fix ldap config file path for sudo-ldap package, closes: #430826 + * fix ldap config file path for sudo-ldap package, including creating + a symlink in postinst and cleaning it up in postrm for the sudo-ldap + package, closes: #430826 -- Bdale Garbee Wed, 11 Mar 2009 10:44:21 -0600 diff --git a/debian/postinst b/debian/postinst index b89a8a5..2229c83 100644 --- a/debian/postinst +++ b/debian/postinst @@ -63,10 +63,4 @@ if ($gid != 27) { print "Creating group 'sudo' with gid = $gid\n"; system("groupadd -g $gid sudo"); -# create symlink to ease transition to new path for ldap config -# if old config file exists and new one doesn't -if (-e "/etc/ldap/ldap.conf" && ! -e "/etc/sudo-ldap.conf") { - system("ln -s ldap/ldap.conf /etc/sudo-ldap.conf"); -} - print ""; diff --git a/debian/sudo-ldap.postinst b/debian/sudo-ldap.postinst index 36cdd23..89cc56c 100644 --- a/debian/sudo-ldap.postinst +++ b/debian/sudo-ldap.postinst @@ -61,4 +61,10 @@ if ($gid != 27) { print "Creating group 'sudo' with gid = $gid\n"; system("groupadd -g $gid sudo"); +# create symlink to ease transition to new path for ldap config +# if old config file exists and new one doesn't +if (-e "/etc/ldap/ldap.conf" && ! -e "/etc/sudo-ldap.conf") { + system("ln -s ldap/ldap.conf /etc/sudo-ldap.conf"); +} + print ""; diff --git a/debian/sudo-ldap.postrm b/debian/sudo-ldap.postrm new file mode 100644 index 0000000..58bb84b --- /dev/null +++ b/debian/sudo-ldap.postrm @@ -0,0 +1,20 @@ +#!/bin/sh -e + +case "$1" in + purge) + rm -f /etc/sudo-ldap.conf + ;; + + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "unknown argument --> $1" >&2 + exit 0 + ;; +esac + +#DEBHELPER#