#! /bin/bash fcopy /etc/init.d/expand-root if [ -f $target/files/etc/init.d/expand-root ]; then $ROOTCMD insserv --default expand-root fi sed -i "s/PermitRootLogin yes/PermitRootLogin without-password/" $target/etc/ssh/sshd_config ainsl /etc/ssh/sshd_config 'ClientAliveInterval 120' ainsl -a /etc/modprobe.d/blacklist.conf 'blacklist pcspkr' ainsl -a /etc/modprobe.d/blacklist.conf 'blacklist floppy' rm -f $target/etc/resolv.conf $target/etc/udev/rules.d/70-persistent-net.rules $target/lib/udev/write_net_rules shred --remove $target/etc/ssh/ssh_host_* # FIXME: DHCP RFC3442 is used incorrect in Azure if [ -f $target/etc/dhcp/dhclient.conf ]; then sed -ie 's,rfc3442-classless-static-routes,disabled-\0,' $target/etc/dhcp/dhclient.conf fi