2007-07-01 12:01:29 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2007-10-07 08:19:06 +04:00
|
|
|
# $NetBSD: envsys,v 1.3 2007/10/07 04:19:07 xtraeme Exp $
|
2007-07-01 12:01:29 +04:00
|
|
|
#
|
|
|
|
# PROVIDE: envsys
|
|
|
|
# REQUIRE: LOGIN DAEMON
|
|
|
|
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
|
|
|
|
name="envsys"
|
|
|
|
rcvar=${name}
|
2007-10-07 08:19:06 +04:00
|
|
|
command="/usr/sbin/envstat"
|
2007-07-01 12:01:29 +04:00
|
|
|
required_files="/etc/envsys.conf"
|
2007-10-07 08:19:06 +04:00
|
|
|
start_cmd="do_start"
|
|
|
|
stop_cmd="do_stop"
|
2007-07-01 12:01:29 +04:00
|
|
|
|
2007-10-07 08:19:06 +04:00
|
|
|
do_start()
|
2007-07-01 12:01:29 +04:00
|
|
|
{
|
2007-10-07 08:19:06 +04:00
|
|
|
${command} -c ${required_files}
|
|
|
|
echo "Setting new sensor properties."
|
|
|
|
}
|
2007-07-01 12:01:29 +04:00
|
|
|
|
2007-10-07 08:19:06 +04:00
|
|
|
do_stop()
|
|
|
|
{
|
|
|
|
${command} -S
|
|
|
|
echo "Removing sensor properties."
|
2007-07-01 12:01:29 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config ${name}
|
|
|
|
run_rc_command "$1"
|