]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
misc update
authorlongpanda <admin@ventoy.net>
Thu, 18 Feb 2021 08:15:13 +0000 (16:15 +0800)
committerlongpanda <admin@ventoy.net>
Thu, 18 Feb 2021 08:15:13 +0000 (16:15 +0800)
.github/workflows/sync2gitee.yml
INSTALL/tool/VentoyWorker.sh

index e2b50763adf9f8e276a12b0f27d6ae8cc88a4720..fd13a66f4b940ff1c8481b5b3cd4c1a27d7eb26d 100644 (file)
@@ -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:
index 11191cbf271a797ab0d28eec09a3331fdf951698..7e276db5b45e5833bcab1ffb4ec691e225a69b0b 100644 (file)
@@ -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."