[systemd-commits] 5 commits - TODO man/systemd.mount.xml src/core tmpfiles.d/etc.conf units/systemd-sysusers.service.in units/systemd-tmpfiles-setup-dev.service.in

Lennart Poettering lennart at kemper.freedesktop.org
Sun Jun 15 16:09:29 PDT 2014


 TODO                                        |    5 -----
 man/systemd.mount.xml                       |   15 +++++++++++++++
 src/core/dbus-mount.c                       |    1 +
 src/core/load-fragment-gperf.gperf.m4       |    1 +
 src/core/mount.c                            |    3 +++
 src/core/mount.h                            |    2 ++
 tmpfiles.d/etc.conf                         |    1 +
 units/systemd-sysusers.service.in           |    2 +-
 units/systemd-tmpfiles-setup-dev.service.in |    4 +++-
 9 files changed, 27 insertions(+), 7 deletions(-)

New commits:
commit 4997cb9e16c14cda41a415412c6bd40849ef18ac
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 16 01:03:38 2014 +0200

    update TODO

diff --git a/TODO b/TODO
index b20a66f..774cdd8 100644
--- a/TODO
+++ b/TODO
@@ -460,9 +460,6 @@ Features:
 
 * make timer units go away after they elapsed
 
-* http://lists.freedesktop.org/archives/systemd-devel/2012-September/006502.html
-  (network and remote-fs on shutdown)
-
 * come up with a nice way to write queue/read_ahead_kb for a block device without interfering with readahead
 
 * move PID 1 segfaults to /var/lib/systemd/coredump?
@@ -584,8 +581,6 @@ Features:
   - readahead: when bumping /sys readahead variable save mtime and compare later to detect changes
   - readahead: make use of EXT4_IOC_MOVE_EXT, as used by http://e4rat.sourceforge.net/
 
-* add support for /bin/mount -s
-
 * GC unreferenced jobs (such as .device jobs)
 
 * write blog stories about:

commit 2dbd4a9454f127f600e5764b7883a472eeb32be0
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 16 01:02:27 2014 +0200

    mount: add new SloppyOptions= setting for mount units, mapping to mount(8)'s "-s" switch

diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
index 657cf11..2fbad37 100644
--- a/man/systemd.mount.xml
+++ b/man/systemd.mount.xml
@@ -251,6 +251,21 @@
                         </varlistentry>
 
                         <varlistentry>
+                                <term><varname>SloppyOptions=</varname></term>
+
+                                <listitem><para>Takes a boolean
+                                argument. If true parsing of the
+                                options specified in
+                                <varname>Options=</varname> is
+                                relaxed, and unknown mount options are
+                                tolerated. This corresponds with
+                                <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>'s
+                                <parameter>-s</parameter>
+                                switch. Defaults to
+                                off.</para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
                                 <term><varname>DirectoryMode=</varname></term>
                                 <listitem><para>Directories of mount
                                 points (and any parent directories)
diff --git a/src/core/dbus-mount.c b/src/core/dbus-mount.c
index e27019d..53fe4ed 100644
--- a/src/core/dbus-mount.c
+++ b/src/core/dbus-mount.c
@@ -117,6 +117,7 @@ const sd_bus_vtable bus_mount_vtable[] = {
         SD_BUS_PROPERTY("TimeoutUSec", "t", bus_property_get_usec, offsetof(Mount, timeout_usec), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("ControlPID", "u", bus_property_get_pid, offsetof(Mount, control_pid), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("DirectoryMode", "u", bus_property_get_mode, offsetof(Mount, directory_mode), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("SloppyOptions", "b", bus_property_get_bool, offsetof(Mount, sloppy_options), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Result", "s", property_get_result, offsetof(Mount, result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         BUS_EXEC_COMMAND_VTABLE("ExecMount", offsetof(Mount, exec_command[MOUNT_EXEC_MOUNT]), SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION),
         BUS_EXEC_COMMAND_VTABLE("ExecUnmount", offsetof(Mount, exec_command[MOUNT_EXEC_UNMOUNT]), SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION),
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
index d97c5c6..3471ccb 100644
--- a/src/core/load-fragment-gperf.gperf.m4
+++ b/src/core/load-fragment-gperf.gperf.m4
@@ -274,6 +274,7 @@ Mount.Options,                   config_parse_string,                0,
 Mount.Type,                      config_parse_string,                0,                             offsetof(Mount, parameters_fragment.fstype)
 Mount.TimeoutSec,                config_parse_sec,                   0,                             offsetof(Mount, timeout_usec)
 Mount.DirectoryMode,             config_parse_mode,                  0,                             offsetof(Mount, directory_mode)
+Mount.SloppyOptions,             config_parse_bool,                  0,                             offsetof(Mount, sloppy_options)
 EXEC_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
diff --git a/src/core/mount.c b/src/core/mount.c
index ca21ec7..aea2ab1 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -935,7 +935,7 @@ static void mount_enter_mounting(Mount *m) {
                 r = exec_command_set(
                                 m->control_command,
                                 "/bin/mount",
-                                "-n",
+                                m->sloppy_options ? "-ns" : "-n",
                                 m->parameters_fragment.what,
                                 m->where,
                                 "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
@@ -983,7 +983,7 @@ static void mount_enter_remounting(Mount *m) {
                 r = exec_command_set(
                                 m->control_command,
                                 "/bin/mount",
-                                "-n",
+                                m->sloppy_options ? "-ns" : "-n",
                                 m->parameters_fragment.what,
                                 m->where,
                                 "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
diff --git a/src/core/mount.h b/src/core/mount.h
index a53423c..2dcb663 100644
--- a/src/core/mount.h
+++ b/src/core/mount.h
@@ -88,6 +88,8 @@ struct Mount {
         bool just_mounted:1;
         bool just_changed:1;
 
+        bool sloppy_options;
+
         MountResult result;
         MountResult reload_result;
 

commit 8eb5a6e001afd3da22fe4c16fe786a362d46733e
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 16 00:53:02 2014 +0200

    mount: tell /bin/mount to never touch /etc/mtab
    
    /etc/mtab should die die die. It's sad enough util-linux still contains
    support for it, but we don't have to partake in that charade, so let's
    turn this off.
    
    This is in-line with the fact that since years we already have been
    "tainting" systemd if we detect /etc/mtab not being a symlink...
    
    Of course, util-linux is currently broken, and still touches /etc/mtab,
    weven if we pass "--no-mtab" to it:
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1109367
    
    But hey, let's hope that gets fixed quickly, even if total removal of
    /etc/mtab support from util-linux might not happen so quickly...

diff --git a/src/core/mount.c b/src/core/mount.c
index 14ac0a0..ca21ec7 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -892,6 +892,7 @@ static void mount_enter_unmounting(Mount *m) {
         if ((r = exec_command_set(
                              m->control_command,
                              "/bin/umount",
+                             "-n",
                              m->where,
                              NULL)) < 0)
                 goto fail;
@@ -934,6 +935,7 @@ static void mount_enter_mounting(Mount *m) {
                 r = exec_command_set(
                                 m->control_command,
                                 "/bin/mount",
+                                "-n",
                                 m->parameters_fragment.what,
                                 m->where,
                                 "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
@@ -981,6 +983,7 @@ static void mount_enter_remounting(Mount *m) {
                 r = exec_command_set(
                                 m->control_command,
                                 "/bin/mount",
+                                "-n",
                                 m->parameters_fragment.what,
                                 m->where,
                                 "-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",

commit 2db7648aa8bc9a31342d82a3fa0e63664cae5431
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Jun 15 23:42:53 2014 +0200

    units: bring systemd-tmpfiles-setup-dev.service closer to systemd-tmpfiles-setup.service
    
    Among other things, order both services relative to
    systemd-sysusers.service in the same direction.

diff --git a/units/systemd-sysusers.service.in b/units/systemd-sysusers.service.in
index cd65cc8..a4c7714 100644
--- a/units/systemd-sysusers.service.in
+++ b/units/systemd-sysusers.service.in
@@ -11,7 +11,7 @@ Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
 After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
-Before=sysinit.target shutdown.target systemd-tmpfiles-setup-dev.service systemd-update-done.service
+Before=sysinit.target shutdown.target systemd-update-done.service
 RefuseManualStart=yes
 RefuseManualStop=yes
 ConditionNeedsUpdate=/etc
diff --git a/units/systemd-tmpfiles-setup-dev.service.in b/units/systemd-tmpfiles-setup-dev.service.in
index 05b60a1..b9cfc53 100644
--- a/units/systemd-tmpfiles-setup-dev.service.in
+++ b/units/systemd-tmpfiles-setup-dev.service.in
@@ -9,7 +9,9 @@
 Description=Create Static Device Nodes in /dev
 Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
 DefaultDependencies=no
-Before=sysinit.target local-fs-pre.target systemd-udevd.service
+Conflicts=shutdown.target
+After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-sysusers.service
+Before=sysinit.target local-fs-pre.target systemd-udevd.service shutdown.target
 ConditionCapability=CAP_MKNOD
 
 [Service]

commit d4c6d50a2adfe61c21c5ac5598a301a35b10ef1c
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Jun 15 23:39:00 2014 +0200

    tmpfiles: create /etc/resolv.conf as link to networkd's version, if it doesn't exist
    
    If /etc/resolv.conf doesn't exist it's better than nothing to make it
    point to networkd's version.

diff --git a/tmpfiles.d/etc.conf b/tmpfiles.d/etc.conf
index 37a2ef8..1294c94 100644
--- a/tmpfiles.d/etc.conf
+++ b/tmpfiles.d/etc.conf
@@ -10,3 +10,4 @@
 L /etc/os-release - - - - ../usr/lib/os-release
 L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
 L /etc/mtab - - - - ../proc/self/mounts
+L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf



More information about the systemd-commits mailing list