Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-alt r1683 - in trunk/baselayout-prefix: sbin src
Date: Thu, 31 Mar 2011 14:14:07
Message-Id: 20110331141136.C970220054@flycatcher.gentoo.org
1 Author: grobian
2 Date: 2011-03-31 14:11:36 +0000 (Thu, 31 Mar 2011)
3 New Revision: 1683
4
5 Modified:
6 trunk/baselayout-prefix/sbin/depscan.sh
7 trunk/baselayout-prefix/src/runscript.c
8 Log:
9 applied baselayout-1.12.5-prefix-src.patch
10
11 Modified: trunk/baselayout-prefix/sbin/depscan.sh
12 ===================================================================
13 --- trunk/baselayout-prefix/sbin/depscan.sh 2011-03-31 14:11:17 UTC (rev 1682)
14 +++ trunk/baselayout-prefix/sbin/depscan.sh 2011-03-31 14:11:36 UTC (rev 1683)
15 @@ -7,7 +7,7 @@
16 fi
17
18 argv0=${0##*/}
19 -source /etc/init.d/functions.sh || {
20 +source @GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh || {
21 echo "${argv0}: Could not source /etc/init.d/functions.sh!" 1>&2
22 exit 1
23 }
24 @@ -89,7 +89,7 @@
25 fi
26
27 touch "${mtime_test}"
28 - for config in /etc/conf.d/* /etc/init.d/* /etc/rc.conf
29 + for config in @GENTOO_PORTAGE_EPREFIX@/etc/conf.d/* @GENTOO_PORTAGE_EPREFIX@/etc/init.d/* @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf
30 do
31 ! ${update} \
32 && is_older_than "${mysvcdir}/depcache" "${config}" \
33 @@ -104,7 +104,7 @@
34 rm -f "${mtime_test}"
35
36 if [[ ${clock_screw} == 1 ]] ; then
37 - ewarn "One of the files in /etc/{conf.d,init.d} or /etc/rc.conf"
38 + ewarn "One of the files in @GENTOO_PORTAGE_EPREFIX@/etc/{conf.d,init.d} or @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf"
39 ewarn "has a modification time in the future!"
40 fi
41
42 @@ -125,17 +125,17 @@
43
44 export SVCDIR DEPTYPES ORDTYPES
45
46 -cd /etc/init.d
47 +cd @GENTOO_PORTAGE_EPREFIX@/etc/init.d
48
49 -/bin/gawk \
50 - -f /lib/rcscripts/awk/functions.awk \
51 - -f /lib/rcscripts/awk/cachedepends.awk || \
52 +@GENTOO_PORTAGE_EPREFIX@/bin/gawk \
53 + -f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/functions.awk \
54 + -f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/cachedepends.awk || \
55 retval=1
56
57 -bash "${mysvcdir}/depcache" | \
58 -/bin/gawk \
59 - -f /lib/rcscripts/awk/functions.awk \
60 - -f /lib/rcscripts/awk/gendepends.awk || \
61 +@GENTOO_PORTAGE_EPREFIX@/bin/bash "${mysvcdir}/depcache" | \
62 +@GENTOO_PORTAGE_EPREFIX@/bin/gawk \
63 + -f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/functions.awk \
64 + -f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/gendepends.awk || \
65 retval=1
66
67 touch "${mysvcdir}"/dep{cache,tree}
68
69 Modified: trunk/baselayout-prefix/src/runscript.c
70 ===================================================================
71 --- trunk/baselayout-prefix/src/runscript.c 2011-03-31 14:11:17 UTC (rev 1682)
72 +++ trunk/baselayout-prefix/src/runscript.c 2011-03-31 14:11:36 UTC (rev 1683)
73 @@ -22,16 +22,16 @@
74 # define LIBDIR "lib"
75 #endif
76
77 -#define SBIN_RC "/sbin/rc"
78 -#define PROFILE_ENV "/etc/profile.env"
79 -#define RCSCRIPTS_LIB "/" LIBDIR "/rcscripts"
80 +#define SBIN_RC "@GENTOO_PORTAGE_EPREFIX@/sbin/rc"
81 +#define PROFILE_ENV "@GENTOO_PORTAGE_EPREFIX@/etc/profile.env"
82 +#define RCSCRIPTS_LIB "@GENTOO_PORTAGE_EPREFIX@/" LIBDIR "/rcscripts"
83 #define SYS_WHITELIST RCSCRIPTS_LIB "/conf.d/env_whitelist"
84 -#define USR_WHITELIST "/etc/conf.d/env_whitelist"
85 +#define USR_WHITELIST "@GENTOO_PORTAGE_EPREFIX@/etc/conf.d/env_whitelist"
86 #define RCSCRIPT_HELP RCSCRIPTS_LIB "/sh/rc-help.sh"
87 #define SELINUX_LIB RCSCRIPTS_LIB "/runscript_selinux.so"
88 #define SOFTLEVEL "SOFTLEVEL"
89
90 -#define DEFAULT_PATH "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin"
91 +#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"
92
93 #define IS_SBIN_RC() (0 == strcmp(caller, SBIN_RC))
94
95 @@ -217,7 +217,7 @@
96 int new = 1;
97
98 /* Need to be /bin/bash, else BASH is invalid */
99 - myargs[0] = "/bin/bash";
100 + myargs[0] = "@GENTOO_PORTAGE_EPREFIX@/bin/bash";
101 while (argv[new] != 0) {
102 myargs[new] = argv[new];
103 new++;
104 @@ -243,10 +243,10 @@
105 setup_selinux(argc, argv);
106
107 if (!IS_SBIN_RC()) {
108 - if (execve("/sbin/runscript.sh", myargs, myenv) < 0)
109 + if (execve("@GENTOO_PORTAGE_EPREFIX@/sbin/runscript.sh", myargs, myenv) < 0)
110 exit(1);
111 } else {
112 - if (execve("/bin/bash", myargs, myenv) < 0)
113 + if (execve("@GENTOO_PORTAGE_EPREFIX@/bin/bash", myargs, myenv) < 0)
114 exit(1);
115 }