add RC_PREFIX environment variable
This will be used by init scripts which want to be able to run in a Gentoo Prefix installation. RC_PREFIX will contain the prefix offset.
This commit is contained in:
parent
918d261658
commit
5092595835
@ -352,6 +352,9 @@ Default runlevel chosen. Default is default.
|
|||||||
.It Va RC_SYS
|
.It Va RC_SYS
|
||||||
A special variable to describe the system more.
|
A special variable to describe the system more.
|
||||||
Possible values are OPENVZ, XENU, XEN0, UML and VSERVER.
|
Possible values are OPENVZ, XENU, XEN0, UML and VSERVER.
|
||||||
|
.It Va RC_PREFIX
|
||||||
|
In a Gentoo Prefix installation, this variable contains the prefix
|
||||||
|
offset. Otherwise it is undefined.
|
||||||
.It Va RC_UNAME
|
.It Va RC_UNAME
|
||||||
The result of `uname -s`.
|
The result of `uname -s`.
|
||||||
.El
|
.El
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
#define RC_PREFIX "@PREFIX@"
|
||||||
#define RC_SYSCONFDIR "@SYSCONFDIR@"
|
#define RC_SYSCONFDIR "@SYSCONFDIR@"
|
||||||
#define RC_LIBDIR "@PREFIX@/@LIB@/rc"
|
#define RC_LIBDIR "@PREFIX@/@LIB@/rc"
|
||||||
#define RC_LIBEXECDIR "@LIBEXECDIR@"
|
#define RC_LIBEXECDIR "@LIBEXECDIR@"
|
||||||
|
@ -191,6 +191,10 @@ env_config(void)
|
|||||||
if (sys)
|
if (sys)
|
||||||
setenv("RC_SYS", sys, 1);
|
setenv("RC_SYS", sys, 1);
|
||||||
|
|
||||||
|
#ifdef PREFIX
|
||||||
|
setenv("RC_PREFIX", RC_PREFIX, 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Some scripts may need to take a different code path if
|
/* Some scripts may need to take a different code path if
|
||||||
Linux/FreeBSD, etc
|
Linux/FreeBSD, etc
|
||||||
To save on calling uname, we store it in an environment variable */
|
To save on calling uname, we store it in an environment variable */
|
||||||
|
Loading…
Reference in New Issue
Block a user