]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/ventoy_chain.sh
Optimization for GUI LiveCD
[Ventoy.git] / IMG / cpio / ventoy / ventoy_chain.sh
index 1bdc02a5469fc1e521e8997b12b18a5270c15e9b..7bed6d759dbd2a8fff0d25987d779b9d0124b737 100644 (file)
@@ -37,7 +37,6 @@ for i in $vtcmdline; do
     fi
 done
 
-
 ####################################################################
 #                                                                  #
 # Step 2 : Do OS specific hook                                     #
@@ -59,6 +58,12 @@ ventoy_get_os_type() {
 
     # rhel6/CentOS6 and all other distributions based on them
     elif $GREP -q 'el6' /proc/version; then
+        if [ -f /sbin/detectcd ]; then
+            if $GREP -q -i 'LENOVO-EasyStartup' /sbin/detectcd; then
+                echo 'easystartup'; return
+            fi
+        fi
+
         echo 'rhel6'; return
 
     # rhel7/CentOS7/rhel8/CentOS8 and all other distributions based on them
@@ -83,8 +88,8 @@ ventoy_get_os_type() {
         
     # Deepin : do the same process with debian
     elif $GREP -q '[Dd]eepin' /proc/version; then
-        echo 'debian'; return
-        
+        echo 'debian'; return    
+
     # SUSE
     elif $GREP -q 'SUSE' /proc/version; then
         echo 'suse'; return
@@ -152,6 +157,14 @@ ventoy_get_os_type() {
             echo 'debian'; return
         elif $GREP -q 'Solus' /etc/os-release; then
             echo 'rhel7'; return
+        elif $GREP -q 'openEuler' /etc/os-release; then
+            echo 'openEuler'; return
+        elif $GREP -q 'fuyu' /etc/os-release; then
+            echo 'openEuler'; return
+        elif $GREP -q 'deepin' /etc/os-release; then
+            echo 'debian'; return
+        elif $GREP -q 'chinauos' /etc/os-release; then
+            echo 'debian'; return
         fi
     fi
     
@@ -305,6 +318,26 @@ ventoy_get_os_type() {
         echo 'blackPanther'; return
     fi
     
+    if $GREP -q 'primeos' /proc/version; then
+        echo 'primeos'; return
+    fi
+    
+    if $GREP -q 'austrumi' /proc/version; then
+        echo 'austrumi'; return
+    fi
+    
+    if [ -f /DISTRO_SPECS ]; then
+        if $GREP -q '[Pp]uppy' /DISTRO_SPECS; then
+            echo 'debian'; return
+        elif $GREP -q 'veket' /DISTRO_SPECS; then
+            echo 'debian'; return
+        fi
+    fi
+    
+    if [ -f /etc/openEuler-release ]; then
+        echo "openEuler"; return
+    fi
+    
     echo "default"
 }
 
@@ -317,7 +350,17 @@ fi
 
 ####################################################################
 #                                                                  #
-# Step 3 : Check for debug break                                   #
+# Step 3 : Run LiveInjection Hook                                  #
+#                                                                  #
+####################################################################
+if [ -f "/live_injection_7ed136ec_7a61_4b54_adc3_ae494d5106ea/hook.sh" ]; then
+    $BUSYBOX_PATH/sh "/live_injection_7ed136ec_7a61_4b54_adc3_ae494d5106ea/hook.sh" $VTOS
+fi
+
+
+####################################################################
+#                                                                  #
+# Step 4 : Check for debug break                                   #
 #                                                                  #
 ####################################################################
 if [ "$VTOY_BREAK_LEVEL" = "03" ] || [ "$VTOY_BREAK_LEVEL" = "13" ]; then
@@ -334,7 +377,7 @@ fi
 
 ####################################################################
 #                                                                  #
-# Step 4 : Hand over to real init                                  #
+# Step 5 : Hand over to real init                                  #
 #                                                                  #
 ####################################################################
 $BUSYBOX_PATH/umount /proc