summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-04-11 12:16:14 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-04-11 12:45:14 +0000
commitec8255b378751dca48bc839e8751cea5bd339921 (patch)
tree2af70efd08b300b299d6f157c6919c329a7513c6
parentMoving command files from /usr/lib to /usr/libexec. (diff)
downloadcompute-tools-ec8255b378751dca48bc839e8751cea5bd339921.tar.xz
compute-tools-ec8255b378751dca48bc839e8751cea5bd339921.zip
Moving config files from /etc/open-infrastructure to /etc/compute-tools.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rw-r--r--Makefile15
-rwxr-xr-xbin/container6
-rwxr-xr-xlibexec/container/auto5
-rwxr-xr-xlibexec/container/console3
-rwxr-xr-xlibexec/container/create5
-rwxr-xr-xlibexec/container/enter3
-rwxr-xr-xlibexec/container/key3
-rwxr-xr-xlibexec/container/limit3
-rwxr-xr-xlibexec/container/list5
-rwxr-xr-xlibexec/container/log1
-rwxr-xr-xlibexec/container/move5
-rwxr-xr-xlibexec/container/remove5
-rwxr-xr-xlibexec/container/restart3
-rwxr-xr-xlibexec/container/run3
-rwxr-xr-xlibexec/container/start5
-rwxr-xr-xlibexec/container/status5
-rwxr-xr-xlibexec/container/stop5
-rwxr-xr-xlibexec/container/top1
-rwxr-xr-xlibexec/container/version3
-rw-r--r--share/bash-completion/container2
-rwxr-xr-xshare/hooks/pre-create.git-pull.sh7
-rwxr-xr-xshare/hooks/pre-start.unlink-console.sh3
-rw-r--r--share/man/container-create-curl.1.txt2
-rw-r--r--share/man/container-create-debconf.1.txt2
-rw-r--r--share/man/container.1.txt2
-rwxr-xr-xshare/scripts/curl4
-rwxr-xr-xshare/scripts/debconf4
-rwxr-xr-xshare/scripts/debconf.d/0001-preseed-file5
-rwxr-xr-xshare/scripts/debootstrap2
29 files changed, 68 insertions, 49 deletions
diff --git a/Makefile b/Makefile
index ea9f0a5..ade4dbc 100644
--- a/Makefile
+++ b/Makefile
@@ -57,9 +57,9 @@ build: share/man/*.txt
sed -n '/^NAME/,$$p' share/man/$(SOFTWARE).7.txt > README.txt
install: build
- mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/config
- mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/debconf
- mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/hooks
+ mkdir -p $(DESTDIR)/etc/$(SOFTWARE)/config
+ mkdir -p $(DESTDIR)/etc/$(SOFTWARE)/debconf
+ mkdir -p $(DESTDIR)/etc/$(SOFTWARE)/hooks
mkdir -p $(DESTDIR)/usr/bin
cp -r bin/* $(DESTDIR)/usr/bin
@@ -186,11 +186,10 @@ uninstall:
done
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/bin || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/config || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/debconf || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/hooks || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM) || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT) || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE)/config || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE)/debconf || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE)/hooks || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(SOFTWARE) || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
diff --git a/bin/container b/bin/container
index 1836b33..182d9b4 100755
--- a/bin/container
+++ b/bin/container
@@ -23,7 +23,7 @@ PROJECT="open-infrastructure"
SOFTWARE="compute-tools"
PROGRAM="container"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
# Parameter
PARAMETER="${1}"
@@ -74,9 +74,9 @@ do
echo "${DATE} ${HOST} ${USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${PROJECT}/${PROGRAM}.log"
# irc
- if [ -e /usr/bin/irk ] && [ -e "/etc/${PROJECT}/${PROGRAM}.conf" ]
+ if [ -e /usr/bin/irk ] && [ -e "/etc/${SOFTWARE}.conf" ]
then
- . "/etc/${PROJECT}/${PROGRAM}.conf"
+ . "/etc/${SOFTWARE}.conf"
if [ -n "${IRK_TARGETS}" ]
then
diff --git a/libexec/container/auto b/libexec/container/auto
index 6c1d47b..4c39e2d 100755
--- a/libexec/container/auto
+++ b/libexec/container/auto
@@ -20,11 +20,12 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
Parameters ()
{
diff --git a/libexec/container/console b/libexec/container/console
index 2dc6546..912a259 100755
--- a/libexec/container/console
+++ b/libexec/container/console
@@ -20,10 +20,11 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/libexec/container/create b/libexec/container/create
index bdf9fb4..91ba4c6 100755
--- a/libexec/container/create
+++ b/libexec/container/create
@@ -20,11 +20,12 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
SCRIPTS="/usr/share/${PROJECT}/${PROGRAM}/scripts"
CONFIG_TEMPLATE="/usr/share/${PROJECT}/${PROGRAM}/config/container.conf.in"
diff --git a/libexec/container/enter b/libexec/container/enter
index fed1193..d89ceec 100755
--- a/libexec/container/enter
+++ b/libexec/container/enter
@@ -20,10 +20,11 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/libexec/container/key b/libexec/container/key
index 4cbdaa0..56eb9d2 100755
--- a/libexec/container/key
+++ b/libexec/container/key
@@ -20,10 +20,11 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-KEYS="/etc/${PROJECT}/${PROGRAM}/keys"
+KEYS="/etc/${SOFTWARE}/keys"
Parameters ()
{
diff --git a/libexec/container/limit b/libexec/container/limit
index 99ef03a..ec07fe6 100755
--- a/libexec/container/limit
+++ b/libexec/container/limit
@@ -20,10 +20,11 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/libexec/container/list b/libexec/container/list
index ba794ab..6f9f533 100755
--- a/libexec/container/list
+++ b/libexec/container/list
@@ -20,11 +20,12 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
VERSION="$(${PROGRAM} version)"
diff --git a/libexec/container/log b/libexec/container/log
index a18c421..6674e13 100755
--- a/libexec/container/log
+++ b/libexec/container/log
@@ -20,6 +20,7 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
diff --git a/libexec/container/move b/libexec/container/move
index e20d8a8..5f65b21 100755
--- a/libexec/container/move
+++ b/libexec/container/move
@@ -20,11 +20,12 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/libexec/container/remove b/libexec/container/remove
index 75ebd60..01161fa 100755
--- a/libexec/container/remove
+++ b/libexec/container/remove
@@ -20,11 +20,12 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/libexec/container/restart b/libexec/container/restart
index 3c84f4d..04708a1 100755
--- a/libexec/container/restart
+++ b/libexec/container/restart
@@ -20,10 +20,11 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/libexec/container/run b/libexec/container/run
index f6323c0..c72c1b6 100755
--- a/libexec/container/run
+++ b/libexec/container/run
@@ -20,10 +20,11 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/libexec/container/start b/libexec/container/start
index 30aee53..4e31f72 100755
--- a/libexec/container/start
+++ b/libexec/container/start
@@ -20,11 +20,12 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
START="false"
diff --git a/libexec/container/status b/libexec/container/status
index a4b49e1..25c9b95 100755
--- a/libexec/container/status
+++ b/libexec/container/status
@@ -20,11 +20,12 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/libexec/container/stop b/libexec/container/stop
index 6b8caee..8de825b 100755
--- a/libexec/container/stop
+++ b/libexec/container/stop
@@ -20,11 +20,12 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
CLEAN="false"
diff --git a/libexec/container/top b/libexec/container/top
index d9baa1c..f71f7c3 100755
--- a/libexec/container/top
+++ b/libexec/container/top
@@ -20,6 +20,7 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
diff --git a/libexec/container/version b/libexec/container/version
index c2b7716..f74c696 100755
--- a/libexec/container/version
+++ b/libexec/container/version
@@ -20,10 +20,11 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
SHARE="/usr/share/${PROJECT}/${PROGRAM}"
# Pre hooks
diff --git a/share/bash-completion/container b/share/bash-completion/container
index b1f3f93..4789b18 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -63,7 +63,7 @@ _container()
create|cr)
case "${prev}" in
-n|--name)
- opts="$(cd /etc/open-infrastructure/container/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')"
+ opts="$(cd /etc/compute-tools/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
diff --git a/share/hooks/pre-create.git-pull.sh b/share/hooks/pre-create.git-pull.sh
index 823440f..9704206 100755
--- a/share/hooks/pre-create.git-pull.sh
+++ b/share/hooks/pre-create.git-pull.sh
@@ -20,9 +20,10 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
-DIRECTORIES="/etc/${PROJECT}/${PROGRAM}/debconf /etc/${PROJECT}/${PROGRAM}/debconf/*/"
+DIRECTORIES="/etc/${SOFTWARE}/debconf /etc/${SOFTWARE}/debconf/*/"
for DIRECTORY in ${DIRECTORIES}
do
@@ -30,9 +31,9 @@ do
then
echo "Updating ${DIRECTORY}..."
- if [ -e "/etc/${PROJECT}/${PROGRAM}.conf" ]
+ if [ -e "/etc/${SOFTWARE}.conf" ]
then
- . "/etc/${PROJECT}/${PROGRAM}.conf"
+ . "/etc/${SOFTWARE}.conf"
fi
DEBCONF_ID="${DEBCONF_ID:-HEAD}"
diff --git a/share/hooks/pre-start.unlink-console.sh b/share/hooks/pre-start.unlink-console.sh
index 3133a19..f781167 100755
--- a/share/hooks/pre-start.unlink-console.sh
+++ b/share/hooks/pre-start.unlink-console.sh
@@ -20,9 +20,10 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
+CONFIG="/etc/${SOFTWARE}/config"
# Run
if grep -qs 'bind=.*/dev:/dev;' "${CONFIG}/${NAME}.conf"
diff --git a/share/man/container-create-curl.1.txt b/share/man/container-create-curl.1.txt
index 1095103..e049b23 100644
--- a/share/man/container-create-curl.1.txt
+++ b/share/man/container-create-curl.1.txt
@@ -83,7 +83,7 @@ FILES
-----
The following files are used:
-*/etc/open-infrastructure/container/config*::
+*/etc/compute-tools/config*::
Container configuration files.
*/usr/share/open-infrastructure/container/scripts*::
diff --git a/share/man/container-create-debconf.1.txt b/share/man/container-create-debconf.1.txt
index f4092a0..fb0a838 100644
--- a/share/man/container-create-debconf.1.txt
+++ b/share/man/container-create-debconf.1.txt
@@ -114,7 +114,7 @@ FILES
-----
The following files are used:
-*/etc/open-infrastructure/container/config*::
+*/etc/compute-tools/config*::
Container configuration files.
*/usr/share/open-infrastructure/container/scripts*::
diff --git a/share/man/container.1.txt b/share/man/container.1.txt
index 179794f..60d757e 100644
--- a/share/man/container.1.txt
+++ b/share/man/container.1.txt
@@ -104,7 +104,7 @@ FILES
-----
The following files are used:
-*/etc/open-infrastructure/container*::
+*/etc/compute-tools/container*::
Container configuration files.
*/usr/bin/container*, */usr/bin/cnt*::
diff --git a/share/scripts/curl b/share/scripts/curl
index 465ecbe..7d7661a 100755
--- a/share/scripts/curl
+++ b/share/scripts/curl
@@ -24,8 +24,8 @@ SOFTWARE="compute-tools"
PROGRAM="container"
SCRIPT="${0}"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
-KEYS="/etc/${PROJECT}/${PROGRAM}/keys"
+HOOKS="/etc/${SOFTWARE}/hooks"
+KEYS="/etc/${SOFTWARE}/keys"
MACHINES="/var/lib/machines"
CACHE="/var/cache/${PROJECT}/${PROGRAM}/system"
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 7f2bf3d..0147212 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -25,8 +25,8 @@ PROGRAM="container"
SCRIPT="${0}"
export SCRIPT
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()
diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file
index 4fec6b0..edf26a0 100755
--- a/share/scripts/debconf.d/0001-preseed-file
+++ b/share/scripts/debconf.d/0001-preseed-file
@@ -20,9 +20,10 @@
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
-CONFIG="/etc/${PROJECT}/${PROGRAM}/debconf"
+CONFIG="/etc/${SOFTWARE}/debconf"
DEBCONF_NOWARNINGS="true"
export DEBCONF_NOWARNINGS
@@ -43,7 +44,7 @@ then
elif [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ]
then
# user did not specify a pressed file, but there is 1 (and only 1)
- # matching in a sub-directory of /etc/${PROJECT}/${PROGRAM}/debconf
+ # matching in a sub-directory of /etc/${SOFTWARE}/debconf
FILE="$(ls ${CONFIG}/*/${NAME}.cfg)"
diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap
index 98f202b..13a7746 100755
--- a/share/scripts/debootstrap
+++ b/share/scripts/debootstrap
@@ -25,7 +25,7 @@ PROGRAM="container"
SCRIPT="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
Parameters ()