[systemd-commits] 5 commits - man/daemon.xml man/systemd.service.xml src/label.c src/tmpfiles.c tmpfiles.d/systemd.conf

Lennart Poettering lennart at kemper.freedesktop.org
Tue Oct 19 10:39:17 PDT 2010


 man/daemon.xml          |   15 +++++++++------
 man/systemd.service.xml |    4 ++--
 src/label.c             |    4 ++++
 src/tmpfiles.c          |    2 ++
 tmpfiles.d/systemd.conf |    4 ++++
 5 files changed, 21 insertions(+), 8 deletions(-)

New commits:
commit b772cfe0cccbcb52d6c4fc0a51cf9dfb39ecc3be
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 19 19:39:02 2010 +0200

    man: extend commenting of .spec file snippets a bit

diff --git a/man/daemon.xml b/man/daemon.xml
index 46988ef..42a7ffd 100644
--- a/man/daemon.xml
+++ b/man/daemon.xml
@@ -828,26 +828,29 @@ endif</programlisting>
 
                         <programlisting>%post
 if [ $1 -eq 1 ]; then
-        # On install, enable (but don't start) the units by default
+        # On install (not upgrade), enable (but don't start) the
+        # units by default
         /bin/systemctl enable foobar.service foobar.socket >/dev/null 2>&amp;1 || :
 
-        # Alternatively, just call /bin/systemctl daemon-reload here,
-        # if the daemon should not be enabled by default on package
+        # Alternatively, just call
+        # /bin/systemctl daemon-reload >/dev/null 2>&amp;1 || :
+        # here, if the daemon should not be enabled by default on
         # installation
 fi
 
 %preun
 if [ $1 -eq 0 ]; then
-        # On uninstall, disable and stop the units
+        # On uninstall (not upgrade), disable and stop the units
         /bin/systemctl disable foobar.service foobar.socket >/dev/null 2>&amp;1 || :
         /bin/systemctl stop foobar.service foobar.socket >/dev/null 2>&amp;1 || :
 fi
 
 %postun
-# On upgrade and uninstall, reload init system configuration, to make systemd honour changed unit files
+# Reload init system configuration, to make systemd honour changed
+# or deleted unit files
 /bin/systemctl daemon-reload >/dev/null 2>&amp;1 || :
 if [ $1 -ge 1 ] ; then
-        # Optionally, on upgrade, restart the daemon
+        # On upgrade (not uninstall), optionally, restart the daemon
         /bin/systemctl try-restart foobar.service >/dev/null 2>&amp;1 || :
 fi</programlisting>
 
commit 075b1e86c5b1713ae52d77716f19179d26cbe237
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 19 19:37:38 2010 +0200

    man: properly refer to $MAINPID instead of $(MAINPID) which doesnt work anymore

diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index c9cd51f..4473c3d 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -344,7 +344,7 @@
                                 daemon, and may be used for command
                                 lines like the following:
                                 <command>/bin/kill -HUP
-                                $(MAINPID)</command>.</para></listitem>
+                                $MAINPID</command>.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
@@ -368,7 +368,7 @@
                                 requested. Specifier and environment
                                 variable substitution is supported
                                 (including
-                                <literal>$(MAINPID)</literal>, see
+                                <literal>$MAINPID</literal>, see
                                 above).</para></listitem>
                         </varlistentry>
 
commit 29003cffa7389256a9ac1e42c8a47f85a633573d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 19 19:36:45 2010 +0200

    tmpfiles: destruct selinux database after use

diff --git a/src/tmpfiles.c b/src/tmpfiles.c
index 4953649..73246bd 100644
--- a/src/tmpfiles.c
+++ b/src/tmpfiles.c
@@ -792,5 +792,7 @@ finish:
 
         hashmap_free(items);
 
+        label_finish();
+
         return r;
 }
commit d2dfce17b5a1bb658e54a0339320207da92dc955
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 19 19:35:35 2010 +0200

    label: don't fail miserably if filesystem doesn't do xattrs/labels
    
    https://bugzilla.redhat.com/show_bug.cgi?id=642664

diff --git a/src/label.c b/src/label.c
index fb570c5..809b1ee 100644
--- a/src/label.c
+++ b/src/label.c
@@ -83,6 +83,10 @@ int label_fix(const char *path) {
                 if (r == 0) {
                         r = setfilecon(path, fcon);
                         freecon(fcon);
+
+                        /* If the FS doesn't support labels, then exit without warning */
+                        if (r < 0 && errno == ENOTSUP)
+                                return 0;
                 }
         }
 
commit e10fe9ffeaeda205e62b0d7308e339ed880d1bba
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 19 19:35:04 2010 +0200

    tmpfiles: remove forcefsck/fastboot flag files after boot

diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf
index e93b736..07ce72a 100644
--- a/tmpfiles.d/systemd.conf
+++ b/tmpfiles.d/systemd.conf
@@ -14,3 +14,7 @@ d /tmp 1777 root root 10d
 d /var/tmp 1777 root root 30d
 
 d /var/cache/man - - - 30d
+
+r /forcefsck
+r /forcequotacheck
+r /fastboot


More information about the systemd-commits mailing list