nixos/sd-image: explicit reference to the gawk package

The `awk` command is not installed in the standard env. So this command fails if the `awk` command is not installed by some external module.
This commit is contained in:
Matej Urbas 2020-12-12 15:23:04 +00:00
parent e9158eca70
commit aa38540423

View file

@ -223,7 +223,7 @@ in
# Figure out device names for the boot device and root filesystem.
rootPart=$(${pkgs.util-linux}/bin/findmnt -n -o SOURCE /)
bootDevice=$(lsblk -npo PKNAME $rootPart)
partNum=$(lsblk -npo MAJ:MIN $rootPart | awk -F: '{print $2}')
partNum=$(lsblk -npo MAJ:MIN $rootPart | ${pkgs.gawk}/bin/awk -F: '{print $2}')
# Resize the root partition and the filesystem to fit the disk
echo ",+," | sfdisk -N$partNum --no-reread $bootDevice