mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
nixos/nixos-generate-config: fix proram path replacements
btrfs-progs was made optional in 2019 c01ea27ce3
because it didn't cross-compile. it now does
This commit is contained in:
parent
b2eacd1595
commit
aaf13bb3bd
2 changed files with 5 additions and 4 deletions
|
@ -279,7 +279,7 @@ if (`lsblk -o TYPE` =~ "lvm") {
|
|||
push @initrdKernelModules, "dm-snapshot";
|
||||
}
|
||||
|
||||
my $virt = `systemd-detect-virt`;
|
||||
my $virt = `@detectvirt@`;
|
||||
chomp $virt;
|
||||
|
||||
|
||||
|
@ -398,7 +398,7 @@ foreach my $fs (read_file("/proc/self/mountinfo")) {
|
|||
# Maybe this is a bind-mount of a filesystem we saw earlier?
|
||||
if (defined $fsByDev{$fields[2]}) {
|
||||
# Make sure this isn't a btrfs subvolume.
|
||||
my $msg = `btrfs subvol show $rootDir$mountPoint`;
|
||||
my $msg = `@btrfs@ subvol show $rootDir$mountPoint`;
|
||||
if ($? != 0 || $msg =~ /ERROR:/s) {
|
||||
my $path = $fields[3]; $path = "" if $path eq "/";
|
||||
my $base = $fsByDev{$fields[2]};
|
||||
|
@ -436,7 +436,7 @@ EOF
|
|||
|
||||
# Is this a btrfs filesystem?
|
||||
if ($fsType eq "btrfs") {
|
||||
my ($status, @info) = runCommand("btrfs subvol show $rootDir$mountPoint");
|
||||
my ($status, @info) = runCommand("@btrfs@ subvol show $rootDir$mountPoint");
|
||||
if ($status != 0 || join("", @info) =~ /ERROR:/) {
|
||||
die "Failed to retrieve subvolume info for $mountPoint\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue