chiark / gitweb /
main: only fall back to /bin/sh in case /sbin/init does not exist
[elogind.git] / src / core / mount.c
index 01e9d78ad52a1ff29ae8abd588e10d900fd7513b..b597e9bfe2232358e8cd080d47413eb09d4d5da9 100644 (file)
@@ -358,7 +358,7 @@ static int mount_add_fstab_links(Mount *m) {
         nofail = !!mount_test_option(p->options, "nofail");
         automount =
                 mount_test_option(p->options, "comment=systemd.automount") ||
-                mount_test_option(p->options, "x-systemd-automount");
+                mount_test_option(p->options, "x-systemd.automount");
 
         if (mount_is_network(p)) {
                 target = SPECIAL_REMOTE_FS_TARGET;
@@ -515,7 +515,7 @@ static int mount_fix_timeouts(Mount *m) {
 
         if ((timeout = mount_test_option(p->options, "comment=systemd.device-timeout")))
                 timeout += 31;
-        else if ((timeout = mount_test_option(p->options, "x-systemd-device-timeout")))
+        else if ((timeout = mount_test_option(p->options, "x-systemd.device-timeout")))
                 timeout += 25;
         else
                 return 0;
@@ -1647,7 +1647,8 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
                         goto clean_up;
                 }
 
-                if (asprintf(&o, "%s,%s", options, options2) < 0) {
+                o = join(options, ",", options2, NULL);
+                if (!o) {
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -1911,7 +1912,6 @@ const UnitVTable mount_vtable = {
 
         .no_alias = true,
         .no_instances = true,
-        .show_status = true,
 
         .init = mount_init,
         .load = mount_load,
@@ -1945,5 +1945,23 @@ const UnitVTable mount_vtable = {
         .bus_invalidating_properties =  bus_mount_invalidating_properties,
 
         .enumerate = mount_enumerate,
-        .shutdown = mount_shutdown
+        .shutdown = mount_shutdown,
+
+        .status_message_formats = {
+                .starting_stopping = {
+                        [0] = "Mounting %s...",
+                        [1] = "Unmounting %s...",
+                },
+                .finished_start_job = {
+                        [JOB_DONE]       = "Mounted %s.",
+                        [JOB_FAILED]     = "Failed to mount %s.",
+                        [JOB_DEPENDENCY] = "Dependency failed for %s.",
+                        [JOB_TIMEOUT]    = "Timed out mounting %s.",
+                },
+                .finished_stop_job = {
+                        [JOB_DONE]       = "Unmounted %s.",
+                        [JOB_FAILED]     = "Failed unmounting %s.",
+                        [JOB_TIMEOUT]    = "Timed out unmounting %s.",
+                },
+        },
 };