Browse Source

Abort if switch_root does not exist.

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.)
master
Warren Togami 16 years ago
parent
commit
7ee170746f
  1. 5
      modules.d/99base/install

5
modules.d/99base/install

@ -3,5 +3,10 @@ dracut_install mount mknod mkdir modprobe pidof sleep chroot echo sed bash ls fl @@ -3,5 +3,10 @@ dracut_install mount mknod mkdir modprobe pidof sleep chroot echo sed bash ls fl
[ -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"

Loading…
Cancel
Save