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 |
|