From 55a71f00e1fcf055638fac612197ca5c36456db9 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Thu, 4 Feb 2010 22:55:11 +0530 Subject: [PATCH] compile: die on authkeys write failure --- src/gl-compile-conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gl-compile-conf b/src/gl-compile-conf index bb05d1e..eb8f8d7 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -502,5 +502,6 @@ close $newkeys_fh or die "$ABRT close newkeys failed: $!\n"; # all done; overwrite the file (use cat to avoid perm changes) system("cat $ENV{HOME}/.ssh/authorized_keys > $ENV{HOME}/.ssh/old_authkeys"); -system("cat $ENV{HOME}/.ssh/new_authkeys > $ENV{HOME}/.ssh/authorized_keys"); +system("cat $ENV{HOME}/.ssh/new_authkeys > $ENV{HOME}/.ssh/authorized_keys") + and die "couldn't write authkeys file\n"; system("rm $ENV{HOME}/.ssh/new_authkeys");