#!/bin/bash set -e install() { echo -n installing $@ ... apt-get -y install $@ >/dev/null && echo done } export DEBIAN_FRONTEND=noninteractive export HOME=/root export TERM=dumb echo -n setting up mirror for FRANCE... mv /etc/apt/sources.list /etc/apt/sources.list.dist cat > /etc/apt/sources.list </dev/null && echo done # STDERR debconf: delaying package configuration, since apt-utils is not installed install apt-utils 2>/dev/null install locales tzdata # https://superuser.com/questions/885170/locales-broken-on-beaglebone-black-running-debian/885431 [[ ! -f /usr/share/locale/locale.alias ]] && ln -s /etc/locale.alias /usr/share/locale/locale.alias echo LANG=en_US.UTF-8 > /etc/default/locale echo en_US.UTF-8 UTF-8 > /etc/locale.gen locale-gen export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export LANGUAGE=en_US:en # check the locale as perl usually complains perl -e exit echo setting up time zone echo "Europe/Paris" > /etc/timezone #echo "Europe/Moscow" > /etc/timezone rm -f /etc/localtime ln -s ../usr/share/zoneinfo/Europe/Paris /etc/localtime #ln -s ../usr/share/zoneinfo/Europe/Moscow /etc/localtime dpkg-reconfigure tzdata # this gets in the way during dist-upgrade thereafter # sysvinit: creating /run/initctl # sysvinit: restarting... dpkg --purge sysvinit-core echo -n dist-upgrade... apt-get -y dist-upgrade >/dev/null && echo done echo -n autoremove with purge... apt-get -y autoremove --purge >/dev/null && echo done [[ -n `dpkg -l | grep ^rc` ]] && echo DPKG LEFTOVER RC CLEAN-UP REQUIRED # 25/tcp is listening by default and this is anoying #echo -n getting rid of exim4... #apt-get -y purge exim4-base exim4-config exim4-daemon-light # not sure how it got there but we prefer elvis-tiny dpkg --purge vim-common vim-tiny # apt-utils already installed above install \ apt-transport-https \ biff \ bzip2 \ colordiff \ curl \ dialog \ dma \ dnsutils \ dos2unix \ elvis-tiny \ git \ htop \ iftop \ ifupdown \ iputils-ping \ iotop \ ksh \ less \ lftp \ lsb-release \ lynx \ man-db \ manpages \ mlocate \ mtr \ net-tools \ netcat \ ngrep \ nmap \ openssh-server \ openssh-client \ procps \ pwgen \ software-properties-common \ sysstat \ telnet \ unzip \ uuid \ uuid-runtime \ wget \ whois \ xxd install dumb-init cron echo -n preparing rc.local ... # no exist cat > /etc/rc.local <> /etc/bash.bashrc <