summaryrefslogtreecommitdiff
path: root/tweaks/base
blob: ba451b2a20fe6bf8867e4fda85f54edb717140b4 (plain)
  1. ## tidy loose ends...
  2. set -e
  3. # fix mark auto-installed packages as such
  4. # tracked at https://bugs.debian.org/730162, https://bugs.debian.org/739938
  5. 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
  6. # keep backup of any tweaked (i.e. edited or created) config file
  7. _backup(){ set -e
  8. [ -e "$1.orig" ] || if [ -e "$1" ]; then cp -a "$1" "$1.orig"
  9. else touch "$1.orig"
  10. fi; }
  11. _clone(){ set -e
  12. _backup "$2"
  13. cp -a "$1" "$2"; }
  14. _setvar(){ set -e
  15. _backup "$1"
  16. sed -i -r -e "s,^#?($2)=.*,\\1=$3," "$1"; }
  17. ## non-technical operation
  18. # auto-repair inconsistent filesystems during boot
  19. _setvar /target/etc/default/rcS FSCKFIX yes