fix lvm issue

This commit is contained in:
longpanda 2022-04-29 01:13:04 +08:00
parent 3ebc610e7d
commit 3d1dc81fda
2 changed files with 7 additions and 7 deletions

View 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/') blkdev_num_mknod=$($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}) $BUSYBOX_PATH/mknod -m 660 /dev/ventoy b $blkdev_num_mknod
cp -a /dev/$vtDM /dev/ventoy
$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' vtGenRulFile='/etc/udev/rules.d/99-live-squash.rules'
if [ -e $vtGenRulFile ] && $GREP -q dmsquash $vtGenRulFile; then if [ -e $vtGenRulFile ] && $GREP -q dmsquash $vtGenRulFile; then

View 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/') if [ ! -e /dev/ventoy ]; then
vtDM=$(ventoy_find_dm_id ${blkdev_num}) blkdev_num_mknod=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
[ -e /dev/ventoy ] || cp -a /dev/$vtDM /dev/ventoy mknod -m 660 /dev/ventoy b $blkdev_num_mknod
fi
if [ -e /sbin/anaconda-diskroot ]; then if [ -e /sbin/anaconda-diskroot ]; then
vtlog "set anaconda-diskroot /dev/ventoy ..." vtlog "set anaconda-diskroot /dev/ventoy ..."