Commit 8d84714a authored by Julien Leduc's avatar Julien Leduc
Browse files

echo "-$(cat /proc/1/cmdline 2>&1 | sed -e 's/\x0//g')-"

As I do not want a complex sed query to check for systemd or not, let's
solve it in and express it in CI_CONTEXT variable.
parent adbeaee6
......@@ -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 [ "-$(cat /proc/1/cmdline 2>&1 | sed -e 's/\x0//g')-" != '-/usr/sbin/init-' ]; then
# we are not running in systemd
if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
# systemd is not available
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"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment