From 8946c6ad43d5a36cf08d94e7f202c5d910a69211 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 3 Mar 2014 11:01:37 +0100 Subject: Separate tweaks from skeleton file. Fix syntax of tweak functions (code inside {} must end with ; ). --- tweaks/base | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tweaks/base (limited to 'tweaks/base') diff --git a/tweaks/base b/tweaks/base new file mode 100644 index 0000000..e12a8cc --- /dev/null +++ b/tweaks/base @@ -0,0 +1,19 @@ +## tidy loose ends... +set -e +# fix mark auto-installed packages as such +chroot /target apt-mark auto $(chroot /target apt-mark showmanual | grep '^lib') acpi acpi-support-base acpid adduser apt apt-utils aptitude-common base-files base-passwd bash bash-completion bsdmainutils bsdutils busybox coreutils cpio cron dash debconf debconf-i18n debian-archive-keyring debianutils diffutils dmidecode dpkg e2fslibs e2fsprogs findutils fonts-freefont-ttf gcc-4.7-base gnupg gpgv grep groff-base grub-common gzip hostname ifupdown initramfs-tools initscripts insserv install-info iproute isc-dhcp-client isc-dhcp-common keyboard-configuration kmod laptop-detect linux-image-amd64 locales login logrotate lsb-base mawk mount multiarch-support ncurses-base ncurses-bin net-tools netbase netcat-traditional passwd pciutils perl-base procps readline-common rsyslog sed sensible-utils sysv-rc sysvinit sysvinit-utils tar tasksel tasksel-data tzdata udev usbutils util-linux uuid-runtime vim-common xz-utils zlib1g +# keep backup of any tweaked (i.e. edited or created) config file +_backup(){ set -e + [ -e "$1.orig" ] || if [ -e "$1" ]; then cp -a "$1" "$1.orig" + else touch "$1.orig" + fi; } +_clone(){ set -e + _backup "$2" + cp -a "$1" "$2"; } +_setvar(){ set -e + _backup "$1" + sed -i -r -e "s,^#?($2)=.*,\\1=$3," "$1"; } + +## non-technical operation +# auto-repair inconsistent filesystems during boot +_setvar /target/etc/default/rcS FSCKFIX yes -- cgit v1.2.3