skip empty lines
This commit is contained in:
parent
0836272037
commit
9eb33a40a6
|
@ -96,8 +96,8 @@ sub get_fs { # Load mountpoints from mtab if enabled quotas
|
||||||
|
|
||||||
# check if script runs as root
|
# check if script runs as root
|
||||||
if ($< != 0 ) {
|
if ($< != 0 ) {
|
||||||
print "ERROR,Lamdaemon ($hostname),Not called as root!\n";
|
print "ERROR,Lamdaemon ($hostname),Not called as root (user id " . $< . ").\n";
|
||||||
logMessage(LOG_ERR, "Not called as root!");
|
logMessage(LOG_ERR, "Not called as root (user id " . $< . ").");
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,8 +112,11 @@ while (1) {
|
||||||
# Get user information
|
# Get user information
|
||||||
if (($vals[3] eq 'user') || ($vals[1] eq 'home')) { @user = getpwnam($vals[0]); }
|
if (($vals[3] eq 'user') || ($vals[1] eq 'home')) { @user = getpwnam($vals[0]); }
|
||||||
else { @user = getgrnam($vals[0]); }
|
else { @user = getgrnam($vals[0]); }
|
||||||
|
if ($vals[1] eq '') {
|
||||||
|
# empty line, nothing to do
|
||||||
|
}
|
||||||
|
elsif (($vals[1] eq 'test')) {
|
||||||
# run tests
|
# run tests
|
||||||
if (($vals[1] eq 'test')) {
|
|
||||||
runTest();
|
runTest();
|
||||||
}
|
}
|
||||||
elsif ($vals[1] eq 'home') {
|
elsif ($vals[1] eq 'home') {
|
||||||
|
|
Loading…
Reference in New Issue