Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added wifi-config and auto update #32

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
raspi-config
============

Configuration tool for the Raspberry Pi
Ensure sudo is installed.
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
20 changes: 17 additions & 3 deletions raspi-config
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -775,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)
Expand All @@ -790,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 ;;
Expand Down