Created
February 24, 2010 23:59
-
-
Save endemics/314049 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# simple script to toggle on/off the camera of my eeepc 1000ha | |
camera=/sys/devices/platform/eeepc/camera | |
if [ `cat $camera` -eq 1 ] | |
then | |
echo -n "disabling the camera..." | |
echo 0 > $camera | |
lsusb |grep "UVC Webcam" 2>&1 >/dev/null | |
if [ $? -eq 1 ] | |
then | |
echo "[OK]" | |
else | |
echo "[KO]" | |
fi | |
else | |
echo -n "enabling the camera..." | |
echo 1 > $camera | |
lsusb |grep "UVC Webcam" 2>&1 >/dev/null | |
if [ $? -eq 0 ] | |
then | |
echo "[OK]" | |
else | |
echo "[KO]" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment