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
echo 'tails'; return
fi
if $GREP -q 'NAME="Kylin"' /etc/os-release; then
echo 'kylin'; return
fi
fi
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
echo "### create iso part raw dm" >> $VTLOG
$CAT $VTOY_PATH/ventoy_raw_table >> $VTLOG
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
#$BUSYBOX_PATH/rm -f /ventoy/ventoy_iso_part_dm_cmd
fi
}
@@ -160,15 +163,14 @@ ventoy_get_vblade_bin() {
}
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
if [ -e "$vt_path/$1" ]; then
echo "$vt_path/$1"; return
fi
done
if $BUSYBOX_PATH/which "$1" > /dev/null; then
$BUSYBOX_PATH/which "$1"; return
fi
echo ""
}
@@ -267,6 +269,8 @@ create_ventoy_device_mapper() {
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 mknodes ${RAWDISKNAME#/dev/}" >> /ventoy/ventoy_iso_part_dm_cmd
echo "$VT_DM_BIN ls" >> /ventoy/ventoy_iso_part_dm_cmd
}
create_persistent_device_mapper() {

View File

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

View File

@@ -11,7 +11,8 @@ Ventoy2Disk.sh CMD [ OPTION ] /dev/sdX
OPTION: (optional)
-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)
Please refer https://www.ventoy.net/en/doc_start.html for details.