Process substitution in initramfs does not work
843f13f9 changed hooks/resume
to use process substitution, but without /dev/fd
it does not work in busybox ash.
/run/initramfs/init.log
shows:
+ '[' -e /sys/power/resume ]
/init: line 31: can't open /dev/fd/64: no such file
+ printf '%d:%d'
ash: invalid number ''
ash: invalid number ''
This can be fixed by adding a /dev/fd
→/proc/self/fd
symlink to mount_setup
in init_functions
. E.g.:
diff --git a/init_functions b/init_functions
index caf1bf1..13aec2b 100644
--- a/init_functions
+++ b/init_functions
@@ -516,6 +516,7 @@ mount_setup() {
mount -t devtmpfs dev /dev -o mode=0755,nosuid
mount -t tmpfs run /run -o nosuid,nodev,mode=0755
mkdir -m755 /run/initramfs
+ ln -sfT /proc/self/fd /dev/fd
if [ -e /sys/firmware/efi ]; then
mount -t efivarfs efivarfs /sys/firmware/efi/efivars -o nosuid,nodev,noexec