Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/vm/systemvm/injectkeys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ inject_into_iso() {
[ ! -f $isofile ] && echo "$(basename $0): Could not find systemvm iso patch file $isofile" && return 1
$SUDO mount -o loop $isofile $MOUNTPATH
[ $? -ne 0 ] && echo "$(basename $0): Failed to mount original iso $isofile" && clean_up && return 1
diff -q $MOUNTPATH/authorized_keys $newpubkey &> /dev/null && clean_up && return 0
diff -q $MOUNTPATH/authorized_keys $newpubkey &> /dev/null && echo "New public key is the same as the one in the systemvm.iso, not injecting it, not modifying systemvm.iso" && clean_up && return 0
$SUDO cp -b $isofile $backup
[ $? -ne 0 ] && echo "$(basename $0): Failed to backup original iso $isofile" && clean_up && return 1
rm -rf $TMPDIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -767,10 +767,10 @@ protected void injectSshKeysIntoSystemVmIsoPatch(String publicKeyPath, String pr
command.add(systemVmIsoPath);

final String result = command.execute();
s_logger.info("Injected public and private keys into systemvm iso with result : " + result);
s_logger.info("The script injectkeys.sh was run with result : " + result);
if (result != null) {
s_logger.warn("Failed to inject generated public key into systemvm iso " + result);
throw new CloudRuntimeException("Failed to inject generated public key into systemvm iso " + result);
s_logger.warn("The script injectkeys.sh failed to run successfully : " + result);
throw new CloudRuntimeException("The script injectkeys.sh failed to run successfully : " + result);
}
}

Expand Down