remove firstbootscript first, then do rest

This commit is contained in:
josch 2014-01-10 18:13:00 +01:00
parent 83ba112abb
commit 1e5ad4fdf1

View file

@ -8,6 +8,9 @@ cat > $ROOTDIR/etc/init.d/firstboot << __END__
# Default-Stop:
### END INIT INFO
update-rc.d -f firstboot remove
# generating ssh host key to be unique
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 ""
@ -15,8 +18,6 @@ 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 ""
update-rc.d -f firstboot remove
__END__
chmod +x $ROOTDIR/etc/init.d/firstboot