2008-03-02 21:14:01 +00:00
|
|
|
#!@PREFIX@/sbin/runscript
|
2008-01-11 15:31:10 +00:00
|
|
|
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
|
|
|
# All rights reserved. Released under the 2-clause BSD license.
|
2007-11-14 15:22:04 +00:00
|
|
|
|
2007-12-14 14:12:38 +00:00
|
|
|
description="Executes user commands in /etc/conf.d/local"
|
2007-07-10 19:09:41 +00:00
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
depend()
|
|
|
|
{
|
2007-04-05 11:18:42 +00:00
|
|
|
after *
|
2008-02-19 14:36:22 +00:00
|
|
|
keyword notimeout
|
2007-04-05 11:18:42 +00:00
|
|
|
}
|
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
start()
|
|
|
|
{
|
2007-04-05 11:18:42 +00:00
|
|
|
ebegin "Starting local"
|
|
|
|
|
2007-12-14 14:12:38 +00:00
|
|
|
if type local_start >/dev/null 2>&1; then
|
|
|
|
local_start
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Support old configs
|
2008-03-05 12:27:11 +00:00
|
|
|
if [ -e @SYSCONFDIR@/conf.d/local.start ]; then
|
|
|
|
. @SYSCONFDIR@/conf.d/local.start
|
2007-04-05 11:18:42 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
eend $? "Failed to start local"
|
|
|
|
}
|
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
stop()
|
|
|
|
{
|
2007-04-05 11:18:42 +00:00
|
|
|
ebegin "Stopping local"
|
|
|
|
|
2007-12-14 14:12:38 +00:00
|
|
|
if type local_start >/dev/null 2>&1; then
|
|
|
|
local_stop
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Support old configs
|
2008-03-05 12:27:11 +00:00
|
|
|
if [ -e @SYSCONFDIR@/conf.d/local.stop ]; then
|
|
|
|
. @SYSCONFDIR@/conf.d/local.stop
|
2007-04-05 11:18:42 +00:00
|
|
|
fi
|
|
|
|
|
2008-10-26 19:19:19 +00:00
|
|
|
eend $? "Failed to stop local"
|
2007-04-05 11:18:42 +00:00
|
|
|
}
|