]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh
keep up with 1.0.67 (#1464)
[Ventoy.git] / IMG / cpio / ventoy / hook / rhel7 / ventoy-hook.sh
index 206b92fa9bd3b96b3b8b07da35345d26d07b0936..5067532648da09b441bd24074434044dd3ba7fd2 100644 (file)
@@ -45,7 +45,8 @@ if [ -f $VTOY_PATH/ventoy_persistent_map ]; then
     
     if [ -e /sbin/dmsquash-live-root ]; then
         echo "patch /sbin/dmsquash-live-root for persistent ..." >> $VTLOG
-        $SED "/mount.*devspec.*\/run\/initramfs\/overlayfs/a . /ventoy/hook/rhel7/ventoy-overlay.sh" -i /sbin/dmsquash-live-root
+        $SED "/mount.*devspec.*\/run\/initramfs\/overlayfs/a . /ventoy/hook/rhel7/ventoy-overlay.sh" -i /sbin/dmsquash-live-root        
+        $SED "s/osmin.img/osmin.imgxxxx/g" -i /sbin/dmsquash-live-root
     fi
     
     #close selinux
@@ -91,10 +92,19 @@ if [ -f /etc/system-release ]; then
         vtNeedRepo="yes"
     fi
 fi
-if $GREP -q el8 /proc/version; then
+
+if $GREP -q 'el[89]' /proc/version; then
     vtNeedRepo="yes"
 fi
 
+if $GREP -i -q Fedora /proc/version; then
+    if $GREP -q 'Server Edition' /etc/os-release; then
+        vtNeedRepo="yes"
+    fi
+fi
+
+echo "vtNeedRepo=$vtNeedRepo" >> $VTLOG
+
 if [ "$vtNeedRepo" = "yes" ]; then
     $BUSYBOX_PATH/cp -a $VTOY_PATH/hook/rhel7/ventoy-repo.sh /lib/dracut/hooks/pre-pivot/99-ventoy-repo.sh
 fi