light cleanup and simplifying, lets see if that actually works
This commit is contained in:
parent
50c72b1cbf
commit
b8a921300e
|
@ -45,7 +45,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
echo "Installing Debian $RELEASE..."
|
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
|
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/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
|
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 -
|
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 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
|
cat /dev/null > $MNT_DIR/etc/machine-id
|
||||||
|
|
||||||
sed -i '/PasswordAuthentication/d' $MNT_DIR/etc/ssh/sshd_config
|
sed -i '/PasswordAuthentication/d' $MNT_DIR/etc/ssh/sshd_config
|
||||||
|
@ -125,14 +124,6 @@ eval \$execshutdown
|
||||||
EOF
|
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
|
cat <<EOF >$MNT_DIR/etc/dhcpcd.conf
|
||||||
hostname
|
hostname
|
||||||
duid
|
duid
|
||||||
|
@ -144,7 +135,6 @@ require dhcp_server_identifier
|
||||||
EOF
|
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/start_me_up.sh
|
||||||
chmod +x $MNT_DIR/usr/local/bin/shut_me_down.sh
|
chmod +x $MNT_DIR/usr/local/bin/shut_me_down.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue