From 416390f6dd443cd411f52b9c3fc41e50c5d3e8d6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 10 Nov 2022 16:46:53 +0100 Subject: [PATCH] check if tar exists on target system --- nixos-remote | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos-remote b/nixos-remote index c0bfb9b..0ce10ed 100755 --- a/nixos-remote +++ b/nixos-remote @@ -87,6 +87,10 @@ fetch(){ exit 1 fi } +if command -v tar >/dev/null 2>&1; then + echo "no tar command found, but required to unpack kexec tarball" >&2 + exit 1 +fi rm -rf /root/kexec mkdir -p /root/kexec fetch "$kexec_url" | tar -C /root/kexec -xvzf-