light cleanup and simplifying, lets see if that actually works

This commit is contained in:
toby 2018-09-25 08:32:34 +00:00
parent 50c72b1cbf
commit b8a921300e
1 changed files with 3 additions and 13 deletions

View File

@ -45,7 +45,7 @@ fi
echo "Installing Debian $RELEASE..."
debootstrap --variant=minbase --include=$INCLUDES $RELEASE $MNT_DIR $MIRROR || fail "cannot install $RELEASE"
debootstrap --variant=minbase --include=$INCLUDES,$BOOT_PKG $RELEASE $MNT_DIR $MIRROR || fail "cannot install $RELEASE"
echo $HOSTNAME > $MNT_DIR/etc/hostname
@ -62,11 +62,10 @@ rm -f $MNT_DIR/etc/apt/sources.list
echo 'deb https://mirrors.wit.com/debian sid main contrib non-free' > $MNT_DIR/etc/apt/sources.list
echo 'deb https://mirrors.wit.com/debcore sid main' >> $MNT_DIR/etc/apt/sources.list
curl https://mirrors.wit.com/debcore/public.key | LANG=C DEBIAN_FRONTEND=noninteractive chroot $MNT_DIR apt-key add -
LANG=C DEBIAN_FRONTEND=noninteractive chroot $MNT_DIR apt-get update
LANG=C DEBIAN_FRONTEND=noninteractive chroot $MNT_DIR apt-get install -y $BOOT_PKG || fail "cannot install $BOOT_PKG"
LANG=C DEBIAN_FRONTEND=noninteractive chroot $MNT_DIR apt-get clean
chroot $MNT_DIR apt-get clean || fail "unable to clean apt cache"
cat /dev/null > $MNT_DIR/etc/machine-id
sed -i '/PasswordAuthentication/d' $MNT_DIR/etc/ssh/sshd_config
@ -125,14 +124,6 @@ eval \$execshutdown
EOF
cat <<EOF >$MNT_DIR/root/install.sh
#!/bin/bash
set -eo pipefail
export INSTALLEXTRA="\$@"
curl http://roberto.wit.com:8081/create_local_install.sh | bash
EOF
cat <<EOF >$MNT_DIR/etc/dhcpcd.conf
hostname
duid
@ -144,7 +135,6 @@ require dhcp_server_identifier
EOF
chmod +x $MNT_DIR/root/install.sh
chmod +x $MNT_DIR/usr/local/bin/start_me_up.sh
chmod +x $MNT_DIR/usr/local/bin/shut_me_down.sh