add ability to try to upgrade raspi-config

This commit is contained in:
Alex Bradbury 2012-07-15 18:40:06 +01:00
parent fa1d2c3708
commit 8afc286e8b

View File

@ -198,6 +198,13 @@ do_boot_behaviour() {
fi
}
do_update() {
apt-get update &&
apt-get install raspi-config &&
printf "To start raspi-config again, do 'sudo raspi-config'. Now exiting\n"
exit 0
}
do_finish() {
if [ -e /etc/profile.d/raspi-config.sh ]; then
rm -f /etc/profile.d/raspi-config.sh
@ -228,6 +235,7 @@ while true; do
"memory_split" "Change memory split" \
"ssh" "Enable or disable ssh server" \
"boot_behaviour" "Start desktop on boot?" \
"update" "Try to upgrade raspi-config" \
3>&1 1>&2 2>&3)
RET=$?
if [ $RET -eq 1 ]; then