From: Paul Hänsch Date: Thu, 30 Dec 2021 14:30:51 +0000 (+0100) Subject: fstab entries for btrfs target X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=14d297bd587064f94b787abc48c2185f17292f2f;p=blast fstab entries for btrfs target --- diff --git a/modules/default.mk b/modules/default.mk index ceb91ff..bb4f432 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -139,3 +139,27 @@ ifdef wifi printf ' wireless-essid "%s"\n' "$$wifi" >>$@ endif endif + +.PHONY: _fstab + +ifdef _fstab + _config: ${CFGROOT}/etc/fstab + export _fstab + +else + ifdef fsuuid + define _fstab := +UUID=${fsuuid} / btrfs auto,rw,subvol=${release} 0 0 +UUID=${fsuuid} /home btrfs auto,nofail,rw,subvol=home 0 0 +UUID=${fsuuid} /mnt/fsroot btrfs auto,nofail,rw 0 0 +LABEL=SWAP swap swap auto,nofail,sw 0 0 +LABEL=EFIBOOT /boot/efi vfat auto,nofail,ro 0 0 +endef + _config: ${CFGROOT}/etc/fstab + export _fstab + + endif +endif + +${CFGROOT}/etc/fstab: ${CFGROOT} + printf '%s' "$${_fstab}" >"$@"