]> git.proxmox.com Git - pmg-api.git/commitdiff
pmgbanner: check return value from open
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 20 Sep 2021 05:46:04 +0000 (07:46 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 20 Sep 2021 05:46:04 +0000 (07:46 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/bin/pmgbanner

index 58bd32ab0612c6e385d6233ad50c4e340762d3c0..c8d42cbd406f67a8630728f7264a88b87b590eb8 100755 (executable)
@@ -32,7 +32,7 @@ $banner .= "  https://${addr}:8006/\n";
 
 $banner .= "\n$xline\n\n";
 
-open(my $issue_fh, '>', '/etc/issue');
+open(my $issue_fh, '>', '/etc/issue') or die "cannot open '/etc/issue' for writing - $!";
 
 print $issue_fh $banner;