]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/wifislax/ventoy-hook.sh
Merge branch 'master' of https://github.com/Ventoy/Ventoy
[Ventoy.git] / IMG / cpio / ventoy / hook / wifislax / ventoy-hook.sh
index f2073b9acc9f422c230c4a2397ff5047fafbd6bd..cc0be88933d7ebc75013547bc409ec094d3b553c 100644 (file)
 
 . $VTOY_PATH/hook/ventoy-os-lib.sh
 
-$SED "/mount.*devtmpfs/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/wifislax/disk_hook.sh" -i /linuxrc
+if [ -e /linuxrc ]; then
+    INITFILE=/linuxrc
+elif [ -e /init ]; then
+    INITFILE=/init
+fi
+
+$SED "/mount.*devtmpfs/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/wifislax/disk_hook.sh" -i $INITFILE
 
 #replace original blkid
 $BUSYBOX_PATH/rm -f /usr/bin/blkid