diff options
author | William A. Kennington III <william@wkennington.com> | 2014-04-30 16:51:34 -0500 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2014-08-28 13:35:35 -0700 |
commit | 70c11772a69dad8f414366f1bce511282853a80b (patch) | |
tree | e1ddd09041c294c7f2df0e1829225f1480c7d447 /nixos | |
parent | a6e6c85f06395a92062eb31753a8dd8f3b7e733c (diff) | |
download | nixlib-70c11772a69dad8f414366f1bce511282853a80b.tar nixlib-70c11772a69dad8f414366f1bce511282853a80b.tar.gz nixlib-70c11772a69dad8f414366f1bce511282853a80b.tar.bz2 nixlib-70c11772a69dad8f414366f1bce511282853a80b.tar.lz nixlib-70c11772a69dad8f414366f1bce511282853a80b.tar.xz nixlib-70c11772a69dad8f414366f1bce511282853a80b.tar.zst nixlib-70c11772a69dad8f414366f1bce511282853a80b.zip |
nixos/grub: Fix some silly perl struct accesses
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/install-grub.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index 814ae7e05f7c..64151a282f16 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -89,7 +89,7 @@ sub GrubFs { $path = "/" . substr($fs->device, $sid) . "/@" . $path; } } else { - my $idCmd = "\$(blkid -o export $fs->device) 2>/dev/null; echo" + my $idCmd = "\$(blkid -o export " . $fs->device . ") 2>/dev/null; echo" switch ($fsIdentifier) { case "uuid" { $search = "--fs-uuid " . `$idCmd \$UUID`; @@ -112,9 +112,9 @@ sub GrubFs { } } if ($fs->type eq "btrfs") { - $subvol = `mount | sed -n 's,^$fs->device on .*subvol=\([^,)]*\).*$,\1,p'` + $subvol = `mount | sed -n 's,^@{[$fs->device]} on .*subvol=\([^,)]*\).*\$,\1,p'` if ($subvol eq "") { - $subvol = `btrfs subvol get-default $fs->mount | sed -n 's,^.*path \([^ ]*\) .*$,\1,p'` + $subvol = `btrfs subvol get-default @{[$fs->mount]} | sed -n 's,^.*path \([^ ]*\) .*\$,\1,p'` } $path = "/$subvol"; } |