From: Lennart Poettering Date: Mon, 18 May 2020 16:37:02 +0000 (+0200) Subject: cryptsetup-generator: use systemd-makefs for implementation of "swap" and "tmp" options X-Git-Tag: v246-rc1~336^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db2c56b0dd28f271dd3fe53691b21484f72586e4;p=thirdparty%2Fsystemd.git cryptsetup-generator: use systemd-makefs for implementation of "swap" and "tmp" options This way we can take benefit of the correct block device locking we just added. I was thinking whether to instead pull in a regular systemd-makefs@.service instance, but I couldn't come up with a reason to, and thus opted for just doing the minimal patch and just replacing the simply mkfs calls. Fixes: #10179 Replaces: #13162 --- diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 20c752d88db..5724f88d0a4 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -367,12 +367,12 @@ static int create_disk( if (tmp) fprintf(f, - "ExecStartPost=/sbin/mke2fs '/dev/mapper/%s'\n", + "ExecStartPost=" ROOTLIBEXECDIR "/systemd-makefs ext2 '/dev/mapper/%s'\n", name_escaped); if (swap) fprintf(f, - "ExecStartPost=/sbin/mkswap '/dev/mapper/%s'\n", + "ExecStartPost=" ROOTLIBEXECDIR "/systemd-makefs swap '/dev/mapper/%s'\n", name_escaped); if (keydev)