X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/d0edcc0ef0b6ef695ce96d2be84f1ebb02453b51..88dcceeabc61862ee3965d4ea266fccceb1e5838:/IMG/cpio/ventoy/ventoy.sh diff --git a/IMG/cpio/ventoy/ventoy.sh b/IMG/cpio/ventoy/ventoy.sh index 5beb46d..42efb2e 100644 --- a/IMG/cpio/ventoy/ventoy.sh +++ b/IMG/cpio/ventoy/ventoy.sh @@ -87,6 +87,10 @@ ventoy_get_os_type() { elif $EGREP -q 'archlinux|ARCH' /proc/version; then echo 'arch'; return + # kiosk + elif $EGREP -q 'kiosk' /proc/version; then + echo 'kiosk'; return + # gentoo elif $EGREP -q '[Gg]entoo' /proc/version; then echo 'gentoo'; return @@ -184,6 +188,22 @@ ventoy_get_os_type() { fi fi + if $GREP -q 'android.x86' /proc/version; then + echo 'android'; return + fi + + if $GREP -q 'adelielinux' /proc/version; then + echo 'adelie'; return + fi + + if $GREP -q 'pmagic' /proc/version; then + echo 'pmagic'; return + fi + + if $GREP -q 'CDlinux' /proc/cmdline; then + echo 'cdlinux'; return + fi + echo "default" } @@ -210,8 +230,6 @@ if [ "$VTOY_BREAK_LEVEL" = "03" ] || [ "$VTOY_BREAK_LEVEL" = "13" ]; then exec $BUSYBOX_PATH/sh fi - - #################################################################### # # # Step 4 : Hand over to real init # @@ -222,8 +240,14 @@ if [ "$rmproc" = "Y" ]; then $BUSYBOX_PATH/rm -rf /proc fi +if [ -f $VTOY_PATH/ventoy_persistent_map ]; then + export PERSISTENT='YES' + export PERSISTENCE='true' +fi + cd / -unset VTOY_PATH VTLOG FIND GREP EGREP CAT AWK SED SLEEP HEAD + +unset VTLOG FIND GREP EGREP CAT AWK SED SLEEP HEAD for vtinit in $user_rdinit /init /sbin/init /linuxrc; do if [ -d /ventoy_rdroot ]; then @@ -234,6 +258,9 @@ for vtinit in $user_rdinit /init /sbin/init /linuxrc; do fi else if [ -e "$vtinit" ];then + if [ -f "$VTOY_PATH/hook/$VTOS/ventoy-before-init.sh" ]; then + $BUSYBOX_PATH/sh "$VTOY_PATH/hook/$VTOS/ventoy-before-init.sh" + fi exec "$vtinit" fi fi