summaryrefslogtreecommitdiff
blob: a6ee5dbf3032411d2b78b3abe0c08e7426378189 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
--- baselayout-1.12.5/src/runscript.c	2007-10-17 21:11:10 +0400
+++ baselayout-1.12.5/src/runscript.c	2007-10-17 21:13:56 +0400
@@ -22,16 +22,16 @@
 # define LIBDIR		"lib"
 #endif
 
-#define SBIN_RC		"/sbin/rc"
-#define PROFILE_ENV	"/etc/profile.env"
-#define RCSCRIPTS_LIB	"/" LIBDIR "/rcscripts"
+#define SBIN_RC		"@GENTOO_PORTAGE_EPREFIX@/sbin/rc"
+#define PROFILE_ENV	"@GENTOO_PORTAGE_EPREFIX@/etc/profile.env"
+#define RCSCRIPTS_LIB	"@GENTOO_PORTAGE_EPREFIX@/" LIBDIR "/rcscripts"
 #define SYS_WHITELIST	RCSCRIPTS_LIB "/conf.d/env_whitelist"
-#define USR_WHITELIST	"/etc/conf.d/env_whitelist"
+#define USR_WHITELIST	"@GENTOO_PORTAGE_EPREFIX@/etc/conf.d/env_whitelist"
 #define RCSCRIPT_HELP	RCSCRIPTS_LIB "/sh/rc-help.sh"
 #define SELINUX_LIB	RCSCRIPTS_LIB "/runscript_selinux.so"
 #define SOFTLEVEL	"SOFTLEVEL"
 
-#define DEFAULT_PATH	"PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin"
+#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"
 
 #define IS_SBIN_RC()	(0 == strcmp(caller, SBIN_RC))
 
@@ -217,7 +217,7 @@
 	int new = 1;
 
 	/* Need to be /bin/bash, else BASH is invalid */
-	myargs[0] = "/bin/bash";
+	myargs[0] = "@GENTOO_PORTAGE_EPREFIX@/bin/bash";
 	while (argv[new] != 0) {
 		myargs[new] = argv[new];
 		new++;
@@ -243,10 +243,10 @@
 	setup_selinux(argc, argv);
 
 	if (!IS_SBIN_RC()) {
-		if (execve("/sbin/runscript.sh", myargs, myenv) < 0)
+		if (execve("@GENTOO_PORTAGE_EPREFIX@/sbin/runscript.sh", myargs, myenv) < 0)
 			exit(1);
 	} else {
-		if (execve("/bin/bash", myargs, myenv) < 0)
+		if (execve("@GENTOO_PORTAGE_EPREFIX@/bin/bash", myargs, myenv) < 0)
 			exit(1);
 	}
 
diff -ur ./sbin/depscan.sh /Users/dirk/src@GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh
--- baselayout-1.12.5/sbin/depscan.sh	2007-10-17 21:26:21 +0400
+++ baselayout-1.12.5/sbin/depscan.sh	2007-10-17 18:58:23 +0400
@@ -7,7 +7,7 @@
 fi
 
 argv0=${0##*/}
-source /etc/init.d/functions.sh || {
+source @GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh || {
 	echo "${argv0}: Could not source /etc/init.d/functions.sh!" 1>&2
 	exit 1
 }
@@ -89,7 +91,7 @@
 	fi
 
 	touch "${mtime_test}"
-	for config in /etc/conf.d/* /etc/init.d/* /etc/rc.conf
+	for config in @GENTOO_PORTAGE_EPREFIX@/etc/conf.d/* @GENTOO_PORTAGE_EPREFIX@/etc/init.d/* @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf
 	do
 		! ${update} \
 			&& is_older_than "${mysvcdir}/depcache" "${config}" \
@@ -104,7 +106,7 @@
 	rm -f "${mtime_test}"
 
 	if [[ ${clock_screw} == 1 ]] ; then
-		ewarn "One of the files in /etc/{conf.d,init.d} or /etc/rc.conf"
+		ewarn "One of the files in @GENTOO_PORTAGE_EPREFIX@/etc/{conf.d,init.d} or @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf"
 		ewarn "has a modification time in the future!"
 	fi
 
@@ -125,17 +127,17 @@
 
 export SVCDIR DEPTYPES ORDTYPES
 
-cd /etc/init.d
+cd @GENTOO_PORTAGE_EPREFIX@/etc/init.d
 
-/bin/gawk \
-	-f /lib/rcscripts/awk/functions.awk \
-	-f /lib/rcscripts/awk/cachedepends.awk || \
+@GENTOO_PORTAGE_EPREFIX@/bin/gawk \
+	-f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/functions.awk \
+	-f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/cachedepends.awk || \
 	retval=1
 
-bash "${mysvcdir}/depcache" | \
-/bin/gawk \
-	-f /lib/rcscripts/awk/functions.awk \
-	-f /lib/rcscripts/awk/gendepends.awk || \
+@GENTOO_PORTAGE_EPREFIX@/bin/bash "${mysvcdir}/depcache" | \
+@GENTOO_PORTAGE_EPREFIX@/bin/gawk \
+	-f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/functions.awk \
+	-f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/gendepends.awk || \
 	retval=1
 
 touch "${mysvcdir}"/dep{cache,tree}