From 19828c52e5b50de79739e2c206382be74e596847 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Wed, 30 Nov 2016 23:53:02 +0100 Subject: group build files into folder INSTALL Change-Id: Ib76d53f9ff0aed21f12ebd7aac66c1e877bea4a5 Signed-off-by: Stephane Desneux --- INSTALL/setup.d/10_base | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 INSTALL/setup.d/10_base (limited to 'INSTALL/setup.d/10_base') diff --git a/INSTALL/setup.d/10_base b/INSTALL/setup.d/10_base new file mode 100644 index 0000000..59dab07 --- /dev/null +++ b/INSTALL/setup.d/10_base @@ -0,0 +1,64 @@ +#!/bin/bash + +# add backports and testing repositories +echo "deb http://http.debian.net/debian jessie-backports main contrib" >>/etc/apt/sources.list +echo "deb http://http.debian.net/debian testing main contrib" >>/etc/apt/sources.list + +# setup network retries for apt +echo "Acquire::Retries 5;" >/etc/apt/apt.conf.d/99NetRetries + +# upgrade distro +apt-get update -y +apt-get dist-upgrade -y + +apt-get install -y passwd sudo openssh-server openssh-client vim systemd logrotate ifupdown locales +apt-get remove -y exim4 exim4-base exim4-config exim4-daemon-light +apt-get autoremove -y + +# remove some useless systemd services +for sysdir in /lib/systemd /etc/systemd; do + for pattern in tty udev; do + find $sysdir -name "*${pattern}*" -exec rm -rf {} \; || : + done +done +rm -f /lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount + +cp $INSTDIR/config/bashrc /etc/skel/.bash_aliases # sourced by .bashrc for new users + +# copy files for root account (already created) +find /etc/skel -type f -exec cp -av {} /root \; + +# workaround bug on dbus if host runs selinux +mkdir -p /etc/selinux/targeted/contexts/ +echo '' >/etc/selinux/targeted/contexts/dbus_contexts + +# remount selinux ro to workaround bug in apt-get +cat </etc/rc.local +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +if [ -d /sys/fs/selinux ]; then + mount -o remount,ro /sys/fs/selinux +fi + +exit 0 +EOF + +# generate locale and set to default +echo "en_US.UTF-8 UTF-8" >>/etc/locale.gen +/usr/sbin/locale-gen +echo "LANG=en_US.UTF-8" >>/etc/default/locale + + + + -- cgit