Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/etc/setup.d/20copyfiles b/etc/setup.d/20copyfiles 2index 3247ae2a..eed9fa46 100755 3--- a/etc/setup.d/20copyfiles 4+++ b/etc/setup.d/20copyfiles 5@@ -39,9 +39,9 @@ copy_file() 6 if [ -e "$2" ]; then 7 8 # Device and inode 9- da=$(/usr/bin/stat --format="%d %i" "$1") 10+ da=$(stat --format="%d %i" "$1") 11 # This one can fail since it might not exist yet 12- db=$(/usr/bin/stat --format="%d %i" "$2" 2>/dev/null || :) 13+ db=$(stat --format="%d %i" "$2" 2>/dev/null || :) 14 15 if [ "$da" = "$db" ]; then 16 COPY="false" 17@@ -50,8 +50,8 @@ copy_file() 18 : 19 elif [ -f "$1" ] && [ -f "$2" ]; then 20 # Content 21- ca=$(/usr/bin/md5sum "$1" | sed -e 's/\(^[0-9a-f][0-9a-f]*\).*$/\1/') 22- cb=$(/usr/bin/md5sum "$2" 2>/dev/null || :) 23+ ca=$(md5sum "$1" | sed -e 's/\(^[0-9a-f][0-9a-f]*\).*$/\1/') 24+ cb=$(md5sum "$2" 2>/dev/null || :) 25 cb=$(echo "$cb" | sed -e 's/\(^[0-9a-f][0-9a-f]*\).*$/\1/') 26 # Copy only if file contents differ 27 if [ "$ca" = "$cb" ]; then 28diff --git a/etc/setup.d/20nssdatabases b/etc/setup.d/20nssdatabases 29index ac7206b7..00645362 100755 30--- a/etc/setup.d/20nssdatabases 31+++ b/etc/setup.d/20nssdatabases 32@@ -42,9 +42,9 @@ if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then 33 fi 34 35 # Device and inode 36- dr=$(/usr/bin/stat --format="%d %i" "/etc/$db") 37+ dr=$(stat --format="%d %i" "/etc/$db") 38 # This one can fail since it might not exist yet 39- dc=$(/usr/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :) 40+ dc=$(stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :) 41 42 # If the database inside and outside the chroot is the 43 # same, it's very likely that dup_nss would blank the