summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-11 13:52:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-11 13:52:42 +0000
commitc759c2b9c54ba0262980214cd3d7cb6566ed7c7b (patch)
treee54395585d3605a86e91680ea200779058cc10e5 /libexec
parentAdding upstream version 20210101. (diff)
downloadopen-infrastructure-compute-tools-c759c2b9c54ba0262980214cd3d7cb6566ed7c7b.tar.xz
open-infrastructure-compute-tools-c759c2b9c54ba0262980214cd3d7cb6566ed7c7b.zip
Adding upstream version 20210411.upstream/20210411
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xlibexec/container/auto (renamed from lib/container/auto)7
-rwxr-xr-xlibexec/container/console (renamed from lib/container/console)5
-rwxr-xr-xlibexec/container/create (renamed from lib/container/create)11
-rwxr-xr-xlibexec/container/enter (renamed from lib/container/enter)5
-rwxr-xr-xlibexec/container/key (renamed from lib/container/key)5
-rwxr-xr-xlibexec/container/limit (renamed from lib/container/limit)5
-rwxr-xr-xlibexec/container/list (renamed from lib/container/list)7
-rwxr-xr-xlibexec/container/log (renamed from lib/container/log)25
-rwxr-xr-xlibexec/container/move (renamed from lib/container/move)7
-rwxr-xr-xlibexec/container/remove (renamed from lib/container/remove)7
-rwxr-xr-xlibexec/container/restart (renamed from lib/container/restart)5
-rwxr-xr-xlibexec/container/run (renamed from lib/container/run)5
-rwxr-xr-xlibexec/container/start (renamed from lib/container/start)7
-rwxr-xr-xlibexec/container/status (renamed from lib/container/status)7
-rwxr-xr-xlibexec/container/stop (renamed from lib/container/stop)7
-rwxr-xr-xlibexec/container/top (renamed from lib/container/top)3
-rwxr-xr-xlibexec/container/version (renamed from lib/container/version)7
17 files changed, 81 insertions, 44 deletions
diff --git a/lib/container/auto b/libexec/container/auto
index 6c1d47b..0c9d136 100755
--- a/lib/container/auto
+++ b/libexec/container/auto
@@ -15,16 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/console b/libexec/container/console
index 2dc6546..ce53712 100755
--- a/lib/container/console
+++ b/libexec/container/console
@@ -15,15 +15,16 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/create b/libexec/container/create
index bdf9fb4..418bc35 100755
--- a/lib/container/create
+++ b/libexec/container/create
@@ -15,19 +15,20 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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"
+SCRIPTS="/usr/share/${SOFTWARE}/scripts"
+CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in"
Parameters ()
{
diff --git a/lib/container/enter b/libexec/container/enter
index fed1193..2664fdc 100755
--- a/lib/container/enter
+++ b/libexec/container/enter
@@ -15,15 +15,16 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/key b/libexec/container/key
index 4cbdaa0..5f76fb2 100755
--- a/lib/container/key
+++ b/libexec/container/key
@@ -15,15 +15,16 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/limit b/libexec/container/limit
index 99ef03a..6323a42 100755
--- a/lib/container/limit
+++ b/libexec/container/limit
@@ -15,15 +15,16 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/list b/libexec/container/list
index ba794ab..30446c0 100755
--- a/lib/container/list
+++ b/libexec/container/list
@@ -15,16 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/log b/libexec/container/log
index a18c421..e514391 100755
--- a/lib/container/log
+++ b/libexec/container/log
@@ -15,15 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-LOG="/var/log/${PROJECT}/${PROGRAM}.log"
+HOOKS="/etc/${SOFTWARE}/hooks"
+LOG="/var/log/${SOFTWARE}/${PROGRAM}.log"
Parameters ()
{
@@ -79,6 +81,16 @@ Usage ()
Parameters "${@}"
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".*
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+# Run
case "${DATE}" in
today-*)
DAYS="$(echo ${DATE} | awk -F- '{ print $2 }')"
@@ -141,3 +153,12 @@ do
;;
esac
done
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".*
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/lib/container/move b/libexec/container/move
index e20d8a8..a76cde1 100755
--- a/lib/container/move
+++ b/libexec/container/move
@@ -15,16 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/remove b/libexec/container/remove
index 75ebd60..3205c32 100755
--- a/lib/container/remove
+++ b/libexec/container/remove
@@ -15,16 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/restart b/libexec/container/restart
index 3c84f4d..922629d 100755
--- a/lib/container/restart
+++ b/libexec/container/restart
@@ -15,15 +15,16 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/run b/libexec/container/run
index f6323c0..bf8d0a7 100755
--- a/lib/container/run
+++ b/libexec/container/run
@@ -15,15 +15,16 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/start b/libexec/container/start
index 30aee53..089aa7d 100755
--- a/lib/container/start
+++ b/libexec/container/start
@@ -15,16 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/status b/libexec/container/status
index a4b49e1..9c3a076 100755
--- a/lib/container/status
+++ b/libexec/container/status
@@ -15,16 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/stop b/libexec/container/stop
index 6b8caee..58fc0e9 100755
--- a/lib/container/stop
+++ b/libexec/container/stop
@@ -15,16 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
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/lib/container/top b/libexec/container/top
index d9baa1c..c846000 100755
--- a/lib/container/top
+++ b/libexec/container/top
@@ -15,11 +15,12 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
diff --git a/lib/container/version b/libexec/container/version
index c2b7716..3b33a4d 100755
--- a/lib/container/version
+++ b/libexec/container/version
@@ -15,16 +15,17 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
PROGRAM="container"
COMMAND="$(basename ${0})"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
-SHARE="/usr/share/${PROJECT}/${PROGRAM}"
+HOOKS="/etc/${SOFTWARE}/hooks"
+SHARE="/usr/share/${SOFTWARE}"
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"