From 4e04d515006816bbe629657b85d97476c9de240e Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Tue, 20 Sep 2011 11:18:39 +0200 Subject: [PATCH] fix broken lxc-*.in scripts 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 Signed-off-by: Daniel Lezcano --- 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 63750e9b8..d14c32e50 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 322676986..47954ab4a 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 b1bbfff06..00870a8a1 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