Skip to content

Commit

Permalink
make rfid reader setup an optional step
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Nov 15, 2023
1 parent 007e45c commit 367497b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
5 changes: 2 additions & 3 deletions ci/installation/run_installation_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selecti
# n dont deactivate bluetooth
# n dont disable on-chip audio
# y configure samba
# n dont use rfid reader
# y dont build local WebApp
# y build local docs
# n no kiosk mode
# y install node
# 0 No RfidReader
# n dont reboot


Expand All @@ -36,12 +36,11 @@ n
n
n
y
n
y
y
n
y
0
n
n
'
INSTALLATION_EXITCODE=$?
Expand Down
1 change: 1 addition & 0 deletions installation/includes/01_default_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ENABLE_WEBAPP=true
ENABLE_KIOSK_MODE=false
DISABLE_ONBOARD_AUDIO=false
DISABLE_ONBOARD_AUDIO_BACKUP="${RPI_BOOT_CONFIG_FILE}.backup.audio_on_$(date +%d.%m.%y_%H.%M.%S)"
ENABLE_RFID_READER=true
# Always try to use GIT with SSH first, and on failure drop down to HTTPS
GIT_USE_SSH=${GIT_USE_SSH:-"true"}

Expand Down
23 changes: 23 additions & 0 deletions installation/routines/customize_options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,28 @@ the installation. If you are unsure, stick to YES!
echo "ENABLE_SAMBA=${ENABLE_SAMBA}"
}

_option_rfid_reader() {
# ENABLE_RFID_READER
clear 1>&3
echo "---------------------- RFID READER ----------------------
Phoniebox can be controlled with rfid cards/tags, if you
have a rfid reader connected.
Choose yes to setup a reader. You get prompted for
the type selection and configuration later on.
Do you want to setup a rfid reader? [Y/n]" 1>&3
read -r response
case "$response" in
[nN][oO]|[nN])
ENABLE_RFID_READER=false
;;
*)
;;
esac
echo "ENABLE_RFID_READER=${ENABLE_RFID_READER}"
}

_option_webapp() {
# ENABLE_WEBAPP
echo "Would you like to install the web application?
Expand Down Expand Up @@ -230,6 +252,7 @@ customize_options() {
_option_bluetooth
_option_disable_onboard_audio
_option_samba
_option_rfid_reader
_option_webapp
if [[ $ENABLE_WEBAPP == true ]] ; then
_option_kiosk_mode
Expand Down
2 changes: 1 addition & 1 deletion installation/routines/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install() {
if [ "$ENABLE_SAMBA" = true ] ; then setup_samba; fi;
if [ "$ENABLE_WEBAPP" = true ] ; then setup_jukebox_webapp; fi;
if [ "$ENABLE_KIOSK_MODE" = true ] ; then setup_kiosk_mode; fi;
setup_rfid_reader
if [ "$ENABLE_RFID_READER" = true ] ; then setup_rfid_reader; fi;
optimize_boot_time
if [ "$ENABLE_AUTOHOTSPOT" = true ] ; then setup_autohotspot; fi;
cleanup
Expand Down

0 comments on commit 367497b

Please sign in to comment.