mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
nixos/initrd: Allow overriding of binaries
This commit is contained in:
parent
0ff1fcf1f1
commit
6b3cf366d7
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user