Add files via upload

This commit is contained in:
Chris Boudacoff 2018-05-04 08:16:49 +03:00 committed by GitHub
parent 422afb31a6
commit 0bfa83ff9e
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,19 @@
#!/bin/bash
UENV_PATH="/boot/uEnv.txt"
set -e
if [ "$(id -u)" -ne "0" ]; then
echo "This script requires root."
exit 1
fi
case $1 in
on) sed -i.bak '/debug=/c\debug=on' $UENV_PATH
echo "Debug on headphone port enabled. Please reboot !"
;;
off) sed -i.bak '/debug=/c\debug=off' $UENV_PATH
echo "Debug on headphone port disabled. Please reboot !"
;;
*)
echo "Unknown option! Usage: debug_switch on|off "
esac