summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-03-29 21:26:39 -0700
committerWilliam A. Kennington III <william@wkennington.com>2015-03-29 21:26:39 -0700
commit6b3cf366d7a6f660797b171fe9339f0ca9576632 (patch)
treeced363adb836fd7ad0b2fd066ff48af164a53095 /nixos/modules/system
parent0ff1fcf1f111b0044f5d14db494aa1c1b0b2c517 (diff)
downloadnixlib-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar
nixlib-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.gz
nixlib-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.bz2
nixlib-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.lz
nixlib-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.xz
nixlib-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.zst
nixlib-6b3cf366d7a6f660797b171fe9339f0ca9576632.zip
nixos/initrd: Allow overriding of binaries
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/stage-1.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 0bf5a2f3c80c..47d6dd2bf54b 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -43,7 +43,7 @@ let
       cp -pv ${pkgs.glibc}/lib/ld*.so.? $out/lib
 
       copy_bin_and_libs () {
-        [ -f "$out/bin/$(basename $1)" ] && return 0
+        [ -f "$out/bin/$(basename $1)" ] && rm "$out/bin/$(basename $1)"
         cp -pdv $1 $out/bin
         LDD="$(ldd $1)" || return 0
         LIBS="$(echo "$LDD" | awk '{print $3}' | sed '/^$/d')"
@@ -110,11 +110,11 @@ let
       echo "testing patched programs..."
       $out/bin/ash -c 'echo hello world' | grep "hello world"
       export LD_LIBRARY_PATH=$out/lib
-      $out/bin/mount --help 2>&1 | grep "BusyBox"
-      $out/bin/blkid >/dev/null
+      $out/bin/mount --help 2>&1 | grep -q "BusyBox"
+      $out/bin/blkid --help 2>&1 | grep -q 'libblkid'
       $out/bin/udevadm --version
-      $out/bin/dmsetup --version 2>&1 | tee -a log | grep "version:"
-      LVM_SYSTEM_DIR=$out $out/bin/lvm version 2>&1 | tee -a log | grep "LVM"
+      $out/bin/dmsetup --version 2>&1 | tee -a log | grep -q "version:"
+      LVM_SYSTEM_DIR=$out $out/bin/lvm version 2>&1 | tee -a log | grep -q "LVM"
       $out/bin/mdadm --version
 
       ${config.boot.initrd.extraUtilsCommandsTest}