File: id.in

package info (click to toggle)
munin 2.0.76-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,064 kB
  • sloc: perl: 11,684; java: 1,924; sh: 1,632; makefile: 636; javascript: 365; python: 267
file content (54 lines) | stat: -rw-r--r-- 1,245 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!@@GOODSH@@
# -*- sh -*-

: << =cut

=head1 NAME

id - Plugin for testing user and group statements in the plugin config.

=head1 NOTES

This plugin is used for munin testing and development.

=head1 AUTHOR

Copyright (C) 2006 Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>

=head1 LICENSE

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 dated June, 1991.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

=head1 MAGIC MARKERS

 #%# family=test

=cut

if [ "$1" = "config" ]; then
    echo "graph_title User and groups"
    echo "graph no"
    echo "uid.label User ID"
    echo "gid.label Group ID"
    exit 0
fi

printf "uid.value "
id -u
printf "uid.extinfo "
id -nu
printf "gid.value "
id -g
printf "gid.extinfo "
id -Gn