Skip to content

Commit

Permalink
Merge pull request #50 from garycmartin/master
Browse files Browse the repository at this point in the history
Fix config driver enable logic
  • Loading branch information
shawaj authored Jul 5, 2016
2 parents 8ea417e + 58ccf83 commit 4a9ca5a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bin/papirus-config
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

OPTION=$(whiptail --title "PaPiRus Config" --menu "Choose an option" 22 78 16 \
"Screen Size" "Change the screen ePaper screen size." \
"Enable Driver" "Enable and disable the ePaper driver." \
"ePaper Driver" "Enable and disable the ePaper driver." \
"Mirror Framebuffer" "Use ePaper as a general display." \
"Web Interface" "Enable the web interface." \
"Test Mode" "Enable auto test when HAT is plugged in." 3>&1 1>&2 2>&3)
"Test Mode" "Enable auto test when HAT is plugged in." 3>&1 1>&2 2>&3)

exitstatus=$?
if [ $exitstatus = 0 ]; then
Expand All @@ -23,23 +23,23 @@ if [ "$OPTION" = "Screen Size" ]; then
"2.0" "Inch " OFF \
"2.6" "Inch " OFF \
"2.7" "Inch " OFF 3>&1 1>&2 2>&3)

exitstatus=$?
if [ $exitstatus = 0 ]; then
papirus-set $DISTROS
fi

fi

if [ "$OPTION" = "Enable Driver" ]; then
if [ "$OPTION" = "ePaper Driver" ]; then

#!/bin/bash
if (whiptail --title "Enable Driver" --yes-button "Enable" --no-button "Disable" --yesno "Enable or disable the ePaper driver" 10 60) then
service epd-fuse stop
update-rc.d epd-fuse disable
else
update-rc.d epd-fuse enable
if (whiptail --title "ePaper Driver" --yes-button "Enable" --no-button "Disable" --yesno "Enable or disable the ePaper driver" 10 60) then
update-rc.d epd-fuse enable
service epd-fuse start
else
service epd-fuse stop
update-rc.d epd-fuse disable
fi

fi
Expand Down

0 comments on commit 4a9ca5a

Please sign in to comment.