misc update

pull/765/head
longpanda 3 years ago
parent 82977d9b8a
commit 12e8ae26ae

@ -4,8 +4,6 @@ on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

@ -75,8 +75,8 @@ fi
if [ -e /sys/class/block/${DISK#/dev/}/start ]; then
vterr "$DISK is a partition, please use the whole disk."
echo "For example:"
vterr " sudo sh Ventoy2Disk.sh -i /dev/sdX1 <=== This is wrong"
vtinfo " sudo sh Ventoy2Disk.sh -i /dev/sdX <=== This is right"
vterr " sudo sh Ventoy2Disk.sh -i /dev/sdb1 <=== This is wrong"
vtinfo " sudo sh Ventoy2Disk.sh -i /dev/sdb <=== This is right"
echo ""
exit 1
fi
@ -90,15 +90,6 @@ if [ -n "$RESERVE_SPACE" -a "$MODE" = "install" ]; then
fi
fi
#check access
if dd if="$DISK" of=/dev/null bs=1 count=1 >/dev/null 2>&1; then
vtdebug "root permission check ok ..."
else
vterr "Failed to access $DISK, maybe root privilege is needed!"
echo ''
exit 1
fi
vtdebug "MODE=$MODE FORCE=$FORCE RESERVE_SPACE=$RESERVE_SPACE RESERVE_SIZE_MB=$RESERVE_SIZE_MB"
#check tools
@ -153,6 +144,16 @@ if swapon --help 2>&1 | grep -q '^ \-s,'; then
fi
fi
#check access
if dd if="$DISK" of=/dev/null bs=1 count=1 >/dev/null 2>&1; then
vtdebug "root permission check ok ..."
else
vterr "Failed to access $DISK, maybe root privilege is needed!"
echo ''
exit 1
fi
#check tmp_mnt directory
if [ -d ./tmp_mnt ]; then
vtdebug "There is a tmp_mnt directory, now delete it."

Loading…
Cancel
Save