]> granicus.if.org Git - sudo/commitdiff
Only create /usr/lib/tmpfiles.d/sudo.conf if
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 26 Feb 2015 16:55:01 +0000 (09:55 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 26 Feb 2015 16:55:01 +0000 (09:55 -0700)
/usr/lib/tmpfiles.d/systemd.conf also exists.  Some other package
may have created /usr/lib/tmpfiles.d even though it is not used.

sudo.pp

diff --git a/sudo.pp b/sudo.pp
index c4a810fa6f32951cfe07dfe220f94958611d755b..3f4d8e75f1e68cc471a2719da72d61dc8b101b47 100644 (file)
--- a/sudo.pp
+++ b/sudo.pp
@@ -400,8 +400,8 @@ still allow people to get their work done."
        esac
 
 %post [rpm,deb]
-       # Create /usr/lib/tmpfiles.d/sudo.conf if /lib/systemd exists
-       if [ -d /lib/systemd ]; then
+       # Create /usr/lib/tmpfiles.d/sudo.conf if systemd is configured.
+       if [ -r /usr/lib/tmpfiles.d/systemd.conf ]; then
                cat > /usr/lib/tmpfiles.d/sudo.conf <<-EOF
                d %{rundir} 0711 root root
                D %{rundir}/ts 0700 root root