Files
warewulf/common-Check-for-non-empty-string-before-chomp.patch
Christian Goll cc63d1086e Accepting request 923420 from home:eeich:branches:network:cluster
- Fix minor issues:
  * vnfs-SUSE-Templates-Leap-15.1-Leap-15.3-added-SLE-15.patch
    Add templates for Leap 15.3 and SLE 15 (all SPs).
  * common-Check-for-non-empty-string-before-chomp.patch
    Avoid Perl error message by checking for non-empty string
    before chomp().
  * common-Create-database-user-separately-to-allow-empty-password.patch
    Allow empty password for read only user database access.
  * common-Fix-help-text.patch
  * cluster-Don-t-attempt-ntp-configuration-when-chrony-is-found.patch
    Do not attempt to configure ntp when chrony is found.
  * cluster-If-hostname-doesn-t-contain-the-domain-try-to-derive-this-from-FQDN.patch
    Attempt to derive hostname from FQDN.
  * Set apache2moddir correctly
  * Set warewulf group in perl-warewulf-common, not warewulf-common:
    perl-warewulf-common is installed earlier.
- Removed:
  * vnfs-wwmkchroot-opensuse-15.0.tmpl

OBS-URL: https://build.opensuse.org/request/show/923420
OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf?expand=0&rev=10
2021-10-07 10:04:04 +00:00

27 lines
886 B
Diff

From: Egbert Eich <eich@suse.com>
Date: Mon Oct 4 19:56:06 2021 +0200
Subject: common: Check for non-empty string before chomp()
Patch-mainline: Not yet
Git-commit: 095b0b5452183654517c30e231912af82baf0c9d
References:
Signed-off-by: Egbert Eich <eich@suse.com>
---
common/lib/Warewulf/System/Suse.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/common/lib/Warewulf/System/Suse.pm b/common/lib/Warewulf/System/Suse.pm
index 155547c..78e4075 100644
--- a/common/lib/Warewulf/System/Suse.pm
+++ b/common/lib/Warewulf/System/Suse.pm
@@ -80,7 +80,9 @@ service($$$)
while(<SERVICE>) {
$self->{"OUTPUT"} .= $_;
}
- chomp($self->{"OUTPUT"});
+ if (defined($self->{"OUTPUT"})) {
+ chomp($self->{"OUTPUT"});
+ }
if (close SERVICE) {
&dprint("Service command ran successfully\n");
return(1);