Otherwise it would succeed silently when we KNOW it would fail, which is not cool.
Usually this means you didn't build switch_root in your dracut checkout and you used dracut -l.
(This currently cannot be done in a check script, because of the current design of check.
Andreas intends on discussing a redesign on the list.)
[ -e "${initdir}/bin/sh" ] || (ln -s bash "${initdir}/bin/sh" || :)
# install our scripts and hooks
inst "$moddir/init" "/init"
+# Bail out if switch_root does not exist
+if [ ! -x "$moddir/switch_root" ]; then
+ derror "ERROR: $moddir/switch_root does not exist."
+ exit 1
+fi
inst "$moddir/switch_root" "/sbin/switch_root"
inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh"