]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
move script templates to an adequate place
authorDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 7 Jun 2010 09:33:55 +0000 (11:33 +0200)
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>
Makefile.am
configure.ac
src/lxc/lxc-create.in
templates/Makefile.am [moved from scripts/Makefile.am with 55% similarity]
templates/lxc-busybox.in [moved from scripts/lxc-busybox.in with 99% similarity]
templates/lxc-debian.in [moved from scripts/lxc-debian.in with 99% similarity, mode: 0644]
templates/lxc-fedora.in [moved from scripts/lxc-fedora.in with 100% similarity]
templates/lxc-sshd.in [moved from scripts/lxc-sshd.in with 99% similarity, mode: 0644]
templates/lxc-ubuntu.in [moved from scripts/lxc-ubuntu.in with 100% similarity]

index 90b771bd1efec4ec4bba5431ab2c726d04c7ee52..9945d00c740c29e01f94be4c0f9bbbdd988df4f9 100644 (file)
@@ -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
index 1df6ab513066f23edb2274ebafda443fafd14f0e..867c1dfb49ae88e0ef8aa34c7c7a4977944e21b6 100644 (file)
@@ -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
index c23006569a863bf7e9ba6bda69d1447ac7c1ca45..ee5173e2e9b2949610388f31f5d9cd768ff26126 100644 (file)
@@ -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
similarity index 55%
rename from scripts/Makefile.am
rename to templates/Makefile.am
index 39d13a36cc87c1f17cc583085f44a3d24b03d7e2..d55f53aff14aab59c9adfa6979ec5e2de1fad45a 100644 (file)
@@ -1,4 +1,6 @@
-bin_SCRIPTS = \
+templatesdir=@LXCTEMPLATEDIR@
+
+templates_SCRIPTS = \
        lxc-debian \
        lxc-ubuntu \
        lxc-fedora \
similarity index 99%
rename from scripts/lxc-busybox.in
rename to templates/lxc-busybox.in
index 5f04dd8e9095e060ea068db29a962848fb3761ca..cdd14b5c74d5c59a347974308adc315a5b65d696 100644 (file)
@@ -305,4 +305,3 @@ if [ $? -ne 0 ]; then
     echo "failed to write configuration file"
     exit 1
 fi
-
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from scripts/lxc-debian.in
rename to templates/lxc-debian.in
index d940b7f..5a6f553
@@ -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
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from scripts/lxc-sshd.in
rename to templates/lxc-sshd.in
index 497bbfd..d474206
@@ -189,4 +189,3 @@ if [ $? -ne 0 ]; then
     echo "failed to write configuration file"
     exit 1
 fi
-