mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 08:39:22 +00:00
move script templates to an adequate place
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>
This commit is contained in:
parent
d6b1784e1e
commit
c01d62f21b
@ -2,8 +2,8 @@
|
||||
|
||||
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
|
||||
|
13
configure.ac
13
configure.ac
@ -57,6 +57,7 @@ AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
|
||||
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])
|
||||
@ -133,12 +134,12 @@ AC_CONFIG_FILES([
|
||||
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
|
||||
|
@ -44,6 +44,7 @@ shortoptions='hn:f:t:'
|
||||
longoptions='help,name:,config:,template:'
|
||||
lxc_path=@LXCPATH@
|
||||
bindir=@BINDIR@
|
||||
templatedir=@LXCTEMPLATEDIR@
|
||||
|
||||
getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@")
|
||||
if [ $? != 0 ]; then
|
||||
@ -133,7 +134,7 @@ fi
|
||||
|
||||
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
|
||||
@ -166,7 +167,7 @@ if [ ! -z $lxc_template ]; then
|
||||
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
|
||||
|
@ -1,4 +1,6 @@
|
||||
bin_SCRIPTS = \
|
||||
templatesdir=@LXCTEMPLATEDIR@
|
||||
|
||||
templates_SCRIPTS = \
|
||||
lxc-debian \
|
||||
lxc-ubuntu \
|
||||
lxc-fedora \
|
@ -305,4 +305,3 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed to write configuration file"
|
||||
exit 1
|
||||
fi
|
||||
|
4
scripts/lxc-debian.in → templates/lxc-debian.in
Executable file → Normal file
4
scripts/lxc-debian.in → templates/lxc-debian.in
Executable file → Normal file
@ -217,7 +217,7 @@ clean()
|
||||
|
||||
# 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
|
||||
@ -276,7 +276,7 @@ fi
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "This script should be run as 'root'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
rootfs=$path/rootfs
|
||||
|
1
scripts/lxc-sshd.in → templates/lxc-sshd.in
Executable file → Normal file
1
scripts/lxc-sshd.in → templates/lxc-sshd.in
Executable file → Normal file
@ -189,4 +189,3 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed to write configuration file"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user