mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 18:37:41 +01:00
Compare commits
1 Commits
lit-v0.15.
...
5118-gpt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57cb9669ee |
@@ -1342,16 +1342,16 @@ if [ "$action" = "copy-system" ]; then
|
|||||||
|
|
||||||
# RASPBERRY PI
|
# RASPBERRY PI
|
||||||
if [ "${computerType}" = "raspberrypi" ]; then
|
if [ "${computerType}" = "raspberrypi" ]; then
|
||||||
echo "# RaspberryPi - set LBA flag" >> ${logFile}
|
echo "# RaspberryPi - set ESP flag" >> ${logFile}
|
||||||
parted /dev/${actionDevice} --script set 1 lba on
|
parted /dev/${actionDevice} --script set 1 esp on
|
||||||
|
|
||||||
# DEBUG: Log partition count after LBA flag
|
# DEBUG: Log partition count after ESP flag
|
||||||
afterLBAPartitionCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterESPPartitionCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
echo "# DEBUG: Partition count after LBA flag: ${afterLBAPartitionCount}" >> ${logFile}
|
echo "# DEBUG: Partition count after ESP flag: ${afterESPPartitionCount}" >> ${logFile}
|
||||||
|
|
||||||
isFlagSetLBA=$(parted /dev/${actionDevice} --script print | grep -c 'fat32.*lba')
|
isFlagSetESP=$(parted /dev/${actionDevice} --script print | grep -c 'esp')
|
||||||
if [ ${isFlagSetLBA} -eq 0 ]; then
|
if [ ${isFlagSetESP} -eq 0 ]; then
|
||||||
echo "error='failed to set LBA flag'"
|
echo "error='failed to set ESP flag'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "# RaspberryPi - Bootorder" >> ${logFile}
|
echo "# RaspberryPi - Bootorder" >> ${logFile}
|
||||||
@@ -1368,25 +1368,14 @@ if [ "$action" = "copy-system" ]; then
|
|||||||
|
|
||||||
# VM & PC
|
# VM & PC
|
||||||
else
|
else
|
||||||
echo "# VM & PC - set BOOT/ESP flag" >> ${logFile}
|
echo "# VM & PC - set ESP flag" >> ${logFile}
|
||||||
parted /dev/${actionDevice} --script set 1 boot on
|
|
||||||
|
|
||||||
# DEBUG: Log partition count after boot flag
|
|
||||||
afterBootPartitionCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
|
||||||
echo "# DEBUG: Partition count after boot flag: ${afterBootPartitionCount}" >> ${logFile}
|
|
||||||
|
|
||||||
parted /dev/${actionDevice} --script set 1 esp on
|
parted /dev/${actionDevice} --script set 1 esp on
|
||||||
|
|
||||||
# DEBUG: Log partition count after setting ESP flag
|
# DEBUG: Log partition count after setting ESP flag
|
||||||
afterESPPartitionCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterESPPartitionCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
echo "# DEBUG: Partition count after ESP flag: ${afterESPPartitionCount}" >> ${logFile}
|
echo "# DEBUG: Partition count after ESP flag: ${afterESPPartitionCount}" >> ${logFile}
|
||||||
|
|
||||||
isFlagSetBOOT=$(parted /dev/${actionDevice} --script print | grep -c 'fat32.*boot')
|
isFlagSetESP=$(parted /dev/${actionDevice} --script print | grep -c 'esp')
|
||||||
if [ ${isFlagSetBOOT} -eq 0 ]; then
|
|
||||||
echo "error='failed to set BOOT flag'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
isFlagSetESP=$(parted /dev/${actionDevice} --script print | grep -c 'fat32.*esp')
|
|
||||||
if [ ${isFlagSetESP} -eq 0 ]; then
|
if [ ${isFlagSetESP} -eq 0 ]; then
|
||||||
echo "error='failed to set ESP flag'"
|
echo "error='failed to set ESP flag'"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -1721,7 +1710,7 @@ if [ "$action" = "setup" ]; then
|
|||||||
afterWipeFsCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterWipeFsCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
echo "# DEBUG SETUP SYSTEM: Partition count after wipefs: ${afterWipeFsCount}" >> ${logFile}
|
echo "# DEBUG SETUP SYSTEM: Partition count after wipefs: ${afterWipeFsCount}" >> ${logFile}
|
||||||
|
|
||||||
parted /dev/${actionDevice} --script mklabel msdos
|
parted /dev/${actionDevice} --script mklabel gpt
|
||||||
|
|
||||||
# DEBUG: Log partition count after mklabel
|
# DEBUG: Log partition count after mklabel
|
||||||
afterMklabelCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterMklabelCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
@@ -1770,16 +1759,16 @@ if [ "$action" = "setup" ]; then
|
|||||||
|
|
||||||
# RASPBERRY PI
|
# RASPBERRY PI
|
||||||
if [ "${computerType}" = "raspberrypi" ]; then
|
if [ "${computerType}" = "raspberrypi" ]; then
|
||||||
echo "# RaspberryPi - set LBA flag" >> ${logFile}
|
echo "# RaspberryPi - set ESP flag" >> ${logFile}
|
||||||
parted /dev/${actionDevice} --script set 1 lba on
|
parted /dev/${actionDevice} --script set 1 esp on
|
||||||
|
|
||||||
# DEBUG: Log partition count after LBA flag
|
# DEBUG: Log partition count after ESP flag
|
||||||
afterLBASystemCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterESPSysteemCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
echo "# DEBUG SETUP SYSTEM: Partition count after LBA flag: ${afterLBASystemCount}" >> ${logFile}
|
echo "# DEBUG SETUP SYSTEM: Partition count after ESP flag: ${afterESPSysteemCount}" >> ${logFile}
|
||||||
|
|
||||||
isFlagSetLBA=$(parted /dev/${actionDevice} --script print | grep -c 'fat32.*lba')
|
isFlagSetESP=$(parted /dev/${actionDevice} --script print | grep -c 'esp')
|
||||||
if [ ${isFlagSetLBA} -eq 0 ]; then
|
if [ ${isFlagSetESP} -eq 0 ]; then
|
||||||
echo "error='failed to set LBA flag'"
|
echo "error='failed to set ESP flag'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "# RaspberryPi - Bootorder" >> ${logFile}
|
echo "# RaspberryPi - Bootorder" >> ${logFile}
|
||||||
@@ -1796,25 +1785,14 @@ if [ "$action" = "setup" ]; then
|
|||||||
|
|
||||||
# VM & PC
|
# VM & PC
|
||||||
else
|
else
|
||||||
echo "# VM & PC - set BOOT/ESP flag" >> ${logFile}
|
echo "# VM & PC - set ESP flag" >> ${logFile}
|
||||||
parted /dev/${actionDevice} --script set 1 boot on
|
|
||||||
|
|
||||||
# DEBUG: Log partition count after boot flag
|
|
||||||
afterBootFlagSystemCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
|
||||||
echo "# DEBUG SETUP SYSTEM: Partition count after boot flag: ${afterBootFlagSystemCount}" >> ${logFile}
|
|
||||||
|
|
||||||
parted /dev/${actionDevice} --script set 1 esp on
|
parted /dev/${actionDevice} --script set 1 esp on
|
||||||
|
|
||||||
# DEBUG: Log partition count after setting ESP flag
|
# DEBUG: Log partition count after setting ESP flag
|
||||||
afterESPFlagSystemCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterESPFlagSystemCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
echo "# DEBUG SETUP SYSTEM: Partition count after ESP flag: ${afterESPFlagSystemCount}" >> ${logFile}
|
echo "# DEBUG SETUP SYSTEM: Partition count after ESP flag: ${afterESPFlagSystemCount}" >> ${logFile}
|
||||||
|
|
||||||
isFlagSetBOOT=$(parted /dev/${actionDevice} --script print | grep -c 'fat32.*boot')
|
isFlagSetESP=$(parted /dev/${actionDevice} --script print | grep -c 'esp')
|
||||||
if [ ${isFlagSetBOOT} -eq 0 ]; then
|
|
||||||
echo "error='failed to set BOOT flag'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
isFlagSetESP=$(parted /dev/${actionDevice} --script print | grep -c 'fat32.*esp')
|
|
||||||
if [ ${isFlagSetESP} -eq 0 ]; then
|
if [ ${isFlagSetESP} -eq 0 ]; then
|
||||||
echo "error='failed to set ESP flag'"
|
echo "error='failed to set ESP flag'"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -1843,7 +1821,7 @@ if [ "$action" = "setup" ]; then
|
|||||||
afterWipeFsStorageCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterWipeFsStorageCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
echo "# DEBUG SETUP STORAGE: Partition count after wipefs: ${afterWipeFsStorageCount}" >> ${logFile}
|
echo "# DEBUG SETUP STORAGE: Partition count after wipefs: ${afterWipeFsStorageCount}" >> ${logFile}
|
||||||
|
|
||||||
parted /dev/${actionDevice} --script mklabel msdos >> ${logFile}
|
parted /dev/${actionDevice} --script mklabel gpt >> ${logFile}
|
||||||
|
|
||||||
# DEBUG: Log partition count after mklabel
|
# DEBUG: Log partition count after mklabel
|
||||||
afterMklabelStorageCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterMklabelStorageCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
@@ -1938,7 +1916,7 @@ if [ "$action" = "setup" ]; then
|
|||||||
afterWipeFsNoBootCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterWipeFsNoBootCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
echo "# DEBUG SETUP STORAGE NO-BOOT: Partition count after wipefs: ${afterWipeFsNoBootCount}" >> ${logFile}
|
echo "# DEBUG SETUP STORAGE NO-BOOT: Partition count after wipefs: ${afterWipeFsNoBootCount}" >> ${logFile}
|
||||||
|
|
||||||
parted /dev/${actionDevice} --script mklabel msdos >> ${logFile}
|
parted /dev/${actionDevice} --script mklabel gpt >> ${logFile}
|
||||||
|
|
||||||
# DEBUG: Log partition count after mklabel
|
# DEBUG: Log partition count after mklabel
|
||||||
afterMklabelNoBootCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterMklabelNoBootCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
@@ -2007,7 +1985,7 @@ if [ "$action" = "setup" ]; then
|
|||||||
afterWipeFsDataCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterWipeFsDataCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
echo "# DEBUG SETUP DATA: Partition count after wipefs: ${afterWipeFsDataCount}" >> ${logFile}
|
echo "# DEBUG SETUP DATA: Partition count after wipefs: ${afterWipeFsDataCount}" >> ${logFile}
|
||||||
|
|
||||||
parted /dev/${actionDevice} --script mklabel msdos
|
parted /dev/${actionDevice} --script mklabel gpt
|
||||||
|
|
||||||
# DEBUG: Log partition count after mklabel
|
# DEBUG: Log partition count after mklabel
|
||||||
afterMklabelDataCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
afterMklabelDataCount=$(partx -g /dev/"${actionDevice}" 2>/dev/null | wc -l)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# https://github.com/lightninglabs/lightning-terminal/releases
|
# https://github.com/lightninglabs/lightning-terminal/releases
|
||||||
LITVERSION="0.15.2-alpha"
|
LITVERSION="0.14.1-alpha"
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
@@ -12,7 +12,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check who signed the release in https://github.com/lightninglabs/lightning-terminal/releases
|
# check who signed the release in https://github.com/lightninglabs/lightning-terminal/releases
|
||||||
PGPsigner="ViktorTigerstrom"
|
PGPsigner="guggero"
|
||||||
|
|
||||||
if [ $PGPsigner = ellemouton ]; then
|
if [ $PGPsigner = ellemouton ]; then
|
||||||
pgpPubKey="D7D916376026F177"
|
pgpPubKey="D7D916376026F177"
|
||||||
@@ -45,7 +45,7 @@ Use your Password B to login.\n
|
|||||||
Hidden Service address for the Tor Browser (see LCD for QR):
|
Hidden Service address for the Tor Browser (see LCD for QR):
|
||||||
https://${toraddress}\n
|
https://${toraddress}\n
|
||||||
For the command line switch to 'lit' user with: 'sudo su - lit'
|
For the command line switch to 'lit' user with: 'sudo su - lit'
|
||||||
use the commands: 'lncli', 'litcli', 'lit-loop', 'lit-pool', 'lit-frcli' and 'tapcli'.
|
use the commands: 'lncli', 'lit-loop', 'lit-pool' and 'lit-frcli'.
|
||||||
" 19 74
|
" 19 74
|
||||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
sudo /home/admin/config.scripts/blitz.display.sh hide
|
||||||
else
|
else
|
||||||
@@ -57,7 +57,7 @@ ${fingerprint}\n
|
|||||||
Use your Password B to login.\n
|
Use your Password B to login.\n
|
||||||
Activate TOR to access the web interface from outside your local network.\n
|
Activate TOR to access the web interface from outside your local network.\n
|
||||||
For the command line switch to 'lit' user with: 'sudo su - lit'
|
For the command line switch to 'lit' user with: 'sudo su - lit'
|
||||||
use the commands: 'lncli', 'litcli', 'loop', 'pool', 'frcli' and 'tapcli'.
|
use the commands: 'lncli', 'lit-loop', 'lit-pool' and 'lit-frcli'.
|
||||||
" 19 63
|
" 19 63
|
||||||
fi
|
fi
|
||||||
echo "please wait ..."
|
echo "please wait ..."
|
||||||
@@ -150,16 +150,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
sudo ln -s /mnt/hdd/app-data/.pool/ /home/lit/.pool
|
sudo ln -s /mnt/hdd/app-data/.pool/ /home/lit/.pool
|
||||||
sudo chown lit:lit -R /mnt/hdd/app-data/.pool
|
sudo chown lit:lit -R /mnt/hdd/app-data/.pool
|
||||||
|
|
||||||
echo "# Taproot Assets"
|
|
||||||
# move old data if present
|
|
||||||
sudo mv /home/loop/.tapd /mnt/hdd/app-data/ 2>/dev/null
|
|
||||||
echo "# make sure the data directory exists"
|
|
||||||
sudo mkdir -p /mnt/hdd/app-data/.tapd
|
|
||||||
echo "# symlink"
|
|
||||||
sudo rm -rf /home/lit/.tapd # not a symlink.. delete it silently
|
|
||||||
sudo ln -s /mnt/hdd/app-data/.tapd/ /home/lit/.tapd
|
|
||||||
sudo chown lit:lit -R /mnt/hdd/app-data/.tapd
|
|
||||||
|
|
||||||
echo "Detect CPU architecture ..."
|
echo "Detect CPU architecture ..."
|
||||||
isARM=$(uname -m | grep -c 'arm')
|
isARM=$(uname -m | grep -c 'arm')
|
||||||
isAARCH64=$(uname -m | grep -c 'aarch64')
|
isAARCH64=$(uname -m | grep -c 'aarch64')
|
||||||
@@ -230,7 +220,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
sudo install -m 0755 -o root -g root -t /usr/local/bin litd
|
sudo install -m 0755 -o root -g root -t /usr/local/bin litd
|
||||||
sudo install -m 0755 -o root -g root -t /usr/local/bin loop
|
sudo install -m 0755 -o root -g root -t /usr/local/bin loop
|
||||||
sudo install -m 0755 -o root -g root -t /usr/local/bin pool
|
sudo install -m 0755 -o root -g root -t /usr/local/bin pool
|
||||||
sudo install -m 0755 -o root -g root -t /usr/local/bin tapcli
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
# config #
|
# config #
|
||||||
@@ -327,21 +316,15 @@ WantedBy=multi-user.target
|
|||||||
|
|
||||||
# aliases
|
# aliases
|
||||||
echo "
|
echo "
|
||||||
alias litcli=\"litcli --rpcserver=localhost:8443 \
|
alias lit-loop=\"loop --rpcserver=localhost:8443 \
|
||||||
--tlscertpath=/home/lit/.lit/tls.cert \
|
|
||||||
--macaroonpath=/home/lit/.lit/${chain}net/lit.macaroon\"
|
|
||||||
alias loop=\"loop --rpcserver=localhost:8443 \
|
|
||||||
--tlscertpath=/home/lit/.lit/tls.cert \
|
--tlscertpath=/home/lit/.lit/tls.cert \
|
||||||
--macaroonpath=/home/lit/.loop/${chain}net/loop.macaroon\"
|
--macaroonpath=/home/lit/.loop/${chain}net/loop.macaroon\"
|
||||||
alias pool=\"pool --rpcserver=localhost:8443 \
|
alias lit-pool=\"pool --rpcserver=localhost:8443 \
|
||||||
--tlscertpath=/home/lit/.lit/tls.cert \
|
--tlscertpath=/home/lit/.lit/tls.cert \
|
||||||
--macaroonpath=/home/lit/.pool/${chain}net/pool.macaroon\"
|
--macaroonpath=/home/lit/.pool/${chain}net/pool.macaroon\"
|
||||||
alias frcli=\"frcli --rpcserver=localhost:8443 \
|
alias lit-frcli=\"frcli --rpcserver=localhost:8443 \
|
||||||
--tlscertpath=/home/lit/.lit/tls.cert \
|
--tlscertpath=/home/lit/.lit/tls.cert \
|
||||||
--macaroonpath=/home/lit/.faraday/${chain}net/faraday.macaroon\"
|
--macaroonpath=/home/lit/.faraday/${chain}net/faraday.macaroon\"
|
||||||
alias tapcli=\"tapcli --rpcserver=localhost:8443 \
|
|
||||||
--tlscertpath=/home/lit/.lit/tls.cert \
|
|
||||||
--macaroonpath=/home/lit/.tapd/data/${chain}net/admin.macaroon\"
|
|
||||||
" | sudo tee -a /home/lit/.bashrc
|
" | sudo tee -a /home/lit/.bashrc
|
||||||
|
|
||||||
# open ports on firewall
|
# open ports on firewall
|
||||||
|
|||||||
Reference in New Issue
Block a user