From d0acb97e4961350ec8ae88414c715e3633165651 Mon Sep 17 00:00:00 2001 From: Ryan Walmsley Date: Fri, 5 Apr 2013 13:36:33 +0100 Subject: [PATCH 1/4] First part of rastrack addition --- raspi-config | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/raspi-config b/raspi-config index 1175c4f..ef04ee9 100755 --- a/raspi-config +++ b/raspi-config @@ -336,6 +336,13 @@ do_boot_behaviour() { fi } +show_rastrackname() { + whiptail --inputbox "Username / Nickname For Rastrack Addition" 20 70 + whiptail --inputbox "Email Address For Rastrack Addition" 20 70 + + +} + do_update() { apt-get update && apt-get install raspi-config && From 0f5bbc6cb0a5bb51b0367ac6855b352653da6e09 Mon Sep 17 00:00:00 2001 From: Ryan Walmsley Date: Fri, 5 Apr 2013 13:37:56 +0100 Subject: [PATCH 2/4] Rastrack --- raspi-config | 1 + 1 file changed, 1 insertion(+) diff --git a/raspi-config b/raspi-config index ef04ee9..6fee02a 100755 --- a/raspi-config +++ b/raspi-config @@ -426,6 +426,7 @@ while true; do "overclock" "Configure overclocking" \ "ssh" "Enable or disable ssh server" \ "boot_behaviour" "Start desktop on boot?" \ + "rastrack" "Add this Pi to the Raspberry Pi Map - Rastrack" \ "update" "Try to upgrade raspi-config" \ 3>&1 1>&2 2>&3) RET=$? From e6bd8741beebb5c58ef80b53b89b6d84c796e45a Mon Sep 17 00:00:00 2001 From: Ryan Walmsley Date: Fri, 5 Apr 2013 13:43:00 +0100 Subject: [PATCH 3/4] Rastrack v2 --- raspi-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raspi-config b/raspi-config index 6fee02a..744fb56 100755 --- a/raspi-config +++ b/raspi-config @@ -336,7 +336,7 @@ do_boot_behaviour() { fi } -show_rastrackname() { +do_rastrack() { whiptail --inputbox "Username / Nickname For Rastrack Addition" 20 70 whiptail --inputbox "Email Address For Rastrack Addition" 20 70 @@ -414,7 +414,7 @@ fi # Interactive use loop # while true; do - FUN=$(whiptail --menu "Raspi-config" 20 80 12 --cancel-button Finish --ok-button Select \ + FUN=$(whiptail --menu "Raspi-config" 20 80 13 --cancel-button Finish --ok-button Select \ "info" "Information about this tool" \ "expand_rootfs" "Expand root partition to fill SD card" \ "overscan" "Change overscan" \ From ae17b14e4b7a3e570b10dbcf5b9b5c5cf5f1872e Mon Sep 17 00:00:00 2001 From: Ryan Walmsley Date: Fri, 5 Apr 2013 14:05:06 +0100 Subject: [PATCH 4/4] Finished Rastrack Addition Possibility --- raspi-config | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/raspi-config b/raspi-config index 744fb56..6c307d5 100755 --- a/raspi-config +++ b/raspi-config @@ -337,10 +337,9 @@ do_boot_behaviour() { } do_rastrack() { - whiptail --inputbox "Username / Nickname For Rastrack Addition" 20 70 - whiptail --inputbox "Email Address For Rastrack Addition" 20 70 - - + UNAME=$(whiptail --inputbox "Username / Nickname For Rastrack Addition" 20 70 3>&1 1>&2 2>&3) + EMAIL=$(whiptail --inputbox "Email Address For Rastrack Addition" 20 70 3>&1 1>&2 2>&3) + curl --data "name=$UNAME&email=$EMAIL" http://rastrack.co.uk/api.php } do_update() {