diff --git a/build/containers/pcp-pmcd/Dockerfile b/build/containers/pcp-pmcd/Dockerfile index 9d9a858..676081d 100644 --- a/build/containers/pcp-pmcd/Dockerfile +++ b/build/containers/pcp-pmcd/Dockerfile @@ -17,7 +17,7 @@ RUN yum -y install pcp && yum clean all # RUN rpm -Uvh --force /upgrade/*.rpm && rm -fr /upgrade # denote this as a container environment, for rc scripts -RUN . /etc/pcp.conf && touch $PCP_SYSCONF_DIR/rc.container +ENV PCP_CONTAINER_NAME pcp-pmcd # disable service advertising - no avahi daemon in the container # (dodges warnings from pmcd attempting to connect during startup) diff --git a/src/pmcd/rc_pmcd b/src/pmcd/rc_pmcd index 99e4af0..503afcc 100644 --- a/src/pmcd/rc_pmcd +++ b/src/pmcd/rc_pmcd @@ -502,7 +502,7 @@ Error: pmcd control file '"$PCP_PMCDCONF_PATH"' is missing, cannot start pmcd.' [ -x $PCPLOCAL ] && $PCPLOCAL $VFLAG start # finally, stop here if running in a container - [ -f $PCP_SYSCONF_DIR/rc.container ] && exec $PCP_BINADM_DIR/pmpause + [ ! -z "$PCP_CONTAINER_NAME" ] && exec $PCP_BINADM_DIR/pmpause fi status=0 ;;