X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/05a1b863a66bf72b26e5d87570c4e0e61b9736cd..fc5cd0a00a6745d7a8ce31bfadd76e8d064e18a1:/IMG/cpio/ventoy/hook/rhel6/udev_disk_hook.sh diff --git a/IMG/cpio/ventoy/hook/rhel6/udev_disk_hook.sh b/IMG/cpio/ventoy/hook/rhel6/udev_disk_hook.sh index 388c92c..a1954ce 100644 --- a/IMG/cpio/ventoy/hook/rhel6/udev_disk_hook.sh +++ b/IMG/cpio/ventoy/hook/rhel6/udev_disk_hook.sh @@ -19,6 +19,8 @@ . /ventoy/hook/ventoy-hook-lib.sh +vtCheatLoop=loop6 + ventoy_os_install_dmsetup() { vtlog "ventoy_os_install_dmsetup $1" @@ -50,9 +52,9 @@ ventoy_os_install_dmsetup() { if is_ventoy_hook_finished || not_ventoy_disk "${1:0:-1}"; then - # /dev/loop7 come first - if [ "$1" = "loop7" ] && [ -b $VTOY_DM_PATH ]; then - ventoy_copy_device_mapper /dev/loop7 + # /dev/vtCheatLoop come first + if [ "$1" = "$vtCheatLoop" ] && [ -b $VTOY_DM_PATH ]; then + ventoy_copy_device_mapper /dev/$vtCheatLoop fi exit 0 fi @@ -64,7 +66,7 @@ fi #some distro add there repo file to /etc/anaconda.repos.d/ which will cause error during installation -$BUSYBOX_PATH/nohup $VTOY_PATH/tool/inotifyd $VTOY_PATH/hook/rhel6/anaconda-repo-listen.sh /etc/anaconda.repos.d:n & +#$BUSYBOX_PATH/nohup $VTOY_PATH/tool/inotifyd $VTOY_PATH/hook/rhel6/anaconda-repo-listen.sh /etc/anaconda.repos.d:n & ventoy_udev_disk_common_hook $* "noreplace" @@ -72,14 +74,14 @@ $BUSYBOX_PATH/mount $VTOY_DM_PATH /mnt/ventoy # # We do a trick for rhel6 series here. -# Use /dev/loop7 and wapper it as a removable cdrom with bind mount. -# Then the anaconda installer will accept /dev/loop7 as the install medium. +# Use /dev/$vtCheatLoop and wapper it as a removable cdrom with bind mount. +# Then the anaconda installer will accept /dev/$vtCheatLoop as the install medium. # -ventoy_copy_device_mapper /dev/loop7 +ventoy_copy_device_mapper /dev/$vtCheatLoop -$BUSYBOX_PATH/cp -a /sys/devices/virtual/block/loop7 /tmp/ >> $VTLOG 2>&1 -echo 19 > /tmp/loop7/capability -$BUSYBOX_PATH/mount --bind /tmp/loop7 /sys/block/loop7 >> $VTLOG 2>&1 +$BUSYBOX_PATH/cp -a /sys/devices/virtual/block/$vtCheatLoop /tmp/ >> $VTLOG 2>&1 +echo 19 > /tmp/$vtCheatLoop/capability +$BUSYBOX_PATH/mount --bind /tmp/$vtCheatLoop /sys/block/$vtCheatLoop >> $VTLOG 2>&1 # OK finish set_ventoy_hook_finish