Control: forwarded -1 https://bugs.freedesktop.org/show_bug.cgi?id=86707
Control: patch -1

Hello,

I have explain what was happening on my case in this issue. I make a
patch which is attached at upstream bug
https://bugs.freedesktop.org/show_bug.cgi?id=86707 , and again
attached to this message.

I hope this patch can be applied to Debian while upstream decide if
apply or not.

Thank you very much
--- systemd-orig/systemd-215/src/fstab-generator/fstab-generator.c	2014-11-23 23:57:32.000000000 +0100
+++ systemd-215/src/fstab-generator/fstab-generator.c	2014-11-25 17:18:02.793718176 +0100
@@ -172,6 +172,7 @@
                 bool noauto,
                 bool nofail,
                 bool automount,
+                const char *pre,
                 const char *post,
                 const char *source) {
 
@@ -230,6 +231,11 @@
                 "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
                 source);
 
+        if (pre && !noauto && !nofail && !automount) {
+                fprintf(f, "Requires=%s\n", pre);
+                fprintf(f, "After=%s\n", pre);
+        }
+
         if (post && !noauto && !nofail && !automount)
                 fprintf(f, "Before=%s\n", post);
 
@@ -375,6 +381,7 @@
                 else {
                         bool noauto, nofail, automount;
                         const char *post;
+                        _cleanup_free_ const char *pre = NULL;
 
                         noauto = !!hasmntopt(me, "noauto");
                         nofail = !!hasmntopt(me, "nofail");
@@ -386,8 +393,10 @@
                                 post = SPECIAL_INITRD_FS_TARGET;
                         else if (mount_in_initrd(me))
                                 post = SPECIAL_INITRD_ROOT_FS_TARGET;
-                        else if (mount_is_network(me))
+                        else if (mount_is_network(me)) {
                                 post = SPECIAL_REMOTE_FS_TARGET;
+                                pre = SPECIAL_NETWORK_ONLINE_TARGET;
+			}
                         else
                                 post = SPECIAL_LOCAL_FS_TARGET;
 
@@ -399,6 +408,7 @@
                                       noauto,
                                       nofail,
                                       automount,
+                                      pre,
                                       post,
                                       fstab_path);
                 }
@@ -443,6 +453,7 @@
                          false,
                          false,
                          false,
+                         NULL,
                          SPECIAL_INITRD_ROOT_FS_TARGET,
                          "/proc/cmdline");
 }

Reply via email to