]> git.pld-linux.org Git - packages/systemd.git/blobdiff - pld-boot_efi_mount.patch
- up to 215
[packages/systemd.git] / pld-boot_efi_mount.patch
index f7f900c4b1610625236652b4060995423d43b2ef..cd7e6b40c8eafbbdc063c0e0b58fc7a3d48cdb98 100644 (file)
@@ -1,55 +1,69 @@
-diff -dur systemd-208.orig/src/efi-boot-generator/efi-boot-generator.c systemd-208/src/efi-boot-generator/efi-boot-generator.c
---- systemd-208.orig/src/efi-boot-generator/efi-boot-generator.c       2013-09-25 03:38:17.000000000 +0200
-+++ systemd-208/src/efi-boot-generator/efi-boot-generator.c    2014-01-22 21:05:38.281137494 +0100
-@@ -52,7 +52,7 @@
-         if (!is_efi_boot())
+--- systemd-215/src/efi-boot-generator/efi-boot-generator.c.orig       2014-03-18 18:05:49.801378306 +0100
++++ systemd-215/src/efi-boot-generator/efi-boot-generator.c    2014-07-11 11:44:46.017114762 +0200
+@@ -69,9 +69,9 @@ int main(int argc, char *argv[]) {
                  return EXIT_SUCCESS;
+         }
  
--        if (dir_is_empty("/boot") <= 0)
-+        if (dir_is_empty("/boot/efi") <= 0)
+-        if (path_is_mount_point("/boot", true) <= 0 &&
+-            dir_is_empty("/boot") <= 0) {
+-                log_debug("/boot already populated, exiting.");
++        if (path_is_mount_point("/boot/efi", true) <= 0 &&
++            dir_is_empty("/boot/efi") <= 0) {
++                log_debug("/boot/efi already populated, exiting.");
                  return EXIT_SUCCESS;
+         }
  
-         r = efi_loader_get_device_part_uuid(&id);
-@@ -63,7 +63,7 @@
+@@ -84,7 +84,7 @@ int main(int argc, char *argv[]) {
                  return EXIT_FAILURE;
          }
  
--        name = strjoin(arg_dest, "/boot.mount", NULL);
-+        name = strjoin(arg_dest, "/boot-efi.mount", NULL);
-         if (!name) {
-                 log_oom();
+-        name = strappenda(arg_dest, "/boot.mount");
++        name = strappenda(arg_dest, "/boot-efi.mount");
+         f = fopen(name, "wxe");
+         if (!f) {
+                 log_error("Failed to create mount unit file %s: %m", name);
+@@ -105,7 +105,7 @@ int main(int argc, char *argv[]) {
+                 "Description=EFI System Partition\n"
+                 "Documentation=man:systemd-efi-boot-generator(8)\n");
+-        r = generator_write_fsck_deps(f, arg_dest, what, "/boot", "vfat");
++        r = generator_write_fsck_deps(f, arg_dest, what, "/boot/efi", "vfat");
+         if (r < 0)
                  return EXIT_FAILURE;
-@@ -80,13 +80,13 @@
-                 "[Unit]\n"
-                 "Description=EFI System Partition\n\n"
+@@ -113,7 +113,7 @@ int main(int argc, char *argv[]) {
+                 "\n"
                  "[Mount]\n"
+                 "What=%s\n"
 -                "Where=/boot\n"
 +                "Where=/boot/efi\n"
-                 "What=/dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n"
-                 "Options=umask=0077\n",
-                 SD_ID128_FORMAT_VAL(id));
-         free(name);
--        name = strjoin(arg_dest, "/boot.automount", NULL);
-+        name = strjoin(arg_dest, "/boot-efi.automount", NULL);
-         if (!name) {
-                 log_oom();
+                 "Type=vfat\n"
+                 "Options=umask=0077,noauto\n",
+                 what);
+@@ -124,7 +124,7 @@ int main(int argc, char *argv[]) {
                  return EXIT_FAILURE;
-@@ -103,10 +103,10 @@
+         }
+-        name = strappenda(arg_dest, "/boot.automount");
++        name = strappenda(arg_dest, "/boot-efi.automount");
+         fclose(f);
+         f = fopen(name, "wxe");
+         if (!f) {
+@@ -136,7 +136,7 @@ int main(int argc, char *argv[]) {
                "[Unit]\n"
                "Description=EFI System Partition Automount\n\n"
                "[Automount]\n"
 -              "Where=/boot\n", f);
 +              "Where=/boot/efi\n", f);
  
-         free(name);
--        name = strjoin(arg_dest, "/local-fs.target.wants/boot.automount", NULL);
-+        name = strjoin(arg_dest, "/local-fs.target.wants/boot-efi.automount", NULL);
-         if (!name) {
-                 log_oom();
+         fflush(f);
+         if (ferror(f)) {
+@@ -144,10 +144,10 @@ int main(int argc, char *argv[]) {
                  return EXIT_FAILURE;
-@@ -114,7 +114,7 @@
+         }
  
+-        name = strappenda(arg_dest, "/" SPECIAL_LOCAL_FS_TARGET ".wants/boot.automount");
++        name = strappenda(arg_dest, "/" SPECIAL_LOCAL_FS_TARGET ".wants/boot-efi.automount");
          mkdir_parents(name, 0755);
  
 -        if (symlink("../boot.automount", name) < 0) {
This page took 0.407222 seconds and 4 git commands to generate.