]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh
fix build error
[Ventoy.git] / IMG / cpio / ventoy / hook / rhel7 / ventoy-inotifyd-hook.sh
index c19991e2178ceccaceca93cd26be43a76cbeac00..b4afbf746f409f53c5385bb5341bdaf502d42ef9 100644 (file)
@@ -40,11 +40,10 @@ if is_inotify_ventoy_part $3; then
     
     $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})
-
-    cp -a /dev/$vtDM  /dev/ventoy
+    blkdev_num_mknod=$($VTOY_PATH/tool/dmsetup ls | $GREP ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
+    $BUSYBOX_PATH/mknod -m 660 /dev/ventoy  b  $blkdev_num_mknod
     $BUSYBOX_PATH/modprobe isofs >/dev/null 2>&1
+    vtlog "mknod /dev/ventoy $blkdev_num_mknod"
 
     vtGenRulFile='/etc/udev/rules.d/99-live-squash.rules'
     if [ -e $vtGenRulFile ] && $GREP -q dmsquash $vtGenRulFile; then
@@ -55,6 +54,15 @@ if is_inotify_ventoy_part $3; then
         vtlog "$vtGenRulFile not exist..."
     fi
     
+    if [ -f $VTOY_PATH/ventoy_ks_rootpath ]; then
+        vt_ks_rootpath=$(cat $VTOY_PATH/ventoy_ks_rootpath)
+        vtlog "ks rootpath <$vt_ks_rootpath>"
+        if [ -e /sbin/fetch-kickstart-disk ]; then
+            vtlog "fetch-kickstart-disk ..."        
+            /sbin/fetch-kickstart-disk /dev/ventoy "$vt_ks_rootpath"
+        fi
+    fi
+    
     if [ -e /sbin/anaconda-diskroot ]; then
         vtlog "set anaconda-diskroot ..."        
         /sbin/anaconda-diskroot /dev/ventoy