make sure sudoers.d directories exist
authorBdale Garbee <bdale@gag.com>
Mon, 31 Aug 2009 20:07:58 +0000 (14:07 -0600)
committerBdale Garbee <bdale@gag.com>
Mon, 31 Aug 2009 20:07:58 +0000 (14:07 -0600)
move symlink fumbling before possible exit if group already exists

debian/sudo-ldap.dirs
debian/sudo-ldap.postinst
debian/sudo.dirs

index cde20690f632fbae6f08533c5b7c76fbfe7e73b6..83f817ca9a646cdfb608972622698640f78ada08 100644 (file)
@@ -1,4 +1,5 @@
 etc/pam.d
+etc/sudoers.d
 usr/bin
 usr/share/man/man8
 usr/share/man/man5
index c192b43aef9df2ff8890020f370f3bd14feeb42b..75c41f9262dc27cfbba4ed7cef5d8966faad4cdb 100644 (file)
@@ -37,7 +37,13 @@ system ('chmod 440 /etc/sudoers');
 # must do a remove first to un-do the "bad" links created by previous version
 system ('update-rc.d -f sudo remove >/dev/null 2>&1');
 
-system ('update-rc.d sudo start 75 2 3 4 5 S . >/dev/null');
+system ('update-rc.d sudo start 75 2 3 4 5 . >/dev/null');
+
+# 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");
+}
 
 # make sure we have a sudo group
 
@@ -65,10 +71,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 "";
index 79f694ea61dcc2b7172c24334659494f7b020978..4d15db41ab92391cb950e1b52959fa424ce405c9 100644 (file)
@@ -1,4 +1,5 @@
 etc/pam.d
+etc/sudoers.d
 usr/bin
 usr/share/man/man8
 usr/share/man/man5