Skip to content
Snippets Groups Projects
Commit 1eaa8ac9 authored by Julien Leduc's avatar Julien Leduc
Browse files

Removing CI_CONTEXT environment variable as it is really easy to sort

out if we are using systemd or not. We just need to check
/proc/1/cmdline to get the command that started the container.
Now to chose between systemd and no systemd we just need to set
`command` key in the pod yaml definition for nosystemd or remove the
line to use systemd.
Much more straightforward...
parent eb81bf08
No related branches found
No related tags found
No related merge requests found
......@@ -39,8 +39,8 @@ echo OK
echo "Generating core file in /var/log/cta directory so that those are available as artifacts"
echo '/var/log/cta/core_%e.%p' > /proc/sys/kernel/core_pattern
if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
# systemd is not available
if [ "-$(cat /proc/1/cmdline 2>&1 | sed -e 's/\x0//g')-" != '-/usr/sbin/init-' ]; then
# we are not running in systemd
runuser --shell='/bin/bash' --session-command='cd ~cta; xrootd -l /var/log/cta-frontend-xrootd.log -k fifo -n cta -c /etc/cta/cta-frontend-xrootd.conf -I v4' cta
echo "ctafrontend died"
echo "analysing core file if any"
......
......@@ -33,8 +33,6 @@ spec:
key: subdir
- name: TERM
value: "xterm"
- name: CI_CONTEXT
value: "nosystemd"
command: ['/opt/run/bin/ctafrontend.sh']
args: ["none"]
volumeMounts:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment