packages: explain when hostname check fails

This commit is contained in:
Sandro - 2023-11-13 01:58:44 +01:00
parent bdaebb565a
commit fc0699251b
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,11 @@ lib.attrsets.mapAttrs
exit 2
''}
[[ $(ssh ${target} cat /etc/hostname) == ${name} ]]
if [[ $(ssh ${target} cat /etc/hostname) != ${name} ]]; then
echo "hostname of the target machine does not match, please manually investiagte!"
echo " $(ssh ${target} cat /etc/hostname) != ${name}"
exit 1
fi
nix copy --no-check-sigs --to ssh-ng://${target} ${inputPaths}
nix copy --no-check-sigs --derivation --to ssh-ng://${target} ${toplevelDrvPath}