1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh version="$1" ; shift image="$1" ; shift for s in `systemctl show kexec.target | sed -nre 's/^Wants=(.*)/\1/p'` ; do case "${s}" in kexec-load@*) systemctl disable "${s}" ;; esac done exec systemctl enable kexec-load@"${version}"