Fix smb counter in user.pm in case smb is not installed.

Before the smb value was -1 if no smbstatus was found, resulting in -nan values.
Now the behaviour is the same as for macusers.
This commit is contained in:
Andreas Bachlechner 2021-09-24 14:32:00 +02:00
parent 41c14beba6
commit ac8b4a0eae
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ sub user_update {
} }
} }
close(IN); close(IN);
$smb--; $smb-- if $smb > 0;
open(IN, "macusers 2>/dev/null |"); open(IN, "macusers 2>/dev/null |");
@data = <IN>; @data = <IN>;