From b57d7690622c1973a93961d1f63108d685b4f399 Mon Sep 17 00:00:00 2001 From: cimryan Date: Wed, 24 Oct 2018 19:18:38 -0700 Subject: [PATCH] Don't duplicate the content in rc.local. --- setup-teslausb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup-teslausb b/setup-teslausb index a48ada8..4d0cb87 100644 --- a/setup-teslausb +++ b/setup-teslausb @@ -142,9 +142,6 @@ function configure_rc_local () { echo "Configuring /etc/rc.local to run the archive scripts at startup..." echo "#!/bin/bash -eu" > ~/rc.local - # Get everything but the last two lines - tail -n +2 /etc/rc.local | sed '$d' >> ~/rc.local - echo "archiveserver=\"${archiveserver}\"" >> ~/rc.local cat << 'EOF' >> ~/rc.local LOGFILE=/tmp/rc.local.log @@ -160,7 +157,7 @@ log "All done" exit 0 EOF - cat ~/rc.local >> /etc/rc.local + cat ~/rc.local > /etc/rc.local rm ~/rc.local echo "Configured rc.local." }