2008-03-02 21:14:01 +00:00
|
|
|
#!@PREFIX@/sbin/runscript
|
2009-05-01 15:11:40 +01:00
|
|
|
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
|
2011-06-29 19:46:31 -04:00
|
|
|
# Released under the 2-clause BSD license.
|
2007-11-14 15:22:04 +00:00
|
|
|
|
2011-01-06 12:13:33 -06:00
|
|
|
description="Executes user programs in @SYSCONFDIR@/local.d"
|
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 *
|
2009-07-01 00:07:32 +01:00
|
|
|
keyword -timeout
|
2007-04-05 11:18:42 +00:00
|
|
|
}
|
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
start()
|
|
|
|
{
|
2011-01-06 12:13:33 -06:00
|
|
|
einfo "Starting local"
|
|
|
|
|
|
|
|
local file
|
|
|
|
for file in @SYSCONFDIR@/local.d/*.start ; do
|
2011-02-06 17:24:52 -05:00
|
|
|
[ -x "$file" ] && "$file"
|
2011-01-06 12:13:33 -06:00
|
|
|
done
|
2007-04-05 11:18:42 +00:00
|
|
|
|
2007-12-14 14:12:38 +00:00
|
|
|
if type local_start >/dev/null 2>&1; then
|
2011-01-06 12:13:33 -06:00
|
|
|
ewarn "@SYSCONFDIR@/conf.d/local should be removed."
|
|
|
|
ewarn "Please move the code from the local_start function"
|
|
|
|
ewarn "to scripts with an .start extension"
|
|
|
|
ewarn "in @SYSCONFDIR@/local.d"
|
2007-12-14 14:12:38 +00:00
|
|
|
local_start
|
|
|
|
fi
|
|
|
|
|
2011-04-21 13:02:49 -05:00
|
|
|
eend 0
|
2007-04-05 11:18:42 +00:00
|
|
|
}
|
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
stop()
|
|
|
|
{
|
2011-01-06 12:13:33 -06:00
|
|
|
einfo "Stopping local"
|
|
|
|
|
|
|
|
local file
|
|
|
|
for file in @SYSCONFDIR@/local.d/*.stop; do
|
2011-02-06 17:24:52 -05:00
|
|
|
[ -x "$file" ] && "$file"
|
2011-01-06 12:13:33 -06:00
|
|
|
done
|
2007-04-05 11:18:42 +00:00
|
|
|
|
2007-12-14 14:12:38 +00:00
|
|
|
if type local_start >/dev/null 2>&1; then
|
2011-01-06 12:13:33 -06:00
|
|
|
ewarn "@SYSCONFDIR@/conf.d/local should be removed."
|
|
|
|
ewarn "Please move the code from the local_stop function"
|
|
|
|
ewarn "to scripts with an .stop extension"
|
|
|
|
ewarn "in @SYSCONFDIR@/local.d"
|
2007-12-14 14:12:38 +00:00
|
|
|
local_stop
|
|
|
|
fi
|
|
|
|
|
2011-04-21 13:02:49 -05:00
|
|
|
eend 0
|
2007-04-05 11:18:42 +00:00
|
|
|
}
|