From 3d1dc81fda49132feb670ea50041ca52ba9296bc Mon Sep 17 00:00:00 2001 From: longpanda Date: Fri, 29 Apr 2022 01:13:04 +0800 Subject: [PATCH] fix lvm issue --- IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh | 7 +++---- IMG/cpio/ventoy/hook/rhel7/ventoy-timeout.sh | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh b/IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh index c19991e2..cf29264a 100644 --- a/IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh +++ b/IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh @@ -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 diff --git a/IMG/cpio/ventoy/hook/rhel7/ventoy-timeout.sh b/IMG/cpio/ventoy/hook/rhel7/ventoy-timeout.sh index 77260fec..8aac1690 100644 --- a/IMG/cpio/ventoy/hook/rhel7/ventoy-timeout.sh +++ b/IMG/cpio/ventoy/hook/rhel7/ventoy-timeout.sh @@ -23,9 +23,10 @@ vtlog "##### $0 $* ..." 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 ..."