The following commit has been merged in the master branch:
commit b9c535af0ea1201277ca3e7f4e631c0c5d2f4d39
Author: Damyan Ivanov <[EMAIL PROTECTED]>
Date: Tue Sep 2 15:15:09 2008 +0300
functions.sh: add support for toggling the camera
diff --git a/functions.sh b/functions.sh
index 08d89bd..972a927 100644
--- a/functions.sh
+++ b/functions.sh
@@ -68,3 +68,29 @@ toggle_bluetooth()
fi
fi
}
+
+CAM_CTL=/sys/devices/platform/eeepc/camera
+# check if camera is enabled and return success (exit code 0 if it is
+# return failure (exit code 1) if it is not
+#
+# uses the acpi platform driver interface if that is available
+# if not, assume there is not camera and return false
+camera_is_on()
+{
+ if [ -e $CAM_CTL ]; then
+ [ $( cat $CAM_CTL ) = "1" ]
+ else
+ false
+ fi
+}
+
+toggle_camera()
+{
+ if camera_is_on; then
+ echo 0 > $CAM_CTL
+ else
+ if [ -e $CAM_CTL ]; then
+ echo 1 > $CAM_CTL
+ fi
+ fi
+}
--
Maintenance of eeepc-acpi-scripts debian package
_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel