From c173c1c86224b4e89290de2f334c711e003c45d5 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Mon, 23 Nov 2015 01:31:36 +0200 Subject: [PATCH] more rootfs cleanups --- board/common/cleanups.sh | 23 +++++++++++++++++++++-- board/common/overlay/etc/motioneye.conf | 1 - board/common/postscript.sh | 1 - board/common/startup-scripts.sh | 16 ---------------- 4 files changed, 21 insertions(+), 20 deletions(-) delete mode 100755 board/common/startup-scripts.sh diff --git a/board/common/cleanups.sh b/board/common/cleanups.sh index 03515aa22b..2cb0787d5a 100755 --- a/board/common/cleanups.sh +++ b/board/common/cleanups.sh @@ -5,6 +5,9 @@ if [ -z "$TARGET" ]; then exit 1 fi +rm -f $TARGET/boot/.gitkeep + +# /etc stuff rm -rf $TARGET/etc/network/ rm -rf $TARGET/etc/dhcp/ rm -rf $TARGET/etc/ssh/ @@ -12,17 +15,23 @@ rm -rf $TARGET/etc/rc_keymaps rm -rf $TARGET/etc/default rm -rf $TARGET/etc/ctdb rm -rf $TARGET/etc/sudoers.d -rm -rf $TARGET/usr/share/locale/* rm -f $TARGET/etc/rc_maps.cfg rm -f $TARGET/etc/udev/hwdb.d/20-pci-vendor-model.hwdb rm -f $TARGET/etc/motion-dist.conf rm -f $TARGET/etc/hostname rm -f $TARGET/etc/os-release -rm -f $TARGET/boot/.gitkeep + +# /usr/share stuff +rm -rf $TARGET/usr/share/bash-completion +rm -rf $TARGET/usr/share/locale/* +rm -rf $TARGET/usr/share/ffmpeg +rm -rf $TARGET/usr/share/perl5 +rm -rf $TARGET/usr/share/common-lisp find $TARGET -name '*libmount*' | xargs rm -f +# various binaries rm -f $TARGET/bin/more rm -f $TARGET/bin/wdctl rm -f $TARGET/usr/sbin/readprofile @@ -142,6 +151,16 @@ rm -f $TARGET/usr/sbin/ctdb* rm -f $TARGET/usr/sbin/winbindd rm -f $TARGET/usr/share/perl5 +# unused python folders rm -rf $TARGET/usr/lib/python2.7/site-packages/samba rm -rf $TARGET/usr/lib/python2.7/ensurepip +# unused startup scripts +rm -f $TARGET/etc/init.d/S01logging +rm -f $TARGET/etc/init.d/S15watchdog +rm -f $TARGET/etc/init.d/S49ntp +rm -f $TARGET/etc/init.d/S50proftpd +rm -f $TARGET/etc/init.d/S20urandom +rm -f $TARGET/etc/init.d/S80dhcp-relay +rm -f $TARGET/etc/init.d/S80dhcp-server + diff --git a/board/common/overlay/etc/motioneye.conf b/board/common/overlay/etc/motioneye.conf index fb0e57f973..774921b3c1 100644 --- a/board/common/overlay/etc/motioneye.conf +++ b/board/common/overlay/etc/motioneye.conf @@ -9,7 +9,6 @@ port 80 mount_check_interval 300 motion_check_interval 10 cleanup_interval 43200 -thumbnailer_interval 60 remote_request_timeout 10 mjpg_client_timeout 10 mjpg_client_idle_timeout 10 diff --git a/board/common/postscript.sh b/board/common/postscript.sh index 18a4c055bf..c4c4cf5b7e 100755 --- a/board/common/postscript.sh +++ b/board/common/postscript.sh @@ -28,7 +28,6 @@ ln -s /tmp $TARGET/var/run ln -s /tmp $TARGET/var/spool ln -s /tmp $TARGET/var/tmp -$COMMON_DIR/startup-scripts.sh $COMMON_DIR/cleanups.sh test -x $BOARD_DIR/cleanups.sh && test -x $BOARD_DIR/cleanups.sh || true diff --git a/board/common/startup-scripts.sh b/board/common/startup-scripts.sh deleted file mode 100755 index 2835c9f4e9..0000000000 --- a/board/common/startup-scripts.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ -z "$TARGET" ]; then - echo "this script must be invoked from postscript.sh" - exit 1 -fi - -# disable startup scripts -rm -f $TARGET/etc/init.d/S01logging -rm -f $TARGET/etc/init.d/S15watchdog -rm -f $TARGET/etc/init.d/S49ntp -rm -f $TARGET/etc/init.d/S50proftpd -rm -f $TARGET/etc/init.d/S20urandom -rm -f $TARGET/etc/init.d/S80dhcp-relay -rm -f $TARGET/etc/init.d/S80dhcp-server -