From 5d2466dc0f2656e98bf9e5a761ac878d34ee084b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 25 Jul 2016 11:19:18 +0100 Subject: [PATCH] cr-ensure-disk-space: Correct stdout output d221996eea64 "cr-ensure-disk-space: Run check_space before taking lock" introduced an additional call to check_space but check_space prints the start of a message (with no newline) expecting iteration_proceed to print the rest. Move $|=1 up appropriately and add a couple of messages in the right place. This involves calling quit_ok rather than exit 0. Signed-off-by: Ian Jackson --- cr-ensure-disk-space | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space index 6a9781a0..ff6b01b9 100755 --- a/cr-ensure-disk-space +++ b/cr-ensure-disk-space @@ -68,13 +68,15 @@ sub quit_ok () { $|=1; -exit 0 if check_space; +check_space if check_space; + +print "taking lock..."; my $lock = "$c{GlobalLockDir}/publish-lock"; open LOCK, "> $lock" or die "$lock $!"; flock LOCK, LOCK_EX or die $!; -$|=1; +print "proceeding...\n"; my $chkq= db_prepare("SELECT * FROM flights WHERE flight=?"); -- 2.39.5