summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/container/auto2
-rwxr-xr-xlib/container/create12
-rwxr-xr-xlib/container/list6
-rw-r--r--share/config/container.conf.in2
-rwxr-xr-xshare/scripts/curl2
-rwxr-xr-xshare/scripts/debconf4
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf12
-rwxr-xr-xshare/scripts/debootstrap2
8 files changed, 21 insertions, 21 deletions
diff --git a/lib/container/auto b/lib/container/auto
index 45aa68f..72b4290 100755
--- a/lib/container/auto
+++ b/lib/container/auto
@@ -104,7 +104,7 @@ esac
for FILE in "${CONFIG}"/*.conf
do
- if grep -Eqs "^ *cnt.auto=true" "${FILE}" || grep -Eqs "^ *cnt.auto=${HOST}" "${FILE}"
+ if grep -Eqs "^ *cnt.container-server=true" "${FILE}" || grep -Eqs "^ *cnt.container-server=${HOST}" "${FILE}"
then
CONTAINER="$(basename ${FILE} .conf)"
diff --git a/lib/container/create b/lib/container/create
index 1a6f4d5..c9db754 100755
--- a/lib/container/create
+++ b/lib/container/create
@@ -27,7 +27,7 @@ SCRIPTS="/usr/share/container-tools/scripts"
Parameters ()
{
- GETOPT_LONGOPTIONS="name:,cnt.auto:,cnt.overlay:,bind:,bind-ro:,capability:,drop-capability:script:,"
+ GETOPT_LONGOPTIONS="name:,cnt.container-server:,cnt.overlay:,bind:,bind-ro:,capability:,drop-capability:script:,"
GETOPT_OPTIONS="n:,b:,c:,d:,s:,"
PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
@@ -48,8 +48,8 @@ Parameters ()
shift 2
;;
- --cnt.auto)
- CNT_AUTO="${2}"
+ --cnt.container-server)
+ CNT_CONTAINER_SERVER="${2}"
shift 2
;;
@@ -98,7 +98,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container ${COMMAND} -n|--name NAME [--cnt.auto=true|false|FQDN] [--cnt.overlay=DIRECTORY_LOWER:DIRECTORY_UPPER:DIRECTORY_WORK:DIRECTORY_MERGED] [-b|--bind DIRECTORY:DIRECTORY[:OPTIONS]] [--bind-ro DIRECTORY:DIRECTORY[:OPTIONS]] [-c|--capability CAPABILITY[,CAPABILITY]] [-d|--drop-capability DROP_CAPABILITY[,DROP_CAPABILITY]] [-s|--script SCRIPT] [-- SCRIPT_OPTIONS]" >&2
+ echo "Usage: container ${COMMAND} -n|--name NAME [--cnt.container-server=true|false|FQDN] [--cnt.overlay=DIRECTORY_LOWER:DIRECTORY_UPPER:DIRECTORY_WORK:DIRECTORY_MERGED] [-b|--bind DIRECTORY:DIRECTORY[:OPTIONS]] [--bind-ro DIRECTORY:DIRECTORY[:OPTIONS]] [-c|--capability CAPABILITY[,CAPABILITY]] [-d|--drop-capability DROP_CAPABILITY[,DROP_CAPABILITY]] [-s|--script SCRIPT] [-- SCRIPT_OPTIONS]" >&2
exit 1
}
@@ -145,7 +145,7 @@ else
fi
fi
-CNT_AUTO="${CNT_AUTO:-$(hostname -f)}"
+CNT_CONTAINER_SERVER="${CNT_CONTAINER_SERVER:-$(hostname -f)}"
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
@@ -204,7 +204,7 @@ fi
# config
mkdir -p "${CONFIG}"
-sed -e "s|@CNT_AUTO@|${CNT_AUTO}|g" \
+sed -e "s|@CNT_CONTAINER_SERVER@|${CNT_CONTAINER_SERVER}|g" \
-e "s|@CNT_NETWORK_BRIDGE@|${CNT_NETWORK_BRIDGE}|g" \
-e "s|@CNT_OVERLAY@|${CNT_OVERLAY}|g" \
-e "s|@NAME@|${NAME}|g" \
diff --git a/lib/container/list b/lib/container/list
index 9bf61c4..8d1ef96 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -329,10 +329,10 @@ do
if [ -e "${CONFIG}/${CONTAINER}.conf" ]
then
- AUTO="$(awk -F= '/^cnt.auto=/ { print $2 }' ${CONFIG}/${CONTAINER}.conf)"
- AUTO="${AUTO:-false}"
+ CONTAINER_SERVER="$(awk -F= '/^cnt.container-server=/ { print $2 }' ${CONFIG}/${CONTAINER}.conf)"
+ CONTAINER_SERVER="${CONTAINER_SERVER:-false}"
- case "${AUTO}" in
+ case "${CONTAINER_SERVER}" in
${HOST}|true)
;;
diff --git a/share/config/container.conf.in b/share/config/container.conf.in
index bf1ecc5..5be35ec 100644
--- a/share/config/container.conf.in
+++ b/share/config/container.conf.in
@@ -1,7 +1,7 @@
# container-tools: @NAME@
[start]
-cnt.auto=@CNT_AUTO@
+cnt.container-server=@CNT_CONTAINER_SERVER@
cnt.network-bridge=@CNT_NETWORK_BRIDGE@
cnt.overlay=@CNT_OVERLAY@
bind=@BIND@
diff --git a/share/scripts/curl b/share/scripts/curl
index 18d49c0..357bddf 100755
--- a/share/scripts/curl
+++ b/share/scripts/curl
@@ -52,7 +52,7 @@ Parameters ()
shift 2
;;
- --cnt.auto)
+ --cnt.container-server)
# ignore
shift 2
;;
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 8871fd8..2a43105 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -52,7 +52,7 @@ Parameters ()
shift 2
;;
- --cnt.auto)
+ --cnt.container-server)
# ignore
shift 2
;;
@@ -925,7 +925,7 @@ 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.container-server=.*|cnt.container-server=${CNT_CONTAINER_SERVER}|" "${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|^cnt.overlay=.*|cnt.overlay=${CNT_OVERLAY}|g" "${CONFIG}/${NAME}.conf"
sed -i -e "s|^bind=.*|bind=${BIND}|" "${CONFIG}/${NAME}.conf"
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index 76a71c8..a36720a 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/scripts/debconf.d/0003-debconf
@@ -1006,20 +1006,20 @@ Internal_options ()
echo "HOST_COMMAND=\"${HOST_COMMAND}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
- if db_get cnt-debconf/auto
+ if db_get cnt-debconf/container-server
then
- CNT_AUTO="${RET:-FQDN}" # string (w/o empty)
+ CNT_CONTAINER_SERVER="${RET:-FQDN}" # string (w/o empty)
fi
- CNT_AUTO="${CNT_AUTO:-FQDN}"
+ CNT_CONTAINER_SERVER="${CNT_CONTAINER_SERVER:-FQDN}"
- case "${CNT_AUTO}" in
+ case "${CNT_CONTAINER_SERVER}" in
FQDN)
- CNT_AUTO="$(hostname -f)"
+ CNT_CONTAINER_SERVER="$(hostname -f)"
;;
esac
- echo "CNT_AUTO=\"${CNT_AUTO}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ echo "CNT_CONTAINER_SERVER=\"${CNT_CONTAINER_SERVER}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
if db_get cnt-debconf/bind
then
diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap
index 79a3193..35b200f 100755
--- a/share/scripts/debootstrap
+++ b/share/scripts/debootstrap
@@ -51,7 +51,7 @@ Parameters ()
shift 2
;;
- --cnt.auto)
+ --cnt.container-server)
# ignore
shift 2
;;