]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
fix lvm issue
authorlongpanda <admin@ventoy.net>
Thu, 28 Apr 2022 17:13:04 +0000 (01:13 +0800)
committerlongpanda <admin@ventoy.net>
Thu, 28 Apr 2022 17:13:04 +0000 (01:13 +0800)
IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh
IMG/cpio/ventoy/hook/rhel7/ventoy-timeout.sh

index c19991e2178ceccaceca93cd26be43a76cbeac00..cf29264ae2c7d7b640c2545934a6b851fea7bce5 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
     
     
     $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
     $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
 
     vtGenRulFile='/etc/udev/rules.d/99-live-squash.rules'
     if [ -e $vtGenRulFile ] && $GREP -q dmsquash $vtGenRulFile; then
index 77260fecb9c360434fd5bf19b717a0809b757f0e..8aac1690cc926f8169f0496be2da06f00d211aec 100644 (file)
@@ -23,9 +23,10 @@ vtlog "##### $0 $* ..."
 
 VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
 
 
 VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
 
-blkdev_num=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')  
-vtDM=$(ventoy_find_dm_id ${blkdev_num})
-[ -e /dev/ventoy ] || cp -a /dev/$vtDM /dev/ventoy
+if [ ! -e /dev/ventoy ]; then
+    blkdev_num_mknod=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
+    mknod -m 660 /dev/ventoy  b  $blkdev_num_mknod
+fi
 
 if [ -e /sbin/anaconda-diskroot ]; then
     vtlog "set anaconda-diskroot /dev/ventoy ..."
 
 if [ -e /sbin/anaconda-diskroot ]; then
     vtlog "set anaconda-diskroot /dev/ventoy ..."