diff options
author | William A. Kennington III <william@wkennington.com> | 2015-03-29 21:26:39 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-03-29 21:26:39 -0700 |
commit | 6b3cf366d7a6f660797b171fe9339f0ca9576632 (patch) | |
tree | ced363adb836fd7ad0b2fd066ff48af164a53095 /nixos/modules/system | |
parent | 0ff1fcf1f111b0044f5d14db494aa1c1b0b2c517 (diff) | |
download | nixpkgs-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar nixpkgs-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.gz nixpkgs-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.bz2 nixpkgs-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.lz nixpkgs-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.xz nixpkgs-6b3cf366d7a6f660797b171fe9339f0ca9576632.tar.zst nixpkgs-6b3cf366d7a6f660797b171fe9339f0ca9576632.zip |
nixos/initrd: Allow overriding of binaries
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 10 |
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 0bf5a2f3c80..47d6dd2bf54 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} |