]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh
keep up with 1.0.67 (#1464)
[Ventoy.git] / IMG / cpio / ventoy / hook / rhel7 / ventoy-inotifyd-hook.sh
index a1431d07118f37c47d073e0d64b67983c3f9aa77..4a2435e1d6bdfd43ce425f12d25ec86c1b22e339 100644 (file)
@@ -39,7 +39,13 @@ if is_inotify_ventoy_part $3; then
     fi
 
     vtlog "find ventoy partition ..."
-    $BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 noreplace
+    
+    vtReplaceOpt=noreplace
+    if [ -f /lib/dracut/hooks/pre-pivot/99-ventoy-repo.sh ]; then
+        vtReplaceOpt=""
+    fi
+    
+    $BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 $vtReplaceOpt
     
     blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')  
     vtDM=$(ventoy_find_dm_id ${blkdev_num})