]> git.pld-linux.org Git - packages/sudo.git/commitdiff
add trigger to ensure includedir sudoers.d (added in d110a738) is in config
authorElan Ruusamäe <glen@delfi.ee>
Tue, 27 Aug 2013 19:03:30 +0000 (22:03 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 27 Aug 2013 19:03:51 +0000 (22:03 +0300)
sudo.spec

index bb3c014105caeca84ed3d94d658ec63bc62064cb..ce48833ae6ef66c058585a430582a4e02c1dd1ba 100644 (file)
--- a/sudo.spec
+++ b/sudo.spec
@@ -247,6 +247,17 @@ if [ "$1" = "0" ]; then
        %service -q ldap restart
 fi
 
+%triggerpostun -- %{name} < 1:1.7.4p3-2
+# add include statement to sudoers
+if ! grep -q '#includedir %{_sysconfdir}/sudoers.d' /etc/sudoers; then
+       echo 'Adding includedir %{_sysconfdir}/sudoers.d to /etc/sudoers'
+       cat <<-EOF >> /etc/sudoers
+               ## Read drop-in files from %{_sysconfdir}/sudoers.d
+               ## (the '#' here does not indicate a comment)
+               #includedir %{_sysconfdir}/sudoers.d
+       EOF
+fi
+
 %triggerpostun -- %{name} < 1:1.7.8p2-5
 mv -f /var/run/sudo/* /var/db/sudo 2>/dev/null
 rmdir /var/run/sudo 2>/dev/null || :
This page took 0.255457 seconds and 4 git commands to generate.