mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-28 08:21:14 +00:00
support for tails.img
This commit is contained in:
@@ -28,6 +28,13 @@ get_user() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_browser_cmd() {
|
||||
if uos-browser --version > /dev/null 2>&1; then
|
||||
echo "uos-browser"; return
|
||||
else
|
||||
echo "browser"
|
||||
fi
|
||||
}
|
||||
|
||||
uid=$(id -u)
|
||||
if [ $uid -ne 0 ]; then
|
||||
@@ -101,7 +108,11 @@ VUSER=$(get_user)
|
||||
|
||||
LOGFILE=log.txt
|
||||
if [ -e $LOGFILE ]; then
|
||||
chown $VUSER $LOGFILE
|
||||
LogGroup=$(stat -c '%G' $LOGFILE)
|
||||
if [ "$LogGroup" = "root" ]; then
|
||||
rm -f $LOGFILE
|
||||
su $VUSER -c "touch $LOGFILE"
|
||||
fi
|
||||
else
|
||||
su $VUSER -c "touch $LOGFILE"
|
||||
fi
|
||||
@@ -121,15 +132,14 @@ if [ -f ./tool/$TOOLDIR/V2DServer.xz ]; then
|
||||
fi
|
||||
|
||||
rm -rf ./*_VTMPDIR
|
||||
vtWebTmpDir=$(mktemp -d -p ./ --suffix=_VTMPDIR)
|
||||
chown $VUSER $vtWebTmpDir
|
||||
|
||||
vtWebTmpDir=$(su $VUSER -c "mktemp -d -p ./ --suffix=_VTMPDIR")
|
||||
|
||||
V2DServer "$HOST" "$PORT" &
|
||||
V2DPid=$!
|
||||
sleep 1
|
||||
|
||||
su $VUSER -c "browser --window-size=550,400 --app=\"http://${HOST}:${PORT}/index.html?chrome-app\" --user-data-dir=$vtWebTmpDir >> $LOGFILE 2>&1" &
|
||||
browsercmd=$(get_browser_cmd)
|
||||
su $VUSER -c "$browsercmd --window-size=550,400 --app=\"http://${HOST}:${PORT}/index.html?chrome-app\" --user-data-dir=$vtWebTmpDir >> $LOGFILE 2>&1" &
|
||||
WebPid=$!
|
||||
|
||||
|
||||
|
@@ -1480,6 +1480,23 @@ function ventoy_img_batocera {
|
||||
vt_unset_boot_opt
|
||||
}
|
||||
|
||||
function ventoy_img_tails {
|
||||
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
|
||||
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
|
||||
|
||||
ventoy_debug_pause
|
||||
|
||||
#boot image file
|
||||
vt_set_boot_opt rdinit=/vtoy/vtoy live-media=/dev/dm-1 ventoyos=tails
|
||||
vt_img_hook_root
|
||||
|
||||
set root=(vtimghd,1)
|
||||
configfile (vtimghd,1)/efi/debian/grub.cfg
|
||||
|
||||
vt_img_unhook_root
|
||||
vt_unset_boot_opt
|
||||
}
|
||||
|
||||
function ventoy_img_memtest86 {
|
||||
chainloader (vtimghd,1)/efi/boot/BOOTX64.efi
|
||||
boot
|
||||
@@ -1518,6 +1535,8 @@ function img_common_menuentry {
|
||||
set vtback_root=$root
|
||||
ventoy_cli_console
|
||||
vt_push_last_entry
|
||||
set vtback_theme=$theme
|
||||
unset theme
|
||||
|
||||
vt_img_extra_initrd_reset
|
||||
|
||||
@@ -1544,6 +1563,8 @@ function img_common_menuentry {
|
||||
ventoy_img_freedombox
|
||||
elif vt_str_begin "$vtImgHd1Label" "BATOCERA"; then
|
||||
ventoy_img_batocera
|
||||
elif vt_str_begin "$vtImgHd1Label" "Tails"; then
|
||||
ventoy_img_tails
|
||||
elif [ "$vtImgHd2Label" = "RECALBOX" ]; then
|
||||
ventoy_img_recalbox
|
||||
elif [ -f (vtimghd,2)/loader/entries/ubos.conf ]; then
|
||||
@@ -1568,6 +1589,7 @@ function img_common_menuentry {
|
||||
|
||||
set root=$vtback_root
|
||||
vt_pop_last_entry
|
||||
set theme=$vtback_theme
|
||||
ventoy_gui_console
|
||||
set ventoy_compatible=NO
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user