diff options
Diffstat (limited to 'builder/modules.d/kexec-reboot/scripts/kexec-reboot.sh')
-rwxr-xr-x | builder/modules.d/kexec-reboot/scripts/kexec-reboot.sh | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/builder/modules.d/kexec-reboot/scripts/kexec-reboot.sh b/builder/modules.d/kexec-reboot/scripts/kexec-reboot.sh deleted file mode 100755 index 68fa73b9..00000000 --- a/builder/modules.d/kexec-reboot/scripts/kexec-reboot.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -kexec_load() { - . /lib/dracut-lib.sh - - local SLXSRV="$(getarg slxsrv)" - local SLXBASE="$(getarg slxbase)" - local DIR="$(mktemp -d)" - - if [ -z "$SLXSRV" -o -z "$SLXBASE" -o -z "$DIR" ]; then - echo "Failed to construct download URL..." - return 1 - fi - for FILE in kernel initramfs-stage31; do - if ! slx-tools download_retry "http://${SLXSRV}/${SLXBASE}/${FILE}" > "${DIR}/${FILE}" ; then - echo "Failed to download ${FILE}." - return 1 - fi - done - - if ! kexec --load "${DIR}/kernel" \ - --initrd "${DIR}/initramfs-stage31" \ - --reuse-cmdline "${1:+--append "$@"}"; then - echo "Failed to load kernel/initrd from ${DIR}" - return 1 - fi - return 0 -} - -if ! hash kexec; then - echo "kexec binary not found, aborting..." - exit 1 -fi -if kexec_load $@; then - kexec -e -else - echo "Failed to execute kexec --load" - exit 1 -fi |