Skip to content

Commit 9e44d58

Browse files
author
olevole
committed
SYSRC_CMD -> /usr/local/cbsd/misc/cbsdsysrc
1 parent c48144d commit 9e44d58

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

garm

+14-14
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ get_pool_flavors()
107107

108108
for i in ${flavors_available}; do
109109
if [ "${i}" = "${oflavors}" ]; then
110-
${SYSRC_CMD} -qf ${tmp_choice} flavors="${oflavors}" > /dev/null 2>&1
110+
/usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} flavors="${oflavors}" > /dev/null 2>&1
111111
flavors="${oflavors}"
112112
fi
113113
done
@@ -141,7 +141,7 @@ get_pool_images()
141141
read oimages
142142
for i in ${images_available}; do
143143
if [ "${i}" = "${oimages}" ]; then
144-
${SYSRC_CMD} -qf ${tmp_choice} images="${oimages}" > /dev/null 2>&1
144+
/usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} images="${oimages}" > /dev/null 2>&1
145145
images="${oimages}"
146146
fi
147147
done
@@ -197,7 +197,7 @@ get_pool_repos()
197197

198198
for i in ${repos_available}; do
199199
if [ "${i}" = "${orepos}" ]; then
200-
${SYSRC_CMD} -qf ${tmp_choice} repos="${orepos}" > /dev/null 2>&1
200+
/usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} repos="${orepos}" > /dev/null 2>&1
201201
repos="${orepos}"
202202
fi
203203
done
@@ -229,7 +229,7 @@ get_pool_max_runners()
229229
fi
230230

231231
if [ ${omax_runners} -gt 0 ]; then
232-
${SYSRC_CMD} -qf ${tmp_choice} max_runners="${omax_runners}" > /dev/null 2>&1
232+
/usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} max_runners="${omax_runners}" > /dev/null 2>&1
233233
max_runners="${omax_runners}"
234234
fi
235235
[ -n "${max_runners}" ] && break
@@ -256,7 +256,7 @@ get_pool_labels()
256256
printf "Enter comma-separated labels: "
257257
read olabels
258258
labels=$( echo "${labels}" | ${TR_CMD} -d " " )
259-
${SYSRC_CMD} -qf ${tmp_choice} labels="${olabels}" > /dev/null 2>&1
259+
/usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} labels="${olabels}" > /dev/null 2>&1
260260
labels="${olabels}"
261261
break
262262
done
@@ -289,7 +289,7 @@ get_pool_min_runners()
289289
continue
290290
fi
291291
if [ ${omax_runners} -gt 0 ]; then
292-
${SYSRC_CMD} -qf ${tmp_choice} min_runners="${omin_runners}" > /dev/null 2>&1
292+
/usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} min_runners="${omin_runners}" > /dev/null 2>&1
293293
min_runners="${omin_runners}"
294294
fi
295295
[ -n "${min_runners}" ] && break
@@ -327,7 +327,7 @@ EOF
327327

328328
if [ -z "${p}" ]; then
329329
echo "APPLY"
330-
${SYSRC_CMD} -qf ${tmp_choice} \
330+
/usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} \
331331
flavors="${flavors}" \
332332
images="${images}" \
333333
repos="${repos}" \
@@ -430,7 +430,7 @@ if [ -z "${PAT}" ]; then
430430
printf "${N1_COLOR}Please insert you PAT here: ${N2_COLOR}"
431431
read PAT
432432
if [ -n "${PAT}" ]; then
433-
${SYSRC_CMD} -qf ${MOD_CONFIG} PAT="${PAT}" > /dev/null 2>&1
433+
/usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} PAT="${PAT}" > /dev/null 2>&1
434434
break
435435
fi
436436
done
@@ -443,7 +443,7 @@ fi
443443
if [ -z "${WEBHOOK_SECRET}" ]; then
444444
WEBHOOK_SECRET=$( random_password_gen -l 64 )
445445
${ECHO} "${N1_COLOR}${CBSD_APP}: bootstrap, new webhook secret was generated: ${N2_COLOR}${WEBHOOK_SECRET}${N0_COLOR}"
446-
${SYSRC_CMD} -qf ${MOD_CONFIG} WEBHOOK_SECRET="${WEBHOOK_SECRET}" > /dev/null 2>&1
446+
/usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} WEBHOOK_SECRET="${WEBHOOK_SECRET}" > /dev/null 2>&1
447447
else
448448
${ECHO} "${N1_COLOR}webhook secret exist: ${N2_COLOR}${WEBHOOK_SECRET}${N0_COLOR}"
449449
fi
@@ -465,7 +465,7 @@ if [ -z "${URL}" ]; then
465465
read URL
466466
[ -z "${URL}" ] && URL="${URL_EXAMPLE}"
467467
if [ -n "${URL}" ]; then
468-
${SYSRC_CMD} -qf ${MOD_CONFIG} URL="${URL}" > /dev/null 2>&1
468+
/usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} URL="${URL}" > /dev/null 2>&1
469469
break
470470
fi
471471
done
@@ -502,13 +502,13 @@ if [ "${INIT_SUCCESS}" != "1" ]; then
502502
${ECHO} "Your URL: ${URL}"
503503
# we need to start GARM before init
504504
PASSWORD=$( random_password_gen -l 64 )
505-
${SYSRC_CMD} -qf ${MOD_CONFIG} PASSWORD="${PASSWORD}" > /dev/null 2>&1
505+
/usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} PASSWORD="${PASSWORD}" > /dev/null 2>&1
506506
echo "garm-cli init --name="local_garm" --url ${URL} -e root@localhost --username=mybee --password=\"${PASSWORD}\""
507507
garm-cli init --name="local_garm" --url ${URL} -e root@localhost --username=mybee --password="${PASSWORD}"
508508
_ret=$?
509509
echo "ret: ${_ret}"
510510
if [ ${_ret} -eq 0 ]; then
511-
${SYSRC_CMD} -qf ${MOD_CONFIG} INIT_SUCCESS="1" > /dev/null 2>&1
511+
/usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} INIT_SUCCESS="1" > /dev/null 2>&1
512512
else
513513
err 1 "${N1_COLOR}${CBSD_APP}: failed init${N0_COLOR}"
514514
fi
@@ -573,7 +573,7 @@ case "${mode}" in
573573
garm-cli repo create --credentials=mybee --name=${reponame} --owner=${owner} --webhook-secret="${WEBHOOK_SECRET}"
574574
_ret=$?
575575
echo "RET: ${_ret}"
576-
${SYSRC} -qf ${MOD_CONFIG} repo+="${owner}/${reponame}" > /dev/null 2>&1
576+
/usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} repo+="${owner}/${reponame}" > /dev/null 2>&1
577577
;;
578578
lsrepo)
579579
${ECHO} "${N1_COLOR}List of repo:${N0_COLOR}"
@@ -590,7 +590,7 @@ case "${mode}" in
590590
${GARM_CLI_CMD} repo delete ${ID}
591591
_ret=$?
592592
echo "RET: ${_ret}"
593-
[ ${_ret} -eq 0 ] && ${SYSRC} -qf ${MOD_CONFIG} repo-="${owner}/${reponame}" > /dev/null 2>&1
593+
[ ${_ret} -eq 0 ] && /usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} repo-="${owner}/${reponame}" > /dev/null 2>&1
594594
;;
595595
addpool)
596596
REPO_COUNT=$( cbsdsqlro /usr/local/etc/garm/garm.db "SELECT COUNT(id) FROM repositories;" 2>/dev/null )

0 commit comments

Comments
 (0)