2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $FreeBSD$
|
2001-06-16 07:16:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: local
|
2002-06-13 22:14:37 +00:00
|
|
|
# REQUIRE: DAEMON
|
|
|
|
# BEFORE: LOGIN
|
2004-10-07 13:55:26 +00:00
|
|
|
# KEYWORD: shutdown
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="local"
|
2016-04-23 16:10:54 +00:00
|
|
|
desc="Run /etc/rc.local and /etc/shutdown.local"
|
2001-06-16 07:16:14 +00:00
|
|
|
start_cmd="local_start"
|
|
|
|
stop_cmd="local_stop"
|
|
|
|
|
|
|
|
local_start()
|
|
|
|
{
|
|
|
|
if [ -f /etc/rc.local ]; then
|
2008-06-22 16:23:39 +00:00
|
|
|
echo -n 'Starting local daemons:'
|
2001-06-16 07:16:14 +00:00
|
|
|
. /etc/rc.local
|
2008-06-22 16:23:39 +00:00
|
|
|
echo '.'
|
2001-06-16 07:16:14 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
local_stop()
|
|
|
|
{
|
|
|
|
if [ -f /etc/rc.shutdown.local ]; then
|
2008-06-22 16:23:39 +00:00
|
|
|
echo -n 'Shutting down local daemons:'
|
2001-06-16 07:16:14 +00:00
|
|
|
. /etc/rc.shutdown.local
|
2008-06-22 16:23:39 +00:00
|
|
|
echo '.'
|
2001-06-16 07:16:14 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|