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

Fix config driver enable logic #50

Merged
merged 2 commits into from
Jul 5, 2016
Merged
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
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