From 9eb33a40a60560e3b6fc6c49653a657144beff26 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 12 Dec 2009 16:06:01 +0000 Subject: [PATCH] skip empty lines --- lam/lib/lamdaemon.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lam/lib/lamdaemon.pl b/lam/lib/lamdaemon.pl index 274af033..c681ce44 100755 --- a/lam/lib/lamdaemon.pl +++ b/lam/lib/lamdaemon.pl @@ -96,8 +96,8 @@ sub get_fs { # Load mountpoints from mtab if enabled quotas # check if script runs as root if ($< != 0 ) { - print "ERROR,Lamdaemon ($hostname),Not called as root!\n"; - logMessage(LOG_ERR, "Not called as root!"); + print "ERROR,Lamdaemon ($hostname),Not called as root (user id " . $< . ").\n"; + logMessage(LOG_ERR, "Not called as root (user id " . $< . ")."); exit 1; } @@ -112,8 +112,11 @@ while (1) { # Get user information if (($vals[3] eq 'user') || ($vals[1] eq 'home')) { @user = getpwnam($vals[0]); } else { @user = getgrnam($vals[0]); } - # run tests - if (($vals[1] eq 'test')) { + if ($vals[1] eq '') { + # empty line, nothing to do + } + elsif (($vals[1] eq 'test')) { + # run tests runTest(); } elsif ($vals[1] eq 'home') {