From 32f704e09e33fae2bb4ead203f7559127f238439 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 20 Sep 2021 07:46:04 +0200 Subject: [PATCH] pmgbanner: check return value from open Signed-off-by: Thomas Lamprecht --- src/bin/pmgbanner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pmgbanner b/src/bin/pmgbanner index 58bd32a..c8d42cb 100755 --- a/src/bin/pmgbanner +++ b/src/bin/pmgbanner @@ -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; -- 2.39.2