Skip to content

Commit

Permalink
fixing --skip-systemctl param
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Rossetti <[email protected]>
  • Loading branch information
odra authored and dougsland committed Aug 29, 2023
1 parent b41dd9a commit f206278
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#

# Globals
SYSTEMCTL_SKIP="N"
INSTALLDIR="/usr/share/qm"
ROOTFS="/usr/lib/qm/rootfs"
AGENTCONF="/etc/bluechi/agent.conf"
Expand Down Expand Up @@ -98,7 +99,7 @@ install() {
replaceIDs "${ROOTFS}/etc/subgid" containers ${QM_CONTAINER_IDS}
bluechiSetup "${ROOTFS}"

if [ -z "$SYSTEMCTL_SKIP" ]; then
if [ "$SYSTEMCTL_SKIP" == "N" ]; then
unshare --mount-proc -R "${ROOTFS}" -m systemctl enable bluechi-agent.service
else
systemctl enable bluechi-agent.service
Expand All @@ -110,7 +111,7 @@ install() {

# read command line arguments
opts=$(getopt \
--longoptions "$(printf "help,%s:," "${CMDLINE_ARGUMENT_LIST[@]}")" \
--longoptions "$(printf "help,skip-systemctl,%s:," "${CMDLINE_ARGUMENT_LIST[@]}")" \
--name "$(basename "$0")" \
--options "" \
-- "$@"
Expand All @@ -127,14 +128,13 @@ while [[ $# -gt 0 ]]; do
INSTALLDIR="${2}"
shift 2
;;

--rootfs)
ROOTFS="${2}"
shift 2
;;
--skip-systemctl)
SYSTEMCTL_SKIP="Y"
shift 2
shift
;;
--help)
usage
Expand All @@ -159,7 +159,7 @@ case "$1" in
;;
*)

if [ -z "$SYSTEMCTL_SKIP" ]; then
if [ "$SYSTEMCTL_SKIP" == "N" ]; then
if systemctl is-active --quiet "qm.service" ; then
systemctl stop qm.service
fi
Expand All @@ -171,7 +171,7 @@ case "$1" in
replaceIDs /etc/subuid containers ${CONTAINER_IDS}
replaceIDs /etc/subgid containers ${CONTAINER_IDS}

if [ -z "$SYSTEMCTL_SKIP" ]; then
if [ "$SYSTEMCTL_SKIP" == "N" ]; then
systemctl daemon-reload
systemctl start qm.service
else
Expand Down

3 comments on commit f206278

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your Packit configuration the settings of the rhcontainerbot/qm Copr project would need to be updated as follows:

field old value new value
chroots ['centos-stream-9-ppc64le', 'fedora-38-aarch64', 'fedora-38-x86_64', 'centos-stream-9-aarch64', 'centos-stream-9-x86_64', 'fedora-38-ppc64le'] ['centos-stream-9-aarch64', 'centos-stream-9-ppc64le', 'centos-stream-9-x86_64', 'fedora-38-aarch64', 'fedora-38-ppc64le', 'fedora-38-x86_64', 'fedora-39-aarch64', 'fedora-39-ppc64le', 'fedora-39-x86_64']

Diff of chroots:

+fedora-39-ppc64le
+fedora-39-x86_64
+fedora-39-aarch64

Packit was unable to update the settings above as it is missing admin permissions on the rhcontainerbot/qm Copr project.

To fix this you can do one of the following:

  • Grant Packit admin permissions on the rhcontainerbot/qm Copr project on the permissions page.
  • Change the above Copr project settings manually on the settings page to match the Packit configuration.
  • Update the Packit configuration to match the Copr project settings.

Please retrigger the build, once the issue above is fixed.

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your Packit configuration the settings of the rhcontainerbot/qm Copr project would need to be updated as follows:

field old value new value
chroots ['centos-stream-9-ppc64le', 'fedora-38-aarch64', 'fedora-38-x86_64', 'centos-stream-9-aarch64', 'centos-stream-9-x86_64', 'fedora-38-ppc64le'] ['centos-stream-9-aarch64', 'centos-stream-9-ppc64le', 'centos-stream-9-x86_64', 'fedora-38-aarch64', 'fedora-38-ppc64le', 'fedora-38-x86_64', 'fedora-39-aarch64', 'fedora-39-ppc64le', 'fedora-39-x86_64']

Diff of chroots:

+fedora-39-ppc64le
+fedora-39-x86_64
+fedora-39-aarch64

Packit was unable to update the settings above as it is missing admin permissions on the rhcontainerbot/qm Copr project.

To fix this you can do one of the following:

  • Grant Packit admin permissions on the rhcontainerbot/qm Copr project on the permissions page.
  • Change the above Copr project settings manually on the settings page to match the Packit configuration.
  • Update the Packit configuration to match the Copr project settings.

Please retrigger the build, once the issue above is fixed.

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your Packit configuration the settings of the rhcontainerbot/qm Copr project would need to be updated as follows:

field old value new value
chroots ['centos-stream-9-x86_64', 'fedora-38-x86_64', 'centos-stream-9-ppc64le', 'centos-stream-9-aarch64', 'fedora-38-aarch64', 'fedora-38-ppc64le'] ['centos-stream-9-aarch64', 'centos-stream-9-ppc64le', 'centos-stream-9-x86_64', 'fedora-38-aarch64', 'fedora-38-ppc64le', 'fedora-38-x86_64', 'fedora-39-aarch64', 'fedora-39-ppc64le', 'fedora-39-x86_64']

Diff of chroots:

+fedora-39-aarch64
+fedora-39-x86_64
+fedora-39-ppc64le

Packit was unable to update the settings above as it is missing admin permissions on the rhcontainerbot/qm Copr project.

To fix this you can do one of the following:

  • Grant Packit admin permissions on the rhcontainerbot/qm Copr project on the permissions page.
  • Change the above Copr project settings manually on the settings page to match the Packit configuration.
  • Update the Packit configuration to match the Copr project settings.

Please retrigger the build, once the issue above is fixed.

Please sign in to comment.