]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/gobo/ventoy-inotifyd-hook.sh
1.1.07 release
[Ventoy.git] / IMG / cpio / ventoy / hook / gobo / ventoy-inotifyd-hook.sh
index ff52bbb091e72f73f59f95a15cae5f9bd357aa35..34a70a0f2cb220906edbfb11392edf86a716b3ae 100644 (file)
@@ -23,25 +23,17 @@ if is_ventoy_hook_finished; then
     exit 0
 fi
 
-vtlog "##### INOTIFYD: $2/$3 is created ..."
-
 VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
 
 if is_inotify_ventoy_part $3; then
+    vtlog "##### INOTIFYD: $2/$3 is created (YES)..."
+    
     vtlog "find ventoy partition $3 ..."
     $BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 noreplace
     
-    # 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})
-    # 
-    # if [ "$vtDM" = "dm-0" ]; then
-    #     vtlog "This is dm-0, OK ..."
-    # else
-    #     vtlog "####### This is $vtDM ####### this is abnormal ..."
-    #     ventoy_swap_device /dev/dm-0 /dev/$vtDM
-    # fi
-    
     set_ventoy_hook_finish
+else
+    vtlog "##### INOTIFYD: $2/$3 is created (NO)..."
 fi
 
 PATH=$VTPATH_OLD