diff --git a/debian/changelog b/debian/changelog index a677d58..13b5d77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -wit-hypervisor-config (1.0) unstable; urgency=low +wit-hypervisor-config (1.1) unstable; urgency=low * Initial release. diff --git a/debian/wit-hypervisor-config.postinst b/debian/wit-hypervisor-config.postinst index ffc9432..6f3b6b8 100755 --- a/debian/wit-hypervisor-config.postinst +++ b/debian/wit-hypervisor-config.postinst @@ -44,6 +44,7 @@ case "$1" in [ $HOSTTYPE = datanode -a $DOMAINNAME = .usw1.wit.com ] && export TIER_ID=4 [ $HOSTTYPE = hypervisor -a $DOMAINNAME = .usw2.wit.com ] && export TIER_ID=18 [ $HOSTTYPE = datanode -a $DOMAINNAME = .usw2.wit.com ] && export TIER_ID=20 + [ $HOSTTYPE != hypervisor -a $HOSTTYPE != datanode ] && sed -i -e '/TIER_ID/d' -e "$ s/$/\nTIER_ID=$TIER_ID/" /etc/environment if [ -z "$TIER_ID" ]; then @@ -65,10 +66,14 @@ case "$1" in ## START writing config files - echo "auto lo:0" >/etc/network/interfaces.d/lo - echo "iface lo:0 inet static" >> /etc/network/interfaces.d/lo + sed -i -e '/#*PasswordAuthentication /d' /etc/ssh/sshd_config + echo "PasswordAuthentication no" >>/etc/ssh/sshd_config + + + echo "iface lo inet static" > /etc/network/interfaces.d/lo echo " address ${LOOPBACKv4}/32" >> /etc/network/interfaces.d/lo - echo "iface lo:0 inet6 static" >> /etc/network/interfaces.d/lo + echo "" >> /etc/network/interfaces.d/lo + echo "iface lo inet6 static" >> /etc/network/interfaces.d/lo echo " address ${LOOPBACKv6}/128" >> /etc/network/interfaces.d/lo @@ -109,7 +114,7 @@ case "$1" in systemctl enable firewall systemctl restart systemd-timesyncd - systemctl restart strongswan + systemctl restart ssh update-grub