[Libguestfs] [PATCH v2] builder: Don't hard-code /etc for configuration files.
Richard W.M. Jones
rjones at redhat.com
Thu Apr 6 09:27:18 UTC 2017
On Thu, Apr 06, 2017 at 11:09:09AM +0200, Pino Toscano wrote:
> On Wednesday, 5 April 2017 00:04:21 CEST Richard W.M. Jones wrote:
> > Use ./configure --sysconfdir setting.
> > ---
> > builder/paths.ml | 2 +-
> > mllib/guestfs_config.ml.in | 1 +
> > 2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/builder/paths.ml b/builder/paths.ml
> > index cbd9d4bd0..d7c4820bf 100644
> > --- a/builder/paths.ml
> > +++ b/builder/paths.ml
> > @@ -35,7 +35,7 @@ let xdg_config_home () =
> > let xdg_config_dirs () =
> > let dirs =
> > try Sys.getenv "XDG_CONFIG_DIRS"
> > - with Not_found -> "/etc/xdg" in
> > + with Not_found -> Guestfs_config.sysconfdir // "xdg" in
>
> Hmm... the XDG basedir spec says [1]:
>
> "If $XDG_CONFIG_DIRS is either not set or empty, a value equal to
> /etc/xdg should be used."
OK I'll drop this one.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
More information about the Libguestfs
mailing list