polystrap/default/hooks/firstboot

24 lines
735 B
Text
Raw Permalink Normal View History

2011-06-22 07:50:36 +00:00
cat > $ROOTDIR/etc/init.d/firstboot << __END__
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: firstboot
# Required-Start: \$all
# Required-Stop:
# Default-Start: S
# Default-Stop:
### END INIT INFO
2014-06-21 13:18:34 +00:00
update-rc.d -f firstboot remove
# generating ssh host key to be unique
2014-06-26 12:09:55 +00:00
#for f in rsa dsa ecdsa; do rm -rf /etc/ssh/ssh_host_\${f}_key; done
#echo "generating ssh rsa key..."
#ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C "" -N ""
#echo "generating ssh dsa key..."
#ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C "" -N ""
#echo "generating ssh ecdsa key..."
#ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -C "" -N ""
2011-06-22 07:50:36 +00:00
chmod +x $ROOTDIR/etc/init.d/firstboot
fakechroot chroot $ROOTDIR update-rc.d firstboot start 99 S