Skip to content

Commit d35b843

Browse files
committed
Update distro check
1 parent a1771bd commit d35b843

4 files changed

Lines changed: 19 additions & 9 deletions

File tree

IMG/cpio/ventoy/hook/debian/ventoy-hook.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ ventoy_get_debian_distro() {
5858
if $GREP -q 'Tails' /etc/os-release; then
5959
echo 'tails'; return
6060
fi
61+
if $GREP -q 'NAME="Kylin"' /etc/os-release; then
62+
echo 'kylin'; return
63+
fi
6164
fi
6265

6366
if $GREP -q 'slax/' /proc/cmdline; then

IMG/cpio/ventoy/hook/ventoy-hook-lib.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ set_ventoy_hook_finish() {
6767

6868
if [ -f /ventoy/ventoy_iso_part_dm_cmd ]; then
6969
echo "### create iso part raw dm" >> $VTLOG
70-
$BUSYBOX_PATH/sh /ventoy/ventoy_iso_part_dm_cmd >>$VTLOG 2>&1
71-
$BUSYBOX_PATH/rm -f /ventoy/ventoy_iso_part_dm_cmd
70+
$CAT $VTOY_PATH/ventoy_raw_table >> $VTLOG
71+
echo "### iso part dm cmd" >> $VTLOG
72+
$CAT /ventoy/ventoy_iso_part_dm_cmd >> $VTLOG
73+
$BUSYBOX_PATH/sh /ventoy/ventoy_iso_part_dm_cmd >>$VTLOG 2>&1
74+
#$BUSYBOX_PATH/rm -f /ventoy/ventoy_iso_part_dm_cmd
7275
fi
7376
}
7477

@@ -159,16 +162,15 @@ ventoy_get_vblade_bin() {
159162
fi
160163
}
161164

162-
ventoy_find_bin_path() {
163-
if $BUSYBOX_PATH/which "$1" > /dev/null; then
164-
$BUSYBOX_PATH/which "$1"; return
165-
fi
166-
165+
ventoy_find_bin_path() {
167166
for vt_path in '/bin' '/sbin' '/usr/bin' '/usr/sbin' '/usr/local/bin' '/usr/local/sbin' '/root/bin'; do
168167
if [ -e "$vt_path/$1" ]; then
169168
echo "$vt_path/$1"; return
170169
fi
171170
done
171+
if $BUSYBOX_PATH/which "$1" > /dev/null; then
172+
$BUSYBOX_PATH/which "$1"; return
173+
fi
172174

173175
echo ""
174176
}
@@ -266,7 +268,9 @@ create_ventoy_device_mapper() {
266268
fi
267269

268270
RAWDISKNAME=$($HEAD -n1 $VTOY_PATH/ventoy_raw_table | $AWK '{print $4}')
269-
echo "$VT_DM_BIN create ${RAWDISKNAME#/dev/} $VTOY_PATH/ventoy_raw_table" > /ventoy/ventoy_iso_part_dm_cmd
271+
echo "$VT_DM_BIN create ${RAWDISKNAME#/dev/} $VTOY_PATH/ventoy_raw_table" > /ventoy/ventoy_iso_part_dm_cmd
272+
echo "$VT_DM_BIN mknodes ${RAWDISKNAME#/dev/}" >> /ventoy/ventoy_iso_part_dm_cmd
273+
echo "$VT_DM_BIN ls" >> /ventoy/ventoy_iso_part_dm_cmd
270274
}
271275

272276
create_persistent_device_mapper() {

IMG/cpio/ventoy/ventoy_chain.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ ventoy_get_os_type() {
179179
echo 'deepin'; return
180180
elif $GREP -qi 'aerynos' /etc/os-release; then
181181
echo 'rhel7'; return
182+
elif $GREP -qi 'ID_LIKE=debian' /etc/os-release; then
183+
echo 'debian'; return
182184
fi
183185
fi
184186

INSTALL/README

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Ventoy2Disk.sh CMD [ OPTION ] /dev/sdX
1111

1212
OPTION: (optional)
1313
-r SIZE_MB preserve some space at the bottom of the disk (only for install)
14-
-s enable secure boot support (default is disabled)
14+
-s enable secure boot support (default is enabled)
15+
-S disable secure boot support (default is enabled)
1516
-g use GPT partition style, default is MBR style (only for install)
1617

1718
Please refer https://www.ventoy.net/en/doc_start.html for details.

0 commit comments

Comments
 (0)