mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Change Case and add export
This commit is contained in:
parent
751c84834f
commit
1642cf2142
@ -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
|
||||
check_switch
|
||||
export SWITCH_POSITION
|
||||
Loading…
x
Reference in New Issue
Block a user