return 0;
}
+static int add_partition_root_growfs(DissectedPartition *p) {
+
+ assert(p);
+ assert(!in_initrd());
+
+ /* Invoked on the main system (not initrd), to honour GPT flag 59 on the root fs (growfs) */
+
+ if (!p->growfs) {
+ log_debug("Root partition not marked for growing the file system in the GPT partition table, not generating drop-in for systemd-growfs-root.service.");
+ return 0;
+ }
+
+ return generator_hook_up_growfs(arg_dest, "/", SPECIAL_LOCAL_FS_TARGET);
+}
+
+static int add_partition_root_flags(DissectedPartition *p) {
+ int r = 0;
+
+ assert(p);
+ assert(!in_initrd());
+
+ RET_GATHER(r, add_partition_root_growfs(p));
+ RET_GATHER(r, add_partition_root_rw(p));
+
+ return r;
+}
+
#if ENABLE_EFI
static int add_root_cryptsetup(void) {
#if HAVE_LIBCRYPTSETUP
return r;
}
- /* Note that we do not need to enable systemd-remount-fs.service here. If
- * /etc/fstab exists, systemd-fstab-generator will pull it in for us. */
+ /* Note that we do not need to enable systemd-remount-fs.service here. If /etc/fstab exists,
+ * systemd-fstab-generator will pull it in for us, and otherwise add_partition_root_flags() will do
+ * it, after the initrd transition. */
r = partition_pick_mount_options(
PARTITION_ROOT,
"var-tmp", "/var/tmp", "Temporary Data Partition"));
if (m->partitions[PARTITION_ROOT].found)
- RET_GATHER(r, add_partition_root_rw(m->partitions + PARTITION_ROOT));
+ RET_GATHER(r, add_partition_root_flags(m->partitions + PARTITION_ROOT));
return r;
}