From 9bfe0066180b1e39a57ef8ade54843fa623beb73 Mon Sep 17 00:00:00 2001 From: "Leigh B. Stoller" Date: Mon, 14 Apr 2003 14:20:31 +0000 Subject: [PATCH] Fix error in final image size report, as reported by Eric. --- utils/create_image.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/create_image.in b/utils/create_image.in index 5e3114fef..57e916b3a 100755 --- a/utils/create_image.in +++ b/utils/create_image.in @@ -190,6 +190,12 @@ if ($mereuser && # We test this by creating the file. Its going to get wiped anyway. # my $filename = $imageid_row{'path'}; +my $isglobal = $imageid_row{'global'}; + +# +# If a global image, make up a name. Admin person will need to copy image +# to boss. +# # Untaint. Very silly. if ($filename =~ /^([-\w\.\/\+]+)$/) { @@ -410,7 +416,8 @@ if ($cursize > $maximagesize) { fatal("FAILED: Maximum image size ($maximagesize bytes) exceeded ... \n"); } -print "Image creation succeeded. Final size: $cursize bytes. \n"; +print "Image creation succeeded. ". + "Final size: " . (stat($filename))[7] . " bytes.\n"; SENDMAIL("$user_name <$user_email>", "Image Creation on $node Completed: $pid/$imagename", -- GitLab