Lines 2-8
Link Here
|
2 |
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name> |
2 |
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name> |
3 |
# All rights reserved. Released under the 2-clause BSD license. |
3 |
# All rights reserved. Released under the 2-clause BSD license. |
4 |
|
4 |
|
5 |
description="Executes user commands in /etc/conf.d/local" |
5 |
description="Executes user programs in @SYSCONFDIR@/local.d" |
6 |
|
6 |
|
7 |
depend() |
7 |
depend() |
8 |
{ |
8 |
{ |
Lines 12-33
depend()
Link Here
|
12 |
|
12 |
|
13 |
start() |
13 |
start() |
14 |
{ |
14 |
{ |
15 |
ebegin "Starting local" |
15 |
einfo "Starting local" |
|
|
16 |
|
17 |
local file |
18 |
for file in @SYSCONFDIR@/local.d/*start ; do |
19 |
[ -x $file ] && $file |
20 |
done |
16 |
|
21 |
|
17 |
if type local_start >/dev/null 2>&1; then |
22 |
if type local_start >/dev/null 2>&1; then |
|
|
23 |
ewarn "@SYSCONFDIR@/conf.d/local should be removed." |
24 |
ewarn "Please move the code from the local_start function" |
25 |
ewarn "to scripts ending in start in @SYSCONFDIR@/local.d" |
18 |
local_start |
26 |
local_start |
19 |
fi |
27 |
fi |
20 |
|
28 |
|
21 |
eend $? "Failed to start local" |
29 |
return 0 |
22 |
} |
30 |
} |
23 |
|
31 |
|
24 |
stop() |
32 |
stop() |
25 |
{ |
33 |
{ |
26 |
ebegin "Stopping local" |
34 |
einfo "Stopping local" |
|
|
35 |
|
36 |
local file |
37 |
for file in @SYSCONFDIR@/local.d/*stop; do |
38 |
[ -x $file ] && $file |
39 |
done |
27 |
|
40 |
|
28 |
if type local_start >/dev/null 2>&1; then |
41 |
if type local_start >/dev/null 2>&1; then |
|
|
42 |
ewarn "@SYSCONFDIR@/conf.d/local should be removed." |
43 |
ewarn "Please move the code from the local_stop function" |
44 |
ewarn "to scripts ending in stop in @SYSCONFDIR@/local.d" |
29 |
local_stop |
45 |
local_stop |
30 |
fi |
46 |
fi |
31 |
|
47 |
|
32 |
eend $? "Failed to stop local" |
48 |
return 0 |
33 |
} |
49 |
} |