From 5393b8dd4b41c99f17da093203c80fc751cac570 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 27 Oct 2024 15:21:56 +0300 Subject: [PATCH] wprking on per-ct config... Signed-off-by: Alex A. Naanou --- .pct-helpers | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.pct-helpers b/.pct-helpers index bc94087..40bad92 100644 --- a/.pct-helpers +++ b/.pct-helpers @@ -390,6 +390,28 @@ reviewApplyChanges(){ #---------------------------------------------------------------------- +# +# readCTConfig +# +# XXX list or load a specific CT config... +readCTConfig(){ + if [ -z $ID ] && ! [ -z $CTHOSTNAME ] ; then + # XXX select by id... + true + elif ! [ -z $ID ] && [ -z $CTHOSTNAME ] ; then + # XXX select by hostname... + true + else + # XXX list all... + return + fi + local ct_cfg=$ID-$CTHOSTNAME.cfg + if [ -e $ct_cfg ] ; then + source "$ct_cfg" + fi +} + + # # readConfig #