[device]: do not export gpio{1,2} if already exist on S6000 (#1547)

This commit is contained in:
lguohan 2018-03-29 23:39:49 -07:00 committed by GitHub
parent 37d0ff3ef7
commit a5bfa2c7ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,8 +5,8 @@ if [ "$install_env" = "onie" ]; then
echo "Replace ONIE reboot with Dell reset commands"
# set I2C GPIO mux
echo 1 > /sys/class/gpio/export
echo 2 > /sys/class/gpio/export
[ -d /sys/class/gpio/gpio1 ] || echo 1 > /sys/class/gpio/export
[ -d /sys/class/gpio/gpio2 ] || echo 2 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio1/direction
echo out > /sys/class/gpio/gpio2/direction
echo 0 > /sys/class/gpio/gpio1/value