diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2016-06-01 13:56:41 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2016-06-01 13:57:06 +0000 |
commit | ce88f18bae951a614940e0e4497e9f20aa4011b6 (patch) | |
tree | 0953e87b0272059527176120782a8e0e463ccc87 /share | |
parent | Releasing debian version 20160515-1. (diff) | |
download | open-infrastructure-compute-tools-ce88f18bae951a614940e0e4497e9f20aa4011b6.tar.xz open-infrastructure-compute-tools-ce88f18bae951a614940e0e4497e9f20aa4011b6.zip |
Merging upstream version 20160601.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'share')
-rw-r--r-- | share/doc/examples/cairon-backports.cfg | 2 | ||||
-rw-r--r-- | share/man/container-auto.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-console.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-create-debconf.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-create-debootstrap.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-create.1.txt | 8 | ||||
-rw-r--r-- | share/man/container-limit.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-list.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-remove.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-restart.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-shell.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-start.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-stop.1.txt | 4 | ||||
-rw-r--r-- | share/man/container-version.1.txt | 4 | ||||
-rw-r--r-- | share/man/container.1.txt | 4 | ||||
-rwxr-xr-x | share/scripts/debconf | 37 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0001-preseed-file | 4 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0003-debconf | 20 |
18 files changed, 89 insertions, 34 deletions
diff --git a/share/doc/examples/cairon-backports.cfg b/share/doc/examples/cairon-backports.cfg index dd459f2..713d902 100644 --- a/share/doc/examples/cairon-backports.cfg +++ b/share/doc/examples/cairon-backports.cfg @@ -63,3 +63,5 @@ container-tools cnt-debconf/nameserver/options string timeout:1 attempts:1 #container-tools cnt-debconf/debconf-priority string #container-tools cnt-debconf/container-command string #container-tools cnt-debconf/host-command string +container-tools cnt-debconf/auto string FQDN +#container-tools cnt-debconf/bind string diff --git a/share/man/container-auto.1.txt b/share/man/container-auto.1.txt index af2d3c7..cdb9b2c 100644 --- a/share/man/container-auto.1.txt +++ b/share/man/container-auto.1.txt @@ -65,12 +65,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-console.1.txt b/share/man/container-console.1.txt index abccf63..c898c34 100644 --- a/share/man/container-console.1.txt +++ b/share/man/container-console.1.txt @@ -59,12 +59,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-create-debconf.1.txt b/share/man/container-create-debconf.1.txt index f882714..beef8b5 100644 --- a/share/man/container-create-debconf.1.txt +++ b/share/man/container-create-debconf.1.txt @@ -138,12 +138,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-create-debootstrap.1.txt b/share/man/container-create-debootstrap.1.txt index 360d7b6..cc6a109 100644 --- a/share/man/container-create-debootstrap.1.txt +++ b/share/man/container-create-debootstrap.1.txt @@ -80,12 +80,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-create.1.txt b/share/man/container-create.1.txt index 6646ad1..2553569 100644 --- a/share/man/container-create.1.txt +++ b/share/man/container-create.1.txt @@ -67,6 +67,9 @@ The following container scripts are available: *debconf*:: Advanced script to automatically create Debian based container, see container-create-debconf(1). +*default*:: + Symlink (if existing) to a container script which is used if no script was specified. On Debian based system this can be managed through update-alternatives(1), i.e. 'sudo update-alternatives --config container-tools_script'. + EXAMPLES -------- @@ -76,7 +79,6 @@ EXAMPLES *Create example.net container using debconf script:*:: sudo container create -n example.net -s debconf - SEE ALSO -------- container-tools(7), @@ -85,12 +87,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-limit.1.txt b/share/man/container-limit.1.txt index 995374e..d7a060f 100644 --- a/share/man/container-limit.1.txt +++ b/share/man/container-limit.1.txt @@ -92,12 +92,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-list.1.txt b/share/man/container-list.1.txt index e7015b7..4d8bc72 100644 --- a/share/man/container-list.1.txt +++ b/share/man/container-list.1.txt @@ -67,12 +67,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-remove.1.txt b/share/man/container-remove.1.txt index e5e38bd..cdd1d15 100644 --- a/share/man/container-remove.1.txt +++ b/share/man/container-remove.1.txt @@ -65,12 +65,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-restart.1.txt b/share/man/container-restart.1.txt index 992bc5b..1de7277 100644 --- a/share/man/container-restart.1.txt +++ b/share/man/container-restart.1.txt @@ -59,12 +59,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-shell.1.txt b/share/man/container-shell.1.txt index dc60af2..3a8ed05 100644 --- a/share/man/container-shell.1.txt +++ b/share/man/container-shell.1.txt @@ -62,12 +62,12 @@ systemd-nspawn(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-start.1.txt b/share/man/container-start.1.txt index e74f780..e2405a7 100644 --- a/share/man/container-start.1.txt +++ b/share/man/container-start.1.txt @@ -59,12 +59,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-stop.1.txt b/share/man/container-stop.1.txt index 5f8356d..cf7ad76 100644 --- a/share/man/container-stop.1.txt +++ b/share/man/container-stop.1.txt @@ -65,12 +65,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container-version.1.txt b/share/man/container-version.1.txt index 4fede67..99548cc 100644 --- a/share/man/container-version.1.txt +++ b/share/man/container-version.1.txt @@ -56,12 +56,12 @@ container(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/man/container.1.txt b/share/man/container.1.txt index 93cf309..7ad4f87 100644 --- a/share/man/container.1.txt +++ b/share/man/container.1.txt @@ -108,12 +108,12 @@ systemd-nspawn(1). HOMEPAGE -------- -More information about container-tools and the Open Infrastructure project can be found on the homepage at http://open-infrastructure.net. +More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net. BUGS ---- -Bugs can be reported by opening an issue in the GitHub repository at http://github.com/open-infrastructure/container-tools. +Bugs can be reported by opening an issue in the GitHub repository at https://github.com/open-infrastructure/container-tools. AUTHORS diff --git a/share/scripts/debconf b/share/scripts/debconf index 55c2b8b..4f29238 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -907,7 +907,9 @@ Commands () HOSTNAME_SHORT="$(echo ${NAME} | cut -c-8)" HOST_INTERFACE_NAME="$(echo ${NETWORK0_VETH:-veth-${HOSTNAME_SHORT}-0})" + sed -i -e "s|^cnt.auto=.*|cnt.auto=${CNT_AUTO}|" "${CONFIG}/${NAME}.conf" sed -i -e "s|^cnt.network-bridge=.*|cnt.network-bridge=${HOST_INTERFACE_NAME}:${NETWORK0_BRIDGE:-br0}|g" "${CONFIG}/${NAME}.conf" + sed -i -e "s|^bind=.*|bind=${BIND}|" "${CONFIG}/${NAME}.conf" sed -i -e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eth0|g" "${CONFIG}/${NAME}.conf" for NUMBER in $(seq 1 ${NETWORK_NUMBER}) @@ -990,13 +992,42 @@ Cleanup_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" ## Specific parts cp -a "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" "${MACHINES}/${NAME}" +# Mounting bind mounts +if [ -n "${BIND}" ] +then + BINDS="$(echo ${BIND} | sed -e 's|;| |g')" + + for ENTRY in ${BINDS} + do + SOURCE="$(echo ${ENTRY} | awk -F: '{ print $1 }')" + TARGET="$(echo ${ENTRY} | awk -F: '{ print $2 }')" + + mkdir -p "${SOURCE}" + mkdir -p "${MACHINES}/${NAME}/${TARGET}" + + mount -o bind "${SOURCE}" "${MACHINES}/${NAME}/${TARGET}" + done +fi + Configure_system "${MACHINES}/${NAME}" Configure_network "${MACHINES}/${NAME}" Cleanup_system "${MACHINES}/${NAME}" Commands "${MACHINES}/${NAME}" +# Unmounting bind mounts +if [ -n "${BIND}" ] +then + BINDS="$(echo ${BIND} | sed -e 's|;| |g')" + + for ENTRY in ${BINDS} + do + TARGET="$(echo ${ENTRY} | awk -F: '{ print $2 }')" + + umount "${MACHINES}/${NAME}/${TARGET}" + done +fi + # remove debconf temporary files -#FIXME -#echo rm --preserve-root --one-file-system -rf "${DEBCONF_TMPDIR}" -rmdir --ignore-fail-on-non-empty /tmp/container-tools || true +rm --preserve-root --one-file-system -rf "${DEBCONF_TMPDIR}" +rmdir --ignore-fail-on-non-empty /tmp/container-tools 2>&1 || true diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file index 82d2049..03976d2 100755 --- a/share/scripts/debconf.d/0001-preseed-file +++ b/share/scripts/debconf.d/0001-preseed-file @@ -30,12 +30,12 @@ then # user specified one or more preseed files through commandline option db_set cnt-debconf/preseed-file "${PRESEED_FILE}" db_fset cnt-debconf/preseed-file seen true -elif ls "${CONFIG}"/* > /dev/null 2>&1 +elif ls "${CONFIG}"/*.cfg > /dev/null 2>&1 then # user has not specified preseed files through commandline option, # showing debconf selection dialog for global preseed file. - FILES="$(cd ${CONFIG} && find * -not -type d -and -not -name '*.cfg' -and -not -name '*.in' -and -not -name '*.sh')" + FILES="$(cd ${CONFIG} && find . -type f -name '*.cfg' -printf '%P\n' | sort)" PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "${FILE}, "; done | sed -e 's|, $||')" if [ -n "${PRESEED_FILES}" ] diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index df14ef0..baf6879 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -1041,6 +1041,26 @@ Internal_options () fi echo "HOST_COMMAND=\"${HOST_COMMAND}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + if db_get cnt-debconf/auto + then + CNT_AUTO="${RET:-FQDN}" # string (w/o empty) + + case "${CNT_AUTO}" in + FQDN) + CNT_AUTO="$(hostname -f)" + ;; + esac + fi + + echo "CNT_AUTO=\"${CNT_AUTO}\"" >> "${DEBCONF_TMPDIR}/debconf.default" + + if db_get cnt-debconf/bind + then + BIND="${RET}" # string (w/ empty) + fi + + echo "BIND=\"${BIND}\"" >> "${DEBCONF_TMPDIR}/debconf.default" } Distribution |