Ensure /run survives switch_root not only systemd enabled initramfs,
but initramfs without systemd.
This change makes systemd and non-systemd initramfs behaves similarly.
This change also enables the newly added test case for hooks to pass
on the busybox CI container.
This PR has no impact on systemd enabled initramfs.
- '11'
- '12'
- '13'
+ - '14'
- '20'
- '26'
- '50'
NEWRUN=/dev/.initramfs
mkdir -m 0755 -p "$NEWRUN"
mount --rbind /run/initramfs "$NEWRUN"
+else
+ mount --move /run "$NEWROOT"/run
fi
wait_for_loginit