mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-18 18:07:45 +01:00
#293 moving raspiblitz.conf creation after HDD gets added
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
## get basic info
|
## get basic info
|
||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
echo "*** Adding HDD to the System ***"
|
echo "*** Adding HDD to the System ***"
|
||||||
echo "started from state(${state})"
|
echo "started from state(${state})"
|
||||||
@@ -45,6 +45,16 @@ if [ ${existsHDD} -gt 0 ]; then
|
|||||||
echo "OK - HDD is mounted"
|
echo "OK - HDD is mounted"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# init the RASPIBLITZ Config
|
||||||
|
source /home/admin/_version.info
|
||||||
|
configFile="/mnt/hdd/raspiblitz.conf"
|
||||||
|
echo "# RASPIBLITZ CONFIG FILE" > $configFile
|
||||||
|
echo "raspiBlitzVersion='${codeVersion}'" >> $configFile
|
||||||
|
echo "network=${network}" >> $configFile
|
||||||
|
echo "chain=${chain}" >> $configFile
|
||||||
|
echo "hostname=${hostname}" >> $configFile
|
||||||
|
sudo chmod 777 ${configFile}
|
||||||
|
|
||||||
# move SSH pub keys to HDD so that they survive an update
|
# move SSH pub keys to HDD so that they survive an update
|
||||||
echo "moving SSH pub keys to HDD"
|
echo "moving SSH pub keys to HDD"
|
||||||
sudo cp -r /etc/ssh /mnt/hdd/ssh
|
sudo cp -r /etc/ssh /mnt/hdd/ssh
|
||||||
|
|||||||
@@ -19,16 +19,6 @@ dialog --backtitle "RaspiBlitz - Setup" --title " RaspiBlitz Setup is done :) "
|
|||||||
Press OK for a final reboot.
|
Press OK for a final reboot.
|
||||||
" 10 42
|
" 10 42
|
||||||
|
|
||||||
# init the RASPIBLITZ Config
|
|
||||||
echo "# RASPIBLITZ CONFIG FILE" > $configFile
|
|
||||||
echo "raspiBlitzVersion='${codeVersion}'" >> $configFile
|
|
||||||
sudo chmod 777 ${configFile}
|
|
||||||
|
|
||||||
# transfer data from SD info file
|
|
||||||
echo "hostname=${hostname}" >> $configFile
|
|
||||||
echo "network=${network}" >> $configFile
|
|
||||||
echo "chain=${chain}" >> $configFile
|
|
||||||
|
|
||||||
# let migration/init script do the rest
|
# let migration/init script do the rest
|
||||||
/home/admin/_bootstrap.migration.sh
|
/home/admin/_bootstrap.migration.sh
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ echo "message=" >> $infoFile
|
|||||||
echo "network=${network}" >> $infoFile
|
echo "network=${network}" >> $infoFile
|
||||||
echo "chain=${chain}" >> $infoFile
|
echo "chain=${chain}" >> $infoFile
|
||||||
echo "setupStep=${setupStep}" >> $infoFile
|
echo "setupStep=${setupStep}" >> $infoFile
|
||||||
|
echo "hostname=${hostname}" >> $infoFile
|
||||||
sudo chmod 777 ${infoFile}
|
sudo chmod 777 ${infoFile}
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|||||||
Reference in New Issue
Block a user