Update distro check
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled

This commit is contained in:
longpanda
2026-04-05 17:30:17 +08:00
parent a1771bd9b8
commit d35b8431fe
4 changed files with 19 additions and 9 deletions

View File

@@ -58,6 +58,9 @@ ventoy_get_debian_distro() {
if $GREP -q 'Tails' /etc/os-release; then if $GREP -q 'Tails' /etc/os-release; then
echo 'tails'; return echo 'tails'; return
fi fi
if $GREP -q 'NAME="Kylin"' /etc/os-release; then
echo 'kylin'; return
fi
fi fi
if $GREP -q 'slax/' /proc/cmdline; then if $GREP -q 'slax/' /proc/cmdline; then

View File

@@ -67,8 +67,11 @@ set_ventoy_hook_finish() {
if [ -f /ventoy/ventoy_iso_part_dm_cmd ]; then if [ -f /ventoy/ventoy_iso_part_dm_cmd ]; then
echo "### create iso part raw dm" >> $VTLOG echo "### create iso part raw dm" >> $VTLOG
$BUSYBOX_PATH/sh /ventoy/ventoy_iso_part_dm_cmd >>$VTLOG 2>&1 $CAT $VTOY_PATH/ventoy_raw_table >> $VTLOG
$BUSYBOX_PATH/rm -f /ventoy/ventoy_iso_part_dm_cmd echo "### iso part dm cmd" >> $VTLOG
$CAT /ventoy/ventoy_iso_part_dm_cmd >> $VTLOG
$BUSYBOX_PATH/sh /ventoy/ventoy_iso_part_dm_cmd >>$VTLOG 2>&1
#$BUSYBOX_PATH/rm -f /ventoy/ventoy_iso_part_dm_cmd
fi fi
} }
@@ -159,16 +162,15 @@ ventoy_get_vblade_bin() {
fi fi
} }
ventoy_find_bin_path() { ventoy_find_bin_path() {
if $BUSYBOX_PATH/which "$1" > /dev/null; then
$BUSYBOX_PATH/which "$1"; return
fi
for vt_path in '/bin' '/sbin' '/usr/bin' '/usr/sbin' '/usr/local/bin' '/usr/local/sbin' '/root/bin'; do for vt_path in '/bin' '/sbin' '/usr/bin' '/usr/sbin' '/usr/local/bin' '/usr/local/sbin' '/root/bin'; do
if [ -e "$vt_path/$1" ]; then if [ -e "$vt_path/$1" ]; then
echo "$vt_path/$1"; return echo "$vt_path/$1"; return
fi fi
done done
if $BUSYBOX_PATH/which "$1" > /dev/null; then
$BUSYBOX_PATH/which "$1"; return
fi
echo "" echo ""
} }
@@ -266,7 +268,9 @@ create_ventoy_device_mapper() {
fi fi
RAWDISKNAME=$($HEAD -n1 $VTOY_PATH/ventoy_raw_table | $AWK '{print $4}') RAWDISKNAME=$($HEAD -n1 $VTOY_PATH/ventoy_raw_table | $AWK '{print $4}')
echo "$VT_DM_BIN create ${RAWDISKNAME#/dev/} $VTOY_PATH/ventoy_raw_table" > /ventoy/ventoy_iso_part_dm_cmd echo "$VT_DM_BIN create ${RAWDISKNAME#/dev/} $VTOY_PATH/ventoy_raw_table" > /ventoy/ventoy_iso_part_dm_cmd
echo "$VT_DM_BIN mknodes ${RAWDISKNAME#/dev/}" >> /ventoy/ventoy_iso_part_dm_cmd
echo "$VT_DM_BIN ls" >> /ventoy/ventoy_iso_part_dm_cmd
} }
create_persistent_device_mapper() { create_persistent_device_mapper() {

View File

@@ -179,6 +179,8 @@ ventoy_get_os_type() {
echo 'deepin'; return echo 'deepin'; return
elif $GREP -qi 'aerynos' /etc/os-release; then elif $GREP -qi 'aerynos' /etc/os-release; then
echo 'rhel7'; return echo 'rhel7'; return
elif $GREP -qi 'ID_LIKE=debian' /etc/os-release; then
echo 'debian'; return
fi fi
fi fi

View File

@@ -11,7 +11,8 @@ Ventoy2Disk.sh CMD [ OPTION ] /dev/sdX
OPTION: (optional) OPTION: (optional)
-r SIZE_MB preserve some space at the bottom of the disk (only for install) -r SIZE_MB preserve some space at the bottom of the disk (only for install)
-s enable secure boot support (default is disabled) -s enable secure boot support (default is enabled)
-S disable secure boot support (default is enabled)
-g use GPT partition style, default is MBR style (only for install) -g use GPT partition style, default is MBR style (only for install)
Please refer https://www.ventoy.net/en/doc_start.html for details. Please refer https://www.ventoy.net/en/doc_start.html for details.