X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/d5b829f8e8c8367b032b4bb57a8fc37701d42e17..a5c706511b84eb0f9e5f042f18f2f3c9602977c4:/IMG/cpio/ventoy/init diff --git a/IMG/cpio/ventoy/init b/IMG/cpio/ventoy/init index c2b7b50..61659fc 100644 --- a/IMG/cpio/ventoy/init +++ b/IMG/cpio/ventoy/init @@ -51,7 +51,17 @@ fi # # #################################################################### cd / -rm -rf /init /linuxrc /sbin /dev/ /root +rm -rf /init /linuxrc /dev/ /root + +vtSbinFileNum=$(ls -1 /sbin | wc -l) +if [ $vtSbinFileNum -eq 1 ]; then + echo "remove whole sbin directory" >> $VTLOG + rm -rf /sbin +else + echo "remove only sbin/init file" >> $VTLOG + ls -l /sbin >> $VTLOG + rm -f /sbin/init +fi ventoy_is_initrd_ramdisk() { #As I known, PCLinuxOS use ramdisk