summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--satellit_installer/includes/10-script_dropper.inc13
-rw-r--r--satellit_installer/static_files/rclocal_script.sh4
2 files changed, 5 insertions, 12 deletions
diff --git a/satellit_installer/includes/10-script_dropper.inc b/satellit_installer/includes/10-script_dropper.inc
index 2178863..a174de3 100644
--- a/satellit_installer/includes/10-script_dropper.inc
+++ b/satellit_installer/includes/10-script_dropper.inc
@@ -27,16 +27,9 @@ drop_keychanger_rclocal() {
cat > /etc/rc.local <<-HIERDOK
#!/bin/bash
echo "rc.local started: $(date "+%Y-%m-%d %H:%m:%S")" >> /root/init.log
- echo "Deleting old ssh keys..." >> /root/init.log
- rm -f /etc/ssh/ssh_host_*key* 2>/dev/null
- echo -n "... done."
-
- echo "Generating new ssh keys..." >> /root/init.log
- ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N "" -t rsa -q
- ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N "" -t dsa -q
- ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N "" -t ecdsa -q
- echo -n "... done." >> /root/init.log
- mv /etc/rc.local.sik /etc/rc.local
+ echo "Starting /root/installer/rclocal_script.sh..." >> /root/init.log
+ /root/installer/rclocal_script.sh
+ exit 0
HIERDOK
chmod +x /etc/rc.local
fi
diff --git a/satellit_installer/static_files/rclocal_script.sh b/satellit_installer/static_files/rclocal_script.sh
index 7370b22..3a345b5 100644
--- a/satellit_installer/static_files/rclocal_script.sh
+++ b/satellit_installer/static_files/rclocal_script.sh
@@ -122,7 +122,7 @@ THEREDOC
sed -i "/rclocal_script.sh/d" /etc/rc.local
unlink "/root/installer/config" 2>/dev/null
-unlink "/root/installer/rclocal_script.sh"
-
+unlink "/root/installer/rclocal_script.sh" 2>/dev/null
+mv /etc/rc.local.sik /etc/rc.local
exit 0