#!/bin/sh

# live-phso_eeepc_camera - support for automatic Eee PC camera activation
# Copyright (C) 2009 Ronny Standtke <Ronny.Standtke@gmx.net>
#
# live-phso comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.

### BEGIN INIT INFO
# Provides:		live-phso
# Required-Start:	$syslog
# Required-Stop:	$syslog
# Should-Start:		$local_fs
# Should-Stop:		$local_fs
# Default-Start:	1 2 3 4 5
# Default-Stop:		0 6
# Short-Description:	live-phso init script
# Description:          support for automatic camera activation for Eee PCs
### END INIT INFO

set -e

EEE_CAMERA_FILE="/sys/devices/platform/eeepc/camera"
if [ -e ${EEE_CAMERA_FILE} ]
then
	modprobe uvcvideo
	echo "1" > ${EEE_CAMERA_FILE}
fi
