All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] liblxc: Complete use of autoconf prefix in lxc-debian
@ 2009-01-28  0:23 Matt Helsley
  2009-01-29 10:51 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Helsley @ 2009-01-28  0:23 UTC (permalink / raw)
  To: Containers

The lxc-debian script does not consistently address the lxc lock as
@LOCALSTATEDIR@/lock/subsys/lxc. Make consistent use of the autotools
substitution to completely enable configure --prefixes.

I also added a comment explaining why some of the paths didn't need
autoconf substitutions for anyone who wants to understand the script.
Also, to separate it from the container contents proper, I moved the
CACHE variable initialization above the container-internal path
variables.

Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
 scripts/lxc-debian.in |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: lxc-0.5.2/scripts/lxc-debian.in
===================================================================
--- lxc-0.5.2.orig/scripts/lxc-debian.in
+++ lxc-0.5.2/scripts/lxc-debian.in
@@ -1,18 +1,21 @@
 #!/bin/bash
 set -ex
 
+CACHE="@LOCALSTATEDIR@/cache/lxc/debian"
+
 NAME="debian"
 CONFFILE="lxc.conf"
 MNTFILE="mount.conf"
 UTSNAME=
 IPV4="172.20.0.21"
 GATEWAY="172.20.0.1"
+
+# These paths are within the container so do not need to obey configure
prefixes
 INTERFACES="/etc/network/interfaces"
 INITTAB="/etc/inittab"
 HOSTNAME="/etc/hostname"
 FSTAB="/etc/fstab"
 SSHD_CONFIG="/etc/ssh/sshd_config"
-CACHE="@LOCALSTATEDIR@/cache/lxc/debian"
 

################################################################################
 #                    debian custom configuration files
@@ -223,7 +226,7 @@ create() {
             # make a local copy of the minidebian
 	    echo -n "Copying rootfs ..."
 	    cp -a $CACHE/rootfs-$ARCH $ROOTFS && echo "Done." || exit
-	) 200>/var/lock/subsys/lxc
+	) 200> "@LOCALSTATEDIR@/lock/subsys/lxc"
     fi
 
 write_lxc_mounts
@@ -335,7 +338,7 @@ purge() {
 	rm --preserve-root --one-file-system -rf $CACHE && echo "Done." ||
exit 1
 	exit 0
 
-    ) 200>/var/lock/subsys/lxc
+    ) 200> "@LOCALSTATEDIR@/lock/subsys/lxc"
 }
 
 if [ "$(id -u)" != "0" ]; then

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-29 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28  0:23 [PATCH] liblxc: Complete use of autoconf prefix in lxc-debian Matt Helsley
2009-01-29 10:51 ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.