mirror of
https://github.com/AG7GN/nexus-utilities.git
synced 2025-05-15 14:10:09 -07:00
Updated minimum size to check for auto-expand and fixed name-radios.sh
This commit is contained in:
parent
797e56ca32
commit
c1c27d12c9
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user