diff --git a/initialize-pi.sh b/initialize-pi.sh index 01d59bd..4564776 100755 --- a/initialize-pi.sh +++ b/initialize-pi.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION="1.17.5" +VERSION="1.17.6" # # Script to generate new VNC server and SSH server keys at boot time if a certain @@ -250,10 +250,10 @@ fi echo "" > $HOME/.bash_history && history -c echo "Delete shell history" >> "$INIT_DONE_FILE" -# Expand the filesystem if it is < 8 GB +# Expand the filesystem if it is < 10 GB echo "Expand filesystem if needed" >> "$INIT_DONE_FILE" PARTSIZE=$( df | sed -n '/root/{s/ */ /gp}' | cut -d ' ' -f2 ) -THRESHOLD=$((8 * 1024 * 1024)) +THRESHOLD=$((10 * 1024 * 1024)) (( $PARTSIZE < $THRESHOLD )) && sudo raspi-config --expand-rootfs >> "$INIT_DONE_FILE" echo "Raspberry Pi initialization complete" >> "$INIT_DONE_FILE" diff --git a/name-radios.sh b/name-radios.sh index c75e386..a54b3b6 100755 --- a/name-radios.sh +++ b/name-radios.sh @@ -15,7 +15,7 @@ #% #================================================================ #- IMPLEMENTATION -#- version ${SCRIPT_NAME} 1.3.4 +#- version ${SCRIPT_NAME} 1.3.5 #- author Steve Magnuson, AG7GN #- license CC-BY-SA Creative Commons License #- script_id 0 @@ -216,7 +216,7 @@ echo "RIGHT_RADIO_NAME=\"$RIGHT_RADIO_NAME\"" >> "$CONFIG_FILE" D="/usr/local/share/applications" for F in `ls $D/*-left.template` `ls $D/*-right.template` do - sudo sed -e "s/_LEFT_RADIO_/$LEFT_RADIO_NAME/" -e "s/_RIGHT_RADIO_/$RIGHT_RADIO_NAME/g" $F > ${F%.*}.desktop + sed -e "s/_LEFT_RADIO_/$LEFT_RADIO_NAME/" -e "s/_RIGHT_RADIO_/$RIGHT_RADIO_NAME/g" $F | sudo tee ${F%.*}.desktop 1>/dev/null done SafeExit