[lxc-devel] [PATCH] $(localstatedir) != $(prefix)/var

Guido Trotter ultrotter at google.com
Fri Mar 27 20:47:25 UTC 2009


On Fri, Mar 27, 2009 at 8:18 PM, Guido Trotter <ultrotter at google.com> wrote:
> The current code assumes that localstatedir is equal to $(prefix)/var,
> thus failing for example on debian, where prefix is /usr and
> localstatedir is /var. This patch fixes this, and also sets the
> permission of $(localstatedir)/lxc to be 2777 rather than just 777 thus
> making it slightly better for concurrent usage by all users.
>
> Signed-off-by: Guido Trotter <ultrotter at quaqua.net>
> ---
>  src/lxc/Makefile.am |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
> index 1c13c85..1c1cb65 100644
> --- a/src/lxc/Makefile.am
> +++ b/src/lxc/Makefile.am
> @@ -130,5 +130,5 @@ lxc_version_SOURCES = lxc_version.c
>  lxc_version_LDADD = liblxc.la
>
>  install-exec-local:
> -       @mkdir -p $(localstatedir) && mkdir -p $(prefix)/var/lxc && \
> -       chmod ugo+rw $(prefix)/var/lxc
> +       @mkdir -p $(localstatedir) && mkdir -p $(localstatedir)/lxc && \
> +       chmod 2777 $(localstatedir)/lxc

BTW just a question: why are we even doing this? When is this dir
used, and for what?
(I actually need to move it away from there, I hadn't realized it yet,
so if it's used I need to find a better place for it, or at least make
it configurably better) :)

Thanks,

Guido




More information about the lxc-devel mailing list