mars/systemd-icpu/modprobe-mars.sh
2021-01-06 17:06:53 +01:00

24 lines
408 B
Bash
Executable File

#!/bin/bash
# do no longer start any systemd-controlled resources via nodeagent init
for res in $(
marsadm get-systemd-unit all |\
grep "^nodeagent" |\
awk '{ print $1; }' |\
sed 's/nodeagent-//' |\
cut -d. -f1 |\
sed 's/\\x2d/-/g'
); do
# workaround "nodeagent status --target"
nodeagent stop $res || echo ignore the error
done
modprobe mars
rc=$?
sleep 3
marsadm systemd-trigger
exit $rc