Linux Container Development
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Containers
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: [PATCH] liblxc: Complete use of autoconf prefix in lxc-debian
Date: Tue, 27 Jan 2009 16:23:28 -0800	[thread overview]
Message-ID: <1233102208.9544.10.camel@localhost> (raw)

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

             reply	other threads:[~2009-01-28  0:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28  0:23 Matt Helsley [this message]
2009-01-29 10:51 ` [PATCH] liblxc: Complete use of autoconf prefix in lxc-debian Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1233102208.9544.10.camel@localhost \
    --to=matthltc-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox