mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #3863 from wkennington/master.grubfix
Fix perl indentation
This commit is contained in:
commit
032e93b9ab
2 changed files with 16 additions and 16 deletions
|
@ -344,19 +344,19 @@ EOF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Is this a btrfs filesystem?
|
# Is this a btrfs filesystem?
|
||||||
if ($fsType eq "btrfs") {
|
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) {
|
if ($status != 0) {
|
||||||
die "Failed to retreive subvolume info for $mountPoint";
|
die "Failed to retreive subvolume info for $mountPoint";
|
||||||
}
|
}
|
||||||
my @subvols = join("", @info) =~ m/Name:[ \t\n]*([^ \t\n]*)/;
|
my @subvols = join("", @info) =~ m/Name:[ \t\n]*([^ \t\n]*)/;
|
||||||
if ($#subvols > 0) {
|
if ($#subvols > 0) {
|
||||||
die "Btrfs subvol name for $mountPoint listed multiple times in mount\n"
|
die "Btrfs subvol name for $mountPoint listed multiple times in mount\n"
|
||||||
} elsif ($#subvols == 0) {
|
} elsif ($#subvols == 0) {
|
||||||
push @extraOptions, "subvol=$subvols[0]";
|
push @extraOptions, "subvol=$subvols[0]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Emit the filesystem.
|
# Emit the filesystem.
|
||||||
$fileSystems .= <<EOF;
|
$fileSystems .= <<EOF;
|
||||||
|
|
|
@ -158,7 +158,7 @@ my $grubStore = GrubFs("/nix");
|
||||||
|
|
||||||
# We don't need to copy if we can read the kernels directly
|
# We don't need to copy if we can read the kernels directly
|
||||||
if ($grubStore->search ne "") {
|
if ($grubStore->search ne "") {
|
||||||
$copyKernels = 0;
|
$copyKernels = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate the header.
|
# Generate the header.
|
||||||
|
@ -275,8 +275,8 @@ sub addEntry {
|
||||||
$conf .= " " . ($xen ? "module" : "initrd") . " $initrd\n\n";
|
$conf .= " " . ($xen ? "module" : "initrd") . " $initrd\n\n";
|
||||||
} else {
|
} else {
|
||||||
$conf .= "menuentry \"$name\" {\n";
|
$conf .= "menuentry \"$name\" {\n";
|
||||||
$conf .= $grubBoot->search . "\n";
|
$conf .= $grubBoot->search . "\n";
|
||||||
$conf .= $grubStore->search . "\n";
|
$conf .= $grubStore->search . "\n";
|
||||||
$conf .= " $extraPerEntryConfig\n" if $extraPerEntryConfig;
|
$conf .= " $extraPerEntryConfig\n" if $extraPerEntryConfig;
|
||||||
$conf .= " multiboot $xen $xenParams\n" if $xen;
|
$conf .= " multiboot $xen $xenParams\n" if $xen;
|
||||||
$conf .= " " . ($xen ? "module" : "linux") . " $kernel $kernelParams\n";
|
$conf .= " " . ($xen ? "module" : "linux") . " $kernel $kernelParams\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue