mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-01-14 00:05:05 -05:00
misc update
This commit is contained in:
parent
82977d9b8a
commit
12e8ae26ae
2
.github/workflows/sync2gitee.yml
vendored
2
.github/workflows/sync2gitee.yml
vendored
@ -4,8 +4,6 @@ on:
|
|||||||
# Triggers the workflow on push or pull request events but only for the main branch
|
# Triggers the workflow on push or pull request events but only for the main branch
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -75,8 +75,8 @@ fi
|
|||||||
if [ -e /sys/class/block/${DISK#/dev/}/start ]; then
|
if [ -e /sys/class/block/${DISK#/dev/}/start ]; then
|
||||||
vterr "$DISK is a partition, please use the whole disk."
|
vterr "$DISK is a partition, please use the whole disk."
|
||||||
echo "For example:"
|
echo "For example:"
|
||||||
vterr " sudo sh Ventoy2Disk.sh -i /dev/sdX1 <=== This is wrong"
|
vterr " sudo sh Ventoy2Disk.sh -i /dev/sdb1 <=== This is wrong"
|
||||||
vtinfo " sudo sh Ventoy2Disk.sh -i /dev/sdX <=== This is right"
|
vtinfo " sudo sh Ventoy2Disk.sh -i /dev/sdb <=== This is right"
|
||||||
echo ""
|
echo ""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -90,15 +90,6 @@ if [ -n "$RESERVE_SPACE" -a "$MODE" = "install" ]; then
|
|||||||
fi
|
fi
|
||||||
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"
|
vtdebug "MODE=$MODE FORCE=$FORCE RESERVE_SPACE=$RESERVE_SPACE RESERVE_SIZE_MB=$RESERVE_SIZE_MB"
|
||||||
|
|
||||||
#check tools
|
#check tools
|
||||||
@ -153,6 +144,16 @@ if swapon --help 2>&1 | grep -q '^ \-s,'; then
|
|||||||
fi
|
fi
|
||||||
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
|
#check tmp_mnt directory
|
||||||
if [ -d ./tmp_mnt ]; then
|
if [ -d ./tmp_mnt ]; then
|
||||||
vtdebug "There is a tmp_mnt directory, now delete it."
|
vtdebug "There is a tmp_mnt directory, now delete it."
|
||||||
|
Loading…
Reference in New Issue
Block a user