Commit d595c68a by Dwight Engen Committed by Stéphane Graber

fix expansion of LXCPATH,LXCROOTFSMOUNT,LXCTEMPLATEDIR

These variables are not expanded correctly in doc/lxc-create.sgml.in and a workaround is in place to ensure ${localstatedir}, and ${datadir} are set in the various shell scripts that use it. There is no workaround to ensure ${datadir} is set in src/lxc/lxc-create.in, nor is ${localstatedir} set in templates/lxc-altlinux.in so I think that these are currently broken. Using AS_AC_EXPAND instead of AC_SUBST fixes these problems and removes the need for the workarounds. In addition the lxc-start-ephemeral.in script can be autoconf'ed instead of sed'ed by the makefile. Signed-off-by: 's avatarDwight Engen <dwight.engen@oracle.com>
parent b9cb4325
......@@ -70,11 +70,11 @@ AC_ARG_WITH([rootfs-path],
)], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
AS_AC_EXPAND(LXCPATH, "${with_config_path}")
AS_AC_EXPAND(LXCROOTFSMOUNT, "${with_rootfs_path}")
AS_AC_EXPAND(LXCTEMPLATEDIR, ['${datadir}/lxc/templates'])
AC_SUBST(LXCPATH, "${with_config_path}")
AC_SUBST(LXCROOTFSMOUNT, "${with_rootfs_path}")
AC_SUBST(LXCINITDIR, ['${libexecdir}'])
AC_SUBST(LXCTEMPLATEDIR, ['${datadir}/lxc/templates'])
AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h],
[],
......@@ -170,6 +170,7 @@ AC_CONFIG_FILES([
src/lxc/lxc-create
src/lxc/lxc-clone
src/lxc/lxc-shutdown
src/lxc/lxc-start-ephemeral
src/lxc/lxc-destroy
])
......
......@@ -46,7 +46,6 @@ help() {
shortoptions='ho:n:sL:v:p:t:'
longoptions='help,orig:,name:,snapshot,fssize:,vgname:,lvprefix:,fstype:'
localstatedir=@LOCALSTATEDIR@
lxc_path=@LXCPATH@
bindir=@BINDIR@
snapshot=no
......
......@@ -62,10 +62,8 @@ help() {
shortoptions='hn:f:t:B:'
longoptions='help,name:,config:,template:,backingstore:,fstype:,lvname:,vgname:,fssize:'
localstatedir=@LOCALSTATEDIR@
lxc_path=@LXCPATH@
bindir=@BINDIR@
libdir=@LIBDIR@
templatedir=@LXCTEMPLATEDIR@
backingstore=_unset
fstype=ext4
......
......@@ -41,7 +41,6 @@ help() {
shortoptions='hn:f'
longoptions='help,name:'
localstatedir=@LOCALSTATEDIR@
lxc_path=@LXCPATH@
force=0
......
......@@ -17,7 +17,6 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
localstatedir=@LOCALSTATEDIR@
lxc_path=@LXCPATH@
usage()
......
......@@ -83,9 +83,6 @@ lxc_dropcaps()
shortoptions='hd'
longoptions='help'
libdir=@LIBDIR@
libexecdir=@LIBEXECDIR@
localstatedir=@LOCALSTATEDIR@
getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@")
if [ $? != 0 ]; then
......
......@@ -80,9 +80,6 @@ lxc_dropuid()
shortoptions='hd'
longoptions='help'
libdir=@LIBDIR@
libexecdir=@LIBEXECDIR@
localstatedir=@LOCALSTATEDIR@
getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@")
if [ $? != 0 ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment