From 12e8ae26ae543b518517243e13d5cf8b53f37f9b Mon Sep 17 00:00:00 2001 From: longpanda Date: Thu, 18 Feb 2021 16:15:13 +0800 Subject: [PATCH] misc update --- .github/workflows/sync2gitee.yml | 2 -- INSTALL/tool/VentoyWorker.sh | 23 ++++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml index e2b50763..fd13a66f 100644 --- a/.github/workflows/sync2gitee.yml +++ b/.github/workflows/sync2gitee.yml @@ -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: diff --git a/INSTALL/tool/VentoyWorker.sh b/INSTALL/tool/VentoyWorker.sh index 11191cbf..7e276db5 100644 --- a/INSTALL/tool/VentoyWorker.sh +++ b/INSTALL/tool/VentoyWorker.sh @@ -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."