~mjasnik/timekpr-revived/stable

« back to all changes in this revision

Viewing changes to support/bin/users.timekpr

  • Committer: Eduards Bezverhijs
  • Date: 2018-11-03 17:26:23 UTC
  • mfrom: (1.1.31 development)
  • Revision ID: edzis@inbox.lv-20181103172623-5y70likyz8akzl3l
* fixed a long standing bug with loginctl shows error messages like this "Failed to look up user USER: No such process"

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# this filters out only Active users using loginctl
4
4
ACTIVE_USERS_LOGINCTL()
5
5
(
6
 
        loginctl list-users | sed 's/^ \+//' | cut -d' ' -f2 | sort | uniq | \
 
6
        loginctl list-users | grep -E '^ *[0-9]+ +[a-z_][a-z0-9_-]*[$]? *$' | cut -d' ' -f2 | sort | uniq | \
7
7
                while read TPKR_USER;
8
8
                do
9
9
                        if  [ "$(loginctl show-user -p State $TPKR_USER)" = "State=active" ];