[Lxc-users] [PATCH] fix broken lxc-*.in scripts

Greg Kurz gkurz at fr.ibm.com
Thu Sep 15 09:55:21 UTC 2011


Commit 92c7f6295518decd3989b2790d758888551e7d9a broke the following scipts:
- lxc-setcap
- lxc-setuid
- lxc-create

This patch adds the missing variables to be substitued by the configure
script.

Cheers.

Signed-off-by: Greg Kurz <gkurz at fr.ibm.com>
---

 src/lxc/lxc-create.in |    1 +
 src/lxc/lxc-setcap.in |    4 +++-
 src/lxc/lxc-setuid.in |    4 +++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc-create.in b/src/lxc/lxc-create.in
index 63750e9..d14c32e 100644
--- a/src/lxc/lxc-create.in
+++ b/src/lxc/lxc-create.in
@@ -50,6 +50,7 @@ shortoptions='hn:f:t:'
 longoptions='help,name:,config:,template:'
 lxc_path=@LXCPATH@
 bindir=@BINDIR@
+libdir=@LIBDIR@
 templatedir=@LXCTEMPLATEDIR@
 
 getopt=$(getopt -o $shortoptions --longoptions  $longoptions -- "$@")
diff --git a/src/lxc/lxc-setcap.in b/src/lxc/lxc-setcap.in
index 3226769..47954ab 100644
--- a/src/lxc/lxc-setcap.in
+++ b/src/lxc/lxc-setcap.in
@@ -72,12 +72,14 @@ lxc_dropcaps()
     chmod 0755 @LXCPATH@
 }
 
+libdir=@LIBDIR@
+localstatedir=@LOCALSTATEDIR@
+
 if [ "$(id -u)" != "0" ]; then
     echo "You have to be root to run this script"
     exit 1
 fi
 
-
 if [ $? != 0 ]; then
     usage
     exit 1
diff --git a/src/lxc/lxc-setuid.in b/src/lxc/lxc-setuid.in
index b1bbfff..00870a8 100644
--- a/src/lxc/lxc-setuid.in
+++ b/src/lxc/lxc-setuid.in
@@ -70,12 +70,14 @@ lxc_dropuid()
     chmod 0755 @LXCPATH@
 }
 
+libdir=@LIBDIR@
+localstatedir=@LOCALSTATEDIR@
+
 if [ "$(id -u)" != "0" ]; then
     echo "You have to be root to run this script"
     exit 1
 fi
 
-
 if [ $? != 0 ]; then
     usage
     exit 1





More information about the lxc-users mailing list