X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/05a1b863a66bf72b26e5d87570c4e0e61b9736cd..049048046762d88a11605ede8c6049c1965f017a:/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh?ds=sidebyside diff --git a/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh b/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh index 6bb0664..705582b 100644 --- a/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh @@ -19,11 +19,21 @@ . $VTOY_PATH/hook/ventoy-os-lib.sh -ventoy_systemd_udevd_work_around +#ventoy_systemd_udevd_work_around +#ventoy_add_udev_rule "$VTOY_PATH/hook/default/udev_disk_hook.sh %k noreplace" -ventoy_add_udev_rule "$VTOY_PATH/hook/default/udev_disk_hook.sh %k noreplace" +if $GREP -q 'root=live' /proc/cmdline; then + $SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE root=live:/dev/dm-0#" -i /lib/dracut-lib.sh +else + $SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE inst.stage2=hd:/dev/dm-0#" -i /lib/dracut-lib.sh +fi + +ventoy_set_inotify_script rhel7/ventoy-inotifyd-hook.sh + +$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/rhel7/ventoy-inotifyd-start.sh /lib/dracut/hooks/pre-udev/01-ventoy-inotifyd-start.sh # suppress write protected mount warning if [ -e /usr/sbin/anaconda-diskroot ]; then $SED 's/^mount $dev $repodir/mount -oro $dev $repodir/' -i /usr/sbin/anaconda-diskroot fi +