Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 351465 | Differences between
and this patch

Collapse All | Expand All

(-)a/Makefile (-1 / +1 lines)
Lines 4-10 Link Here
4
4
5
include Makefile.inc
5
include Makefile.inc
6
6
7
SUBDIR=		conf.d etc init.d man scripts sh src
7
SUBDIR=		conf.d etc init.d local.d man scripts sh src
8
8
9
# Build our old net foo or not
9
# Build our old net foo or not
10
_OLDNET_SH=	case "${MKOLDNET}" in \
10
_OLDNET_SH=	case "${MKOLDNET}" in \
(-)a/conf.d/Makefile (-1 / +1 lines)
Lines 1-5 Link Here
1
DIR=	${CONFDIR}
1
DIR=	${CONFDIR}
2
CONF=	bootmisc fsck hostname local localmount network staticroute urandom
2
CONF=	bootmisc fsck hostname localmount network staticroute urandom
3
3
4
TARGETS+=	network staticroute
4
TARGETS+=	network staticroute
5
CLEANFILES+=	network staticroute
5
CLEANFILES+=	network staticroute
(-)a/conf.d/local (-18 lines)
Lines 1-18 Link Here
1
# Here is where you can put anything you need to start
2
# that there is not an init script for.
3
4
local_start() {
5
	# This is a good place to load any misc programs
6
	# on startup (use &>/dev/null to hide output)
7
8
	# We should always return 0
9
	return 0
10
}
11
12
local_stop() {
13
	# This is a good place to unload any misc.
14
	# programs you started above.
15
	
16
	# We should always return 0
17
	return 0
18
}
(-)a/init.d/local.in (-5 / +21 lines)
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
}
(-)a/local.d/Makefile (+6 lines)
Line 0 Link Here
1
DIR=	${LOCALDIR}
2
CONF=	README
3
4
MK=		../mk
5
include ${MK}/os.mk
6
include ${MK}/scripts.mk
(-)a/local.d/README (+9 lines)
Line 0 Link Here
1
This directory should contain programs or scripts which are to be run
2
when the local service is started or stopped.
3
4
If a file in this directory is executable and the name ends with start,
5
it will be run when the local service is started. If a file is
6
executable and the name ends with stop, it will be run when the local
7
service is stopped.
8
9
All files are processed in lexical order.
(-)a/mk/sys.mk (-1 / +1 lines)
Lines 21-26 PICFLAG?= -fPIC Link Here
21
SYSCONFDIR?=		${PREFIX}/etc
21
SYSCONFDIR?=		${PREFIX}/etc
22
INITDIR?=		${SYSCONFDIR}/init.d
22
INITDIR?=		${SYSCONFDIR}/init.d
23
CONFDIR?=		${SYSCONFDIR}/conf.d
23
CONFDIR?=		${SYSCONFDIR}/conf.d
24
LOCALDIR?=		${SYSCONFDIR}/local.d
24
25
25
BINDIR?=		${PREFIX}/sbin
26
BINDIR?=		${PREFIX}/sbin
26
BINMODE?=		0755
27
BINMODE?=		0755
27
- 

Return to bug 351465