This commit is contained in:
longpanda
2021-01-06 07:50:23 +08:00
parent 6434e453b2
commit f2ed81b004
25 changed files with 289 additions and 20 deletions

View File

@@ -92,6 +92,9 @@ function get_os_type {
elif [ -e (loop)/bin/freebsd-version ]; then
set vtoy_os=Unix
set vt_unix_type=FreeBSD
elif vt_str_begin "$vt_system_id" "DragonFly"; then
set vtoy_os=Unix
set vt_unix_type=DragonFly
elif [ -e (loop)/boot/kernel/kernel ]; then
@@ -426,6 +429,22 @@ function ventoy_freebsd_proc {
vt_unix_replace_conf FreeBSD "${1}${chosen_path}"
}
function ventoy_dragonfly_proc {
unset vt_unix_mod_path
for file in "/boot/kernel/initrd.img.gz"; do
if [ -e (loop)${file} ]; then
set vt_unix_mod_path=${file}
break
fi
done
vt_unix_replace_ko $vt_unix_mod_path ${vtoy_path}/dragonfly.mfs.xz
vt_unix_fill_image_desc
vt_unix_gzip_new_ko
vt_unix_replace_conf DragonFly "${1}${chosen_path}"
}
function ventoy_unix_comm_proc {
vt_unix_reset
@@ -434,11 +453,12 @@ function ventoy_unix_comm_proc {
if [ "$vt_unix_type" = "FreeBSD" ]; then
ventoy_freebsd_proc "$1" "${chosen_path}"
elif [ "$vt_unix_type" = "DragonFly" ]; then
ventoy_dragonfly_proc "$1" "${chosen_path}"
elif [ "$vt_unix_type" = "NetBSD" ]; then
echo "NetBSD not supported"
else
if [ -n "${vtdebug_flag}" ]; then
echo "Unknown unix type"