At present the lxc-{template} scripts are installed in the $bindir.
This is not the right place as specified by the FHS, so they go to
$libdir/lxc/templates.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
ACLOCAL_AMFLAGS = -I config
-SUBDIRS = src scripts doc
-DIST_SUBDIRS = config src scripts doc
+SUBDIRS = src templates doc
+DIST_SUBDIRS = config src templates doc
EXTRA_DIST = autogen.sh lxc.spec CONTRIBUTING MAINTAINERS ChangeLog
pcdatadir = $(datadir)/pkgconfig
AS_AC_EXPAND(LXCPATH, "${with_config_path}")
AS_AC_EXPAND(LXCROOTFSMOUNT, "${with_rootfs_path}")
AS_AC_EXPAND(LXCINITDIR, $libdir/lxc)
+AS_AC_EXPAND(LXCTEMPLATEDIR, $libdir/lxc/templates)
AH_TEMPLATE([LXCPATH], [lxc configuration repository])
AH_TEMPLATE([LXCINITDIR], [lxc-init directory location])
AH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point])
doc/examples/lxc-veth.conf
doc/examples/lxc-complex.conf
- scripts/Makefile
- scripts/lxc-debian
- scripts/lxc-ubuntu
- scripts/lxc-busybox
- scripts/lxc-fedora
- scripts/lxc-sshd
+ templates/Makefile
+ templates/lxc-debian
+ templates/lxc-ubuntu
+ templates/lxc-busybox
+ templates/lxc-fedora
+ templates/lxc-sshd
src/Makefile
src/lxc/Makefile
longoptions='help,name:,config:,template:'
lxc_path=@LXCPATH@
bindir=@BINDIR@
+templatedir=@LXCTEMPLATEDIR@
getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@")
if [ $? != 0 ]; then
if [ ! -z $lxc_template ]; then
- type ${bindir}/lxc-$lxc_template >/dev/null
+ type ${templatedir}/lxc-$lxc_template >/dev/null
if [ $? -ne 0 ]; then
echo "unknown template '$lxc_template'"
${bindir}/lxc-destroy -n $lxc_name
read dummy
fi
- ${bindir}/lxc-$lxc_template --path=$lxc_path/$lxc_name --name=$lxc_name
+ ${templatedir}/lxc-$lxc_template --path=$lxc_path/$lxc_name --name=$lxc_name
if [ $? -ne 0 ]; then
echo "failed to execute template '$lxc_template'"
${bindir}/lxc-destroy -n $lxc_name
-bin_SCRIPTS = \
+templatesdir=@LXCTEMPLATEDIR@
+
+templates_SCRIPTS = \
lxc-debian \
lxc-ubuntu \
lxc-fedora \
echo "failed to write configuration file"
exit 1
fi
-
# lock, so we won't purge while someone is creating a repository
(
- flock -n -x 200
+ flock -n -x 200
if [ $? != 0 ]; then
echo "Cache repository is busy."
exit 1
if [ "$(id -u)" != "0" ]; then
echo "This script should be run as 'root'"
exit 1
-fi
+fi
rootfs=$path/rootfs
echo "failed to write configuration file"
exit 1
fi
-