[lxc-devel] [PATCH] Check for an existing "$localstatedir"/lock/subsys directory and create it, if it does not exist

Stéphane Graber stgraber at ubuntu.com
Tue Nov 25 19:28:42 UTC 2014


On Wed, Oct 29, 2014 at 08:57:17PM +0100, Johannes Kastl wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi there,
> 
> after the action fallback (lxc-autostart-helper) landed in 1.0.6, the
> only thing I had to change to make this running on openSUSE is to make
> sure, that "$localstatedir"/lock/subsys exists. See my patch attached.
> 
> This patch is against 1.0.6, as I found no mention of the lock-things
> in HEAD. Did I miss it? I see there are two files now, one for net and
> one for containers, maybe it is no longer needed.
> 
> Also, I do not know it the permissions of the directory have to be set
> to a different value.
> 
> Feel free to comment or critisize, I wont be angry. ;-)
> 
> Regards,
> Johannes
> - -- 
> If you put a large switch in some cave somewhere, with a sign on it
> saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint
> wouldn't even have time to dry.
> (Terry Pratchett)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (GNU/Linux)
> Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/
> 
> iEYEARECAAYFAlRRRp0ACgkQzi3gQ/xETbKwPwCgnp6cAY1EzwltQLmpcTXOzFNb
> YhsAoJf+zK4MHwORNp06JF4p/a0xXXqn
> =bSpG
> -----END PGP SIGNATURE-----

> From 46d18772186806b6c777eb68b21dc42008169791 Mon Sep 17 00:00:00 2001
> From: Johannes Kastl <git at ojkastl.de>
> Date: Wed, 29 Oct 2014 20:46:27 +0100
> Subject: [PATCH] Check for an existing "$localstatedir"/lock/subsys directory
>  and create it, if it does not exist
> 
> Signed-off-by: Johannes Kastl <git at ojkastl.de>

Seems reasonable for stable-1.0

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  config/init/sysvinit/lxc.in | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/config/init/sysvinit/lxc.in b/config/init/sysvinit/lxc.in
> index 19c102e..ed19b1f 100644
> --- a/config/init/sysvinit/lxc.in
> +++ b/config/init/sysvinit/lxc.in
> @@ -49,6 +49,9 @@ test ! -r "$sysconfdir"/rc.d/init.d/functions ||
>  test ! -r "$sysconfdir"/sysconfig/lxc ||
>          . "$sysconfdir"/sysconfig/lxc
>  
> +# Check for an existing "$localstatedir"/lock/subsys directory
> +[ -d "$localstatedir"/lock/subsys/ ] || mkdir "$localstatedir"/lock/subsys/ || exit 1
> +
>  # Check for needed utility program
>  [ -x "$bindir"/lxc-autostart ] || exit 1
>  
> -- 
> 2.1.2
> 

> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20141125/865f7d8a/attachment.sig>


More information about the lxc-devel mailing list