#!/bin/bash type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh # $NEWROOT if [ -e "/etc/fstab" ]; then echo "Copying /etc/fstab from initrd" cp -f "/etc/fstab" "$NEWROOT/etc/fstab" || exit 1 elif ! [ -e "$NEWROOT/etc/fstab.keep" ] && ! grep -qF 'NODELETE' "$NEWROOT/etc/fstab"; then echo "Wiping stage4 fstab" echo "" > "$NEWROOT/etc/fstab" || exit 1 else echo "Keeping stage4 fstab untouched" fi exit 0