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

Collapse All | Expand All

(-)baselayout-1.12.5/src/runscript.c (-8 / +8 lines)
Lines 22-37 Link Here
22
# define LIBDIR		"lib"
22
# define LIBDIR		"lib"
23
#endif
23
#endif
24
24
25
#define SBIN_RC		"/sbin/rc"
25
#define SBIN_RC		"@GENTOO_PORTAGE_EPREFIX@/sbin/rc"
26
#define PROFILE_ENV	"/etc/profile.env"
26
#define PROFILE_ENV	"@GENTOO_PORTAGE_EPREFIX@/etc/profile.env"
27
#define RCSCRIPTS_LIB	"/" LIBDIR "/rcscripts"
27
#define RCSCRIPTS_LIB	"@GENTOO_PORTAGE_EPREFIX@/" LIBDIR "/rcscripts"
28
#define SYS_WHITELIST	RCSCRIPTS_LIB "/conf.d/env_whitelist"
28
#define SYS_WHITELIST	RCSCRIPTS_LIB "/conf.d/env_whitelist"
29
#define USR_WHITELIST	"/etc/conf.d/env_whitelist"
29
#define USR_WHITELIST	"@GENTOO_PORTAGE_EPREFIX@/etc/conf.d/env_whitelist"
30
#define RCSCRIPT_HELP	RCSCRIPTS_LIB "/sh/rc-help.sh"
30
#define RCSCRIPT_HELP	RCSCRIPTS_LIB "/sh/rc-help.sh"
31
#define SELINUX_LIB	RCSCRIPTS_LIB "/runscript_selinux.so"
31
#define SELINUX_LIB	RCSCRIPTS_LIB "/runscript_selinux.so"
32
#define SOFTLEVEL	"SOFTLEVEL"
32
#define SOFTLEVEL	"SOFTLEVEL"
33
33
34
#define DEFAULT_PATH	"PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin"
34
#define DEFAULT_PATH	"PATH=@GENTOO_PORTAGE_EPREFIX@/bin:@GENTOO_PORTAGE_EPREFIX@/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/local/sbin"
35
35
36
#define IS_SBIN_RC()	(0 == strcmp(caller, SBIN_RC))
36
#define IS_SBIN_RC()	(0 == strcmp(caller, SBIN_RC))
37
37
Lines 217-223 Link Here
217
	int new = 1;
217
	int new = 1;
218
218
219
	/* Need to be /bin/bash, else BASH is invalid */
219
	/* Need to be /bin/bash, else BASH is invalid */
220
	myargs[0] = "/bin/bash";
220
	myargs[0] = "@GENTOO_PORTAGE_EPREFIX@/bin/bash";
221
	while (argv[new] != 0) {
221
	while (argv[new] != 0) {
222
		myargs[new] = argv[new];
222
		myargs[new] = argv[new];
223
		new++;
223
		new++;
Lines 243-252 Link Here
243
	setup_selinux(argc, argv);
243
	setup_selinux(argc, argv);
244
244
245
	if (!IS_SBIN_RC()) {
245
	if (!IS_SBIN_RC()) {
246
		if (execve("/sbin/runscript.sh", myargs, myenv) < 0)
246
		if (execve("@GENTOO_PORTAGE_EPREFIX@/sbin/runscript.sh", myargs, myenv) < 0)
247
			exit(1);
247
			exit(1);
248
	} else {
248
	} else {
249
		if (execve("/bin/bash", myargs, myenv) < 0)
249
		if (execve("@GENTOO_PORTAGE_EPREFIX@/bin/bash", myargs, myenv) < 0)
250
			exit(1);
250
			exit(1);
251
	}
251
	}
252
252
(-)baselayout-1.12.5/src/Makefile (-1 / +1 lines)
Lines 9-15 Link Here
9
LIBDIR = lib
9
LIBDIR = lib
10
10
11
BIN_TARGETS =
11
BIN_TARGETS =
12
SBIN_TARGETS = consoletype runscript start-stop-daemon
12
SBIN_TARGETS = runscript start-stop-daemon
13
SYS_WHITELIST = env_whitelist
13
SYS_WHITELIST = env_whitelist
14
14
15
TARGET = $(BIN_TARGETS) $(SBIN_TARGETS)
15
TARGET = $(BIN_TARGETS) $(SBIN_TARGETS)
(-)baselayout-1.12.5/sbin/depscan.sh (-11 / +11 lines)
Lines 7-13 Link Here
7
fi
7
fi
8
8
9
argv0=${0##*/}
9
argv0=${0##*/}
10
source /etc/init.d/functions.sh || {
10
source @GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh || {
11
	echo "${argv0}: Could not source /etc/init.d/functions.sh!" 1>&2
11
	echo "${argv0}: Could not source /etc/init.d/functions.sh!" 1>&2
12
	exit 1
12
	exit 1
13
}
13
}
Lines 89-95 Link Here
89
	fi
91
	fi
90
92
91
	touch "${mtime_test}"
93
	touch "${mtime_test}"
92
	for config in /etc/conf.d/* /etc/init.d/* /etc/rc.conf
94
	for config in @GENTOO_PORTAGE_EPREFIX@/etc/conf.d/* @GENTOO_PORTAGE_EPREFIX@/etc/init.d/* @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf
93
	do
95
	do
94
		! ${update} \
96
		! ${update} \
95
			&& is_older_than "${mysvcdir}/depcache" "${config}" \
97
			&& is_older_than "${mysvcdir}/depcache" "${config}" \
Lines 104-110 Link Here
104
	rm -f "${mtime_test}"
106
	rm -f "${mtime_test}"
105
107
106
	if [[ ${clock_screw} == 1 ]] ; then
108
	if [[ ${clock_screw} == 1 ]] ; then
107
		ewarn "One of the files in /etc/{conf.d,init.d} or /etc/rc.conf"
109
		ewarn "One of the files in @GENTOO_PORTAGE_EPREFIX@/etc/{conf.d,init.d} or @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf"
108
		ewarn "has a modification time in the future!"
110
		ewarn "has a modification time in the future!"
109
	fi
111
	fi
110
112
Lines 125-141 Link Here
125
127
126
export SVCDIR DEPTYPES ORDTYPES
128
export SVCDIR DEPTYPES ORDTYPES
127
129
128
cd /etc/init.d
130
cd @GENTOO_PORTAGE_EPREFIX@/etc/init.d
129
131
130
/bin/gawk \
132
@GENTOO_PORTAGE_EPREFIX@/bin/gawk \
131
	-f /lib/rcscripts/awk/functions.awk \
133
	-f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/functions.awk \
132
	-f /lib/rcscripts/awk/cachedepends.awk || \
134
	-f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/cachedepends.awk || \
133
	retval=1
135
	retval=1
134
136
135
bash "${mysvcdir}/depcache" | \
137
@GENTOO_PORTAGE_EPREFIX@/bin/bash "${mysvcdir}/depcache" | \
136
/bin/gawk \
138
@GENTOO_PORTAGE_EPREFIX@/bin/gawk \
137
	-f /lib/rcscripts/awk/functions.awk \
139
	-f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/functions.awk \
138
	-f /lib/rcscripts/awk/gendepends.awk || \
140
	-f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/gendepends.awk || \
139
	retval=1
141
	retval=1
140
142
141
touch "${mysvcdir}"/dep{cache,tree}
143
touch "${mysvcdir}"/dep{cache,tree}

Return to bug 196294