2008-03-03 02:44:01 +05:30
|
|
|
#!@PREFIX@/sbin/runscript
|
2009-05-01 19:41:40 +05:30
|
|
|
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
|
2011-06-30 05:16:31 +05:30
|
|
|
# Released under the 2-clause BSD license.
|
2007-11-14 20:52:04 +05:30
|
|
|
|
2011-01-06 23:43:33 +05:30
|
|
|
description="Executes user programs in @SYSCONFDIR@/local.d"
|
2007-07-11 00:39:41 +05:30
|
|
|
|
2008-01-11 17:43:46 +05:30
|
|
|
depend()
|
|
|
|
{
|
2007-04-05 16:48:42 +05:30
|
|
|
after *
|
2009-07-01 04:37:32 +05:30
|
|
|
keyword -timeout
|
2007-04-05 16:48:42 +05:30
|
|
|
}
|
|
|
|
|
2008-01-11 17:43:46 +05:30
|
|
|
start()
|
|
|
|
{
|
2011-01-06 23:43:33 +05:30
|
|
|
einfo "Starting local"
|
|
|
|
|
|
|
|
local file
|
|
|
|
for file in @SYSCONFDIR@/local.d/*.start ; do
|
2011-02-07 03:54:52 +05:30
|
|
|
[ -x "$file" ] && "$file"
|
2011-01-06 23:43:33 +05:30
|
|
|
done
|
2007-04-05 16:48:42 +05:30
|
|
|
|
2007-12-14 19:42:38 +05:30
|
|
|
if type local_start >/dev/null 2>&1; then
|
2011-01-06 23:43:33 +05:30
|
|
|
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 19:42:38 +05:30
|
|
|
local_start
|
|
|
|
fi
|
|
|
|
|
2011-04-21 23:32:49 +05:30
|
|
|
eend 0
|
2007-04-05 16:48:42 +05:30
|
|
|
}
|
|
|
|
|
2008-01-11 17:43:46 +05:30
|
|
|
stop()
|
|
|
|
{
|
2011-01-06 23:43:33 +05:30
|
|
|
einfo "Stopping local"
|
|
|
|
|
|
|
|
local file
|
|
|
|
for file in @SYSCONFDIR@/local.d/*.stop; do
|
2011-02-07 03:54:52 +05:30
|
|
|
[ -x "$file" ] && "$file"
|
2011-01-06 23:43:33 +05:30
|
|
|
done
|
2007-04-05 16:48:42 +05:30
|
|
|
|
2007-12-14 19:42:38 +05:30
|
|
|
if type local_start >/dev/null 2>&1; then
|
2011-01-06 23:43:33 +05:30
|
|
|
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 19:42:38 +05:30
|
|
|
local_stop
|
|
|
|
fi
|
|
|
|
|
2011-04-21 23:32:49 +05:30
|
|
|
eend 0
|
2007-04-05 16:48:42 +05:30
|
|
|
}
|