From 1642cf2142f3628aefd56bdf11ee0c0678fdc043 Mon Sep 17 00:00:00 2001 From: thehermit Date: Sat, 4 Mar 2017 20:22:32 +0000 Subject: [PATCH] Change Case and add export --- payloads/library/bunny_helpers.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/payloads/library/bunny_helpers.sh b/payloads/library/bunny_helpers.sh index 4b157bc9..acb2f9c3 100644 --- a/payloads/library/bunny_helpers.sh +++ b/payloads/library/bunny_helpers.sh @@ -28,14 +28,15 @@ check_switch() { switch3=`cat /sys/class/gpio_sw/PL3/data` echo "--- switch1 = $switch1, switch2 = $switch2, switch3 = $switch3" if [ "x$switch1" = "x0" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x1" ]; then - switchposition="switch1" + SWITCH_POSITION="switch1" elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x0" ] && [ "x$switch3" = "x1" ]; then - switchposition="switch2" + SWITCH_POSITION="switch2" elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x0" ]; then - switchposition="switch3" + SWITCH_POSITION="switch3" else - switchposition="invalid" + SWITCH_POSITION="invalid" fi } -check_switch \ No newline at end of file +check_switch +export SWITCH_POSITION \ No newline at end of file