mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 20:42:41 +02:00
Fix Copystation LCD Info
This commit is contained in:
@@ -53,16 +53,12 @@ while :
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# get config info if already available
|
# get config info if already available
|
||||||
|
source ${infoFile}
|
||||||
configExists=$(ls ${configFile} 2>/dev/null | grep -c '.conf')
|
configExists=$(ls ${configFile} 2>/dev/null | grep -c '.conf')
|
||||||
if [ ${configExists} -eq 1 ]; then
|
if [ ${configExists} -eq 1 ]; then
|
||||||
source ${configFile}
|
source ${configFile}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if setup not marked as done (=100) load boostrap info file
|
|
||||||
if [ "${setupStep}" != "100" ]; then
|
|
||||||
source ${infoFile}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if no information available from files - set default
|
# if no information available from files - set default
|
||||||
if [ ${#setupStep} -eq 0 ]; then
|
if [ ${#setupStep} -eq 0 ]; then
|
||||||
setupStep=0
|
setupStep=0
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo "# Turns the RaspiBlitz into HDD CopyStation Mode"
|
echo "# Turns the RaspiBlitz into HDD CopyStation Mode"
|
||||||
echo "# lightning is deactivated during CopyStationMode"
|
echo "# lightning is deactivated during CopyStationMode"
|
||||||
echo "# reboot RaspiBlitz to set back to normal mode"
|
echo "# reboot RaspiBlitz to set back to normal mode"
|
||||||
@@ -82,7 +82,7 @@ systemctl stop background 2>/dev/null
|
|||||||
if [ "${autoformat}" == "1" ]; then
|
if [ "${autoformat}" == "1" ]; then
|
||||||
echo "setting RaspiBlitz LCD info"
|
echo "setting RaspiBlitz LCD info"
|
||||||
sudo sed -i "s/^state=.*/state=copystation/g" /home/admin/raspiblitz.info 2>/dev/null
|
sudo sed -i "s/^state=.*/state=copystation/g" /home/admin/raspiblitz.info 2>/dev/null
|
||||||
sudo sed -i "s/^message=.*/message='Make sure target HDDs are not connected yet.\nContinue after 10 seconds ...'/g" /home/admin/raspiblitz.info 2>/dev/null
|
sudo sed -i "s/^message=.*/message='Disconnect target HDDs!'/g" /home/admin/raspiblitz.info 2>/dev/null
|
||||||
sleep 10
|
sleep 10
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
@@ -99,7 +99,7 @@ echo "$systemDrives"
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
if [ "${autoformat}" == "1" ]; then
|
if [ "${autoformat}" == "1" ]; then
|
||||||
sudo sed -i "s/^message=.*/message='Connect now HDDs to sync ..'/g" /home/admin/raspiblitz.info 2>/dev/null
|
sudo sed -i "s/^message=.*/message='Connect now target HDDs ..'/g" /home/admin/raspiblitz.info 2>/dev/null
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -238,6 +238,7 @@ Please temp lable device with: ${formatPartition}
|
|||||||
choice=$?
|
choice=$?
|
||||||
else
|
else
|
||||||
choice=0
|
choice=0
|
||||||
|
sudo sed -i "s/^message=.*/message='Formatting new HDD: ${formatPartition}'/g" /home/admin/raspiblitz.info 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# on cancel
|
# on cancel
|
||||||
@@ -298,7 +299,7 @@ OK NO FORMAT - Please remove decive now.
|
|||||||
|
|
||||||
|
|
||||||
if [ "${autoformat}" == "1" ]; then
|
if [ "${autoformat}" == "1" ]; then
|
||||||
sudo sed -i "s/^message=.*/message='Ready & Synced HDDs:\n${synced}'/g" /home/admin/raspiblitz.info 2>/dev/null
|
sudo sed -i "s/^message=.*/message='Ready & Synced HDDs: ${synced}'/g" /home/admin/raspiblitz.info 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 25
|
sleep 25
|
||||||
|
Reference in New Issue
Block a user