]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/default/ventoy-hook.sh
Only for VirtualBox.
[Ventoy.git] / IMG / cpio / ventoy / hook / default / ventoy-hook.sh
index 152dd06b698f71007879f382cbe17315bce3f937..56e0e35e3f01cf8084559c0f19386c8d7d7e4cbe 100644 (file)
 ventoy_systemd_udevd_work_around
 
 ventoy_add_udev_rule "$VTOY_PATH/hook/default/udev_disk_hook.sh %k"
+
+if [ -f /init ]; then
+    vtSize=$($BUSYBOX_PATH/stat -c '%s' /init)
+    if ! [ -L /init ]; then
+        if [ $vtSize -eq 0 ]; then
+            rm -f /init
+        fi
+    fi
+fi