From 8fcf92e026ee88a973d23ad48b1dc6a1ea94e08b Mon Sep 17 00:00:00 2001 From: penn5 Date: Thu, 3 Oct 2013 07:40:17 +0100 Subject: [PATCH 1/5] Update raspi-config --- raspi-config | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/raspi-config b/raspi-config index efcfff36..25dc5115 100755 --- a/raspi-config +++ b/raspi-config @@ -643,6 +643,20 @@ do_apply_os_config() { printf "Language '%s' not handled currently. Run sudo raspi-config to set up" "$NOOBSLANGUAGE" ;; esac + +do_update_control() { + whiptail --yesno "Activate automatic updating" 20 60 2 --yes-button "Enable" --no-button "Disable" + RET=$? + if [ "$RET" = 1 ]; then + sudo rm /etc/cron.daily/update.sh + return 0 + fi + if [ "$RET" = 0 ]; then + sudo cp /var/cache/raspi-config-update /etc/cron.daily/update.sh + sudo chmod +x /etc/cron.daily/update.sh + + fi +} if [ -n "$DEBLANGUAGE" ]; then printf "Setting language to %s based on os_config.json from NOOBS. May take a while\n" "$DEBLANGUAGE" From 5383895ec3d7eafb233e343b1b9c5099960df530 Mon Sep 17 00:00:00 2001 From: penn5 Date: Thu, 3 Oct 2013 17:06:09 +0100 Subject: [PATCH 2/5] Create README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..2c0c8c4c --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +raspi-config +============ + +Configuration tool for the Raspberry Pi +Ensure sudo is installed. +Write a shell script which updates your package manager's repositorys and upgrades all programs installed by it. place it in /var/cache/raspi-config-update From 38caf7bbd0aea45a57652e56c2a1d37c3266e447 Mon Sep 17 00:00:00 2001 From: penn5 Date: Thu, 3 Oct 2013 17:50:45 +0100 Subject: [PATCH 3/5] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c0c8c4c..ea37e9a0 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,6 @@ raspi-config Configuration tool for the Raspberry Pi Ensure sudo is installed. -Write a shell script which updates your package manager's repositorys and upgrades all programs installed by it. place it in /var/cache/raspi-config-update +Write a shell script which updates your package manager's repositories and upgrades all programs installed by it. place it in /var/cache/raspi-config-update +Then type cp ./raspi-config/raspi-config /usr/bin/raspi-config and then sudo chmod +x /usr/bin/raspi-config +To start type sudo raspi-config From 49fe0890a584a25e01fc03067187d3be54ab6418 Mon Sep 17 00:00:00 2001 From: penn5 Date: Thu, 3 Oct 2013 19:33:12 +0100 Subject: [PATCH 4/5] Update raspi-config --- raspi-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raspi-config b/raspi-config index 25dc5115..f9fea423 100755 --- a/raspi-config +++ b/raspi-config @@ -789,7 +789,7 @@ while true; do "4 Internationalisation Options" "Set up language and regional settings to match your location" \ "5 Enable Camera" "Enable this Pi to work with the Raspberry Pi Camera" \ "6 Add to Rastrack" "Add this Pi to the online Raspberry Pi Map (Rastrack)" \ - "7 Overclock" "Configure overclocking for your Pi" \ + "7 Auto Update" "Configure auto updating for your Pi" \ "8 Advanced Options" "Configure advanced settings" \ "9 About raspi-config" "Information about this configuration tool" \ 3>&1 1>&2 2>&3) @@ -804,7 +804,7 @@ while true; do 4\ *) do_internationalisation_menu ;; 5\ *) do_camera ;; 6\ *) do_rastrack ;; - 7\ *) do_overclock ;; + 7\ *) do_update_control ;; 8\ *) do_advanced_menu ;; 9\ *) do_about ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; From 4b14d0c780cc88dc961c2bc45a978630b4d40529 Mon Sep 17 00:00:00 2001 From: penn5 Date: Thu, 3 Oct 2013 19:36:43 +0100 Subject: [PATCH 5/5] Update raspi-config --- raspi-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspi-config b/raspi-config index f9fea423..2cb1321b 100755 --- a/raspi-config +++ b/raspi-config @@ -2,7 +2,7 @@ # Part of raspi-config http://github.com/asb/raspi-config # # See LICENSE file for copyright and license details - +#by penn5 INTERACTIVE=True ASK_TO_REBOOT=0