diff options
author | William A. Kennington III <william@wkennington.com> | 2014-09-01 00:01:41 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2014-09-02 09:16:13 -0700 |
commit | 961e9867b3e502e66001280c2c7c5f3b08d6e469 (patch) | |
tree | 107f156f7d21aa7dba421cb074b48564c4bd4900 /nixos/modules/system/boot/loader | |
parent | 94679376395b32759c19b2145b684099b6f67471 (diff) | |
download | nixlib-961e9867b3e502e66001280c2c7c5f3b08d6e469.tar nixlib-961e9867b3e502e66001280c2c7c5f3b08d6e469.tar.gz nixlib-961e9867b3e502e66001280c2c7c5f3b08d6e469.tar.bz2 nixlib-961e9867b3e502e66001280c2c7c5f3b08d6e469.tar.lz nixlib-961e9867b3e502e66001280c2c7c5f3b08d6e469.tar.xz nixlib-961e9867b3e502e66001280c2c7c5f3b08d6e469.tar.zst nixlib-961e9867b3e502e66001280c2c7c5f3b08d6e469.zip |
nixos/generate-config: Only add store search path when kernels are not copied
Diffstat (limited to 'nixos/modules/system/boot/loader')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/install-grub.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index 570cd2239b0c..4e196d67e931 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -182,9 +182,12 @@ if ($grubVersion == 1) { } else { + if ($copyKernels == 0) { + $conf .= " + " . $grubStore->search; + } $conf .= " " . $grubBoot->search . " - " . $grubStore->search . " if [ -s \$prefix/grubenv ]; then load_env fi @@ -282,7 +285,9 @@ sub addEntry { } else { $conf .= "menuentry \"$name\" {\n"; $conf .= $grubBoot->search . "\n"; - $conf .= $grubStore->search . "\n"; + if ($copyKernels == 0) { + $conf .= $grubStore->search . "\n"; + } $conf .= " $extraPerEntryConfig\n" if $extraPerEntryConfig; $conf .= " multiboot $xen $xenParams\n" if $xen; $conf .= " " . ($xen ? "module" : "linux") . " $kernel $kernelParams\n"; |