diff --git a/sub.in/stage2/image-scripts.d/85cleanup-cjk b/sub.in/stage2/image-scripts.d/85cleanup-cjk index 102fdca9..90648eb5 100755 --- a/sub.in/stage2/image-scripts.d/85cleanup-cjk +++ b/sub.in/stage2/image-scripts.d/85cleanup-cjk @@ -1,5 +1,8 @@ #!/bin/sh +# don't cripple the image to be copied over +[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0 + # remove unused fonts cd /usr/share/fonts/bitmap/misc/ && rm -f *ja.* *ko.* han* gb* jis* k14* rk* *rk.* *kana* cl* *JIS* diff --git a/sub.in/stage2/image-scripts.d/85cleanup-legacy b/sub.in/stage2/image-scripts.d/85cleanup-legacy index 9dc66f29..c50ae880 100755 --- a/sub.in/stage2/image-scripts.d/85cleanup-legacy +++ b/sub.in/stage2/image-scripts.d/85cleanup-legacy @@ -1,5 +1,8 @@ #!/bin/sh +# don't cripple the image to be copied over +[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0 + # remove unused legacy/tiny fonts #cd /usr/share/fonts/bitmap/misc/ && rm -f *ISO* *KOI* [1456]* cd /usr/share/fonts/bitmap/misc/ && rm -f [1456]* diff --git a/sub.in/stage2/image-scripts.d/90cleanup-bloat-bin b/sub.in/stage2/image-scripts.d/90cleanup-bloat-bin index 4403fb05..472d1392 100755 --- a/sub.in/stage2/image-scripts.d/90cleanup-bloat-bin +++ b/sub.in/stage2/image-scripts.d/90cleanup-bloat-bin @@ -1,6 +1,11 @@ #!/bin/sh -# outstanding binaries +# don't cripple the image to be copied over +[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0 + +# purge outstanding binaries rm -f /sbin/{sash,sln,tc} rm -f /usr/bin/{openssl,ipv6log*} rm -f /bin/ipv6calc + +: diff --git a/sub.in/stage2/image-scripts.d/90cleanup-drm b/sub.in/stage2/image-scripts.d/90cleanup-drm index 241160dc..c7a7651e 100755 --- a/sub.in/stage2/image-scripts.d/90cleanup-drm +++ b/sub.in/stage2/image-scripts.d/90cleanup-drm @@ -1,5 +1,10 @@ #!/bin/sh -# no sense in xorg-dri-* without kernel-modules-drm* +# don't cripple the image to be copied over +[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0 + +# no sense in xorg-dri-* without kernel-modules-drm* stat /lib/modules/*/kernel/drivers/gpu/drm >&/dev/null \ || rm -rf /usr/lib*/X11/modules/dri/ + +: diff --git a/sub.in/stage2/image-scripts.d/97cleanup-blacklisted b/sub.in/stage2/image-scripts.d/97cleanup-blacklisted index 9c372598..85311c50 100755 --- a/sub.in/stage2/image-scripts.d/97cleanup-blacklisted +++ b/sub.in/stage2/image-scripts.d/97cleanup-blacklisted @@ -1,7 +1,12 @@ #!/bin/sh +# don't cripple the image to be copied over +[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0 + # blacklisted kernel modules sed -n 's/^blacklist[[:space:]]\+\([^[:space:]]\+\).*/\1/p' /etc/modprobe.d/* | while read i; do find /lib/modules/ -type f -name "$i.ko" -delete done + +: diff --git a/sub.in/stage2/image-scripts.d/99cleanup-boot b/sub.in/stage2/image-scripts.d/99cleanup-boot index cee75e47..df7e3bac 100755 --- a/sub.in/stage2/image-scripts.d/99cleanup-boot +++ b/sub.in/stage2/image-scripts.d/99cleanup-boot @@ -1,6 +1,9 @@ #!/bin/sh -# no need for the kernel in live root -# (unless it's a live-install): -# it's been booted already -[ -x /usr/sbin/live-install ] || [ -x /usr/sbin/livecd-install ] || rm -f /boot/* +# don't cripple the image to be copied over +[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install ] && exit 0 + +# no need for the kernel in live root otherwise: it's been booted already +rm -f /boot/* + +: