Skip to content

Commit

Permalink
Add /boot/config.txt symlink fix
Browse files Browse the repository at this point in the history
  • Loading branch information
makermelissa committed Jan 5, 2024
1 parent 27ac7a9 commit 0706b27
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions voice_bonnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,19 @@ reconfig() {
fi
}

# If /boot/firmware/config.txt exists, make sure /boot/config.txt is a symlink to it
fix_config_symlink() {
if [ -f /boot/firmware/config.txt ]; then
if [ ! -L /boot/config.txt ]; then
warning "/boot/config.txt was overwritten as a file by another script."
if confirm "/boot/config.txt will be moved to /boot/firmware/config.txt and the symlink restored. Do you wish to continue?"; then
sudo mv /boot/config.txt /boot/firmware/config.txt
sudo ln -s /boot/firmware/config.txt /boot/config.txt
fi
fi
fi
}

arch_check() {
IS_ARM64=false
IS_ARMHF=false
Expand Down Expand Up @@ -360,6 +373,8 @@ if confirm "Do you wish to continue?"; then
newline
echo "Checking hardware requirements..."

fix_config_symlink

if [ -e $CONFIG ] && grep -q "^device_tree=$" $CONFIG; then
DEVICE_TREE=false
fi
Expand Down

0 comments on commit 0706b27

Please sign in to comment.