mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Set CONFIG_LEAF_DIR with configure to give control if needed. The check for the correct value if the option is not specified is tricky. Since other packages (such as grub2) started to populate also /etc/default/ a given system may have both directories. Use "default" only if /etc/sysconfig does not exist. "sysconfig" remains the default. Move the variable from StdGNU.mk to Linux.mk because thats the only place where it is used. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> [ ijc -- ran autogen.sh as requested ]
28 lines
1.3 KiB
Plaintext
28 lines
1.3 KiB
Plaintext
With directory layout differences between Red Hat, Debian, Suse and
|
|
other distros one needs to set the variables for the elements below
|
|
|
|
-----------------+------------------+---------------+----------------+
|
|
| Red Hat | Debian | Suse |
|
|
-----------------+------------------+---------------+----------------+
|
|
CONFIG_LEAF_DIR | sysconfig | default | sysconfig |
|
|
INITD_DIR | /etc/rc.d/init.d | /etc/init.d | /etc/init.d |
|
|
-----------------+------------------+---------------+----------------+
|
|
|
|
The existence of these directories are tested at build-time (on the
|
|
build host, via the "setvar_dir" macro in Config.mk) and for some
|
|
scripts at run-time. If the Red Hat directory exists, it is used;
|
|
otherwise the Debian one is used.
|
|
|
|
The INITD_DIR path can be changed with configure --with-initddir=DIR.
|
|
The CONFIG_LEAF_DIR name can be changed with configure
|
|
--with-sysconfig-leaf-dir=SUBDIR.
|
|
|
|
To add support for new distributions that don't use the above locations,
|
|
one must grep for the above elements and add appropriate checks.
|
|
|
|
For example if a new distro uses /etc/bork as its config dir, it's not
|
|
sufficient to set CONFIG_LEAF_DIR=bork; one must also add tests for the
|
|
existence of the bork dir in every context where config files are read.
|
|
|
|
|