View | Details | Raw Unified | Return to bug 159306
Collapse All | Expand All

(-)/usr/ports/multimedia/webcamd/Makefile (-1 / +1 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	webcamd
8
PORTNAME=	webcamd
9
PORTVERSION=	3.0.0.1
9
PORTVERSION=	3.0.0.1
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	multimedia
11
CATEGORIES=	multimedia
12
MASTER_SITES=	http://www.selasky.org/hans_petter/distfiles/ \
12
MASTER_SITES=	http://www.selasky.org/hans_petter/distfiles/ \
13
		http://hselasky.homeunix.org:8192/distfiles/
13
		http://hselasky.homeunix.org:8192/distfiles/
(-)/usr/ports/multimedia/webcamd/files/webcamd.in (-7 / +23 lines)
Lines 7-12 Link Here
7
# Add the following line to /etc/rc.conf[.local] to enable webcamd:
7
# Add the following line to /etc/rc.conf[.local] to enable webcamd:
8
#
8
#
9
# webcamd_enable="YES"
9
# webcamd_enable="YES"
10
# webcamd_device="ugenX.X"
10
#
11
#
11
12
12
webcamd_enable=${webcamd_enable-"NO"}
13
webcamd_enable=${webcamd_enable-"NO"}
Lines 20-39 Link Here
20
command_args="-B -U webcamd -G webcamd"
21
command_args="-B -U webcamd -G webcamd"
21
22
22
start_precmd="${name}_prestart"
23
start_precmd="${name}_prestart"
24
start_postcmd="${name}_fixpidfile"
25
stop_precmd="${name}_check_vars"
23
26
24
webcamd_prestart()
27
webcamd_prestart()
25
{
28
{
26
  if checkyesno hald_enable ; then
29
  if checkyesno hald_enable ; then
27
	command_args="$command_args -H"
30
	command_args="$command_args -H"
28
  fi
31
  fi
32
  webcamd_check_vars
29
}
33
}
30
34
31
pidfile="/var/run/webcamd.*.0.pid"
35
webcamd_check_vars()
36
{
37
	if [ $# -gt 1 ]; then
38
		webcamd_device="$2"
39
	elif [ "x${webcamd_device}" = "x" ]; then
40
		warn "You should set webcamd_device before running this"
41
		return 1
42
	fi
43
	command_args="$command_args -d ${webcamd_device} -i 0"
44
	pidfile="/var/run/webcamd.${webcamd_device##ugen}.0.pid"
45
}
46
47
webcamd_fixpidfile()
48
{
49
	read pid < $pidfile
50
	pid="$(expr $pid + 1)"
51
	echo -n "$pid" > $pidfile
52
}
32
53
33
load_rc_config $name
54
load_rc_config $name
34
if [ $# -gt 1 ]; then
55
run_rc_command $1
35
	pidfile="webcamd.dummy"
36
	command_args="$command_args -d $2 -i 0"
37
	# Only run the rc command if the appropriate arguments are specified:	
38
	run_rc_command $1
39
fi
(-)/usr/ports/multimedia/webcamd/pkg-message (-1 / +8 lines)
Lines 12-17 Link Here
12
12
13
2) Please restart devd as the configuration changed
13
2) Please restart devd as the configuration changed
14
14
15
	# /etc/rc.d/devd restart
15
       # /etc/rc.d/devd restart
16
17
3) The rc.d script for webcamd is testing. You can try in by adding
18
19
       webcamd_enable="YES"
20
       webcamd_device="ugenX.X" # your webcam device
21
22
to your /etc/rc.conf
16
23
17
*********************************************************************
24
*********************************************************************

Return to bug 159306