update to 5.4
[automated-distro-installer] / fai / config / scripts / GCE / 10-misc
1 #! /bin/bash
2
3 error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
4
5 # currently missing from bootstrap-vz:
6 # init.d/generate-ssh-hostkeys (currently done in rc.local/CLOUD)
7
8 ainsl -av /etc/sysctl.d/70-disable-ipv6.conf 'net.ipv6.conf.all.disable_ipv6 = 1'
9 ainsl -av /etc/sysctl.d/70-disable-ipv6.conf 'net.ipv6.conf.lo.disable_ipv6 = 0'
10 $ROOTCMD shadowconfig on
11 sed -i -e 's/^#PasswordAuthentication yes/PasswordAuthentication no/' $target/etc/ssh/sshd_config
12 sed -i -e 's/^PermitRootLogin .*/PermitRootLogin no/' $target/etc/ssh/sshd_config
13 ainsl $target/etc/ssh/sshd_config 'ClientAliveInterval 420'
14
15 rm -f $target/var/lib/apt/lists/*
16 rm -f $target/etc/resolv.conf