X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/05a1b863a66bf72b26e5d87570c4e0e61b9736cd..ca07b52cb2f4798f4e72eed6187ae33e0c6ef585:/IMG/cpio/ventoy/hook/default/ventoy-hook.sh diff --git a/IMG/cpio/ventoy/hook/default/ventoy-hook.sh b/IMG/cpio/ventoy/hook/default/ventoy-hook.sh index 152dd06..56e0e35 100644 --- a/IMG/cpio/ventoy/hook/default/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/default/ventoy-hook.sh @@ -22,3 +22,12 @@ 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