]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Add support for Dell PER ISO. (#2113)
authorlongpanda <admin@ventoy.net>
Tue, 3 Jan 2023 08:43:17 +0000 (16:43 +0800)
committerlongpanda <admin@ventoy.net>
Tue, 3 Jan 2023 08:43:17 +0000 (16:43 +0800)
IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh

index 96052b7c7312326b74e5df0853c45c6d18854d5a..609dc4cad355945eedd6da5ca3040ab874b3ec97 100644 (file)
@@ -50,8 +50,21 @@ if is_inotify_ventoy_part $3; then
         vtScript=$($GREP -m1 'RUN.=' $vtGenRulFile | $AWK -F'RUN.=' '{print $2}' | $SED 's/"\(.*\)".*/\1/')
         vtlog "vtScript=$vtScript"
         
         vtScript=$($GREP -m1 'RUN.=' $vtGenRulFile | $AWK -F'RUN.=' '{print $2}' | $SED 's/"\(.*\)".*/\1/')
         vtlog "vtScript=$vtScript"
         
+        DELL_PER=''
+        if [ -f /etc/services ]; then
+            if grep -qiw DTK /etc/services; then
+                if grep -qiw Dell /etc/services; then
+                    DELL_PER='YES'
+                fi
+            fi
+        fi
+        
         if $GREP -q SCRE /proc/cmdline; then
             /sbin/dmsquash-live-root /dev/ventoy
         if $GREP -q SCRE /proc/cmdline; then
             /sbin/dmsquash-live-root /dev/ventoy
+        elif [ "$DELL_PER" = "YES" ]; then
+            sed 's/liverw=[^ ]*/liverw=ro/g' -i /sbin/dmsquash-live-root
+            sed 's/writable_fsimg=[^ ]*/writable_fsimg=""/g' -i /sbin/dmsquash-live-root
+            /sbin/dmsquash-live-root /dev/ventoy
         else
             $vtScript
         fi
         else
             $vtScript
         fi