"Fossies" - the Fresh Open Source Software Archive

Member "munin-2.0.52/plugins/node.d.debug/id.in" (20 Nov 2019, 1245 Bytes) of package /linux/misc/munin-2.0.52.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!@@GOODSH@@
    2 # -*- sh -*-
    3 
    4 : << =cut
    5 
    6 =head1 NAME
    7 
    8 id - Plugin for testing user and group statements in the plugin config.
    9 
   10 =head1 NOTES
   11 
   12 This plugin is used for munin testing and development.
   13 
   14 =head1 AUTHOR
   15 
   16 Copyright (C) 2006 Dagfinn Ilmari Mannsaaker <ilmari@ilmari.org>
   17 
   18 =head1 LICENSE
   19 
   20 This program is free software; you can redistribute it and/or modify
   21 it under the terms of the GNU General Public License as published by
   22 the Free Software Foundation; version 2 dated June, 1991.
   23 
   24 This program is distributed in the hope that it will be useful, but
   25 WITHOUT ANY WARRANTY; without even the implied warranty of
   26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   27 General Public License for more details.
   28 
   29 You should have received a copy of the GNU General Public License along
   30 with this program; if not, write to the Free Software Foundation, Inc.,
   31 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   32 
   33 =head1 MAGIC MARKERS
   34 
   35  #%# family=test
   36 
   37 =cut
   38 
   39 if [ "$1" = "config" ]; then
   40     echo "graph_title User and groups"
   41     echo "graph no"
   42     echo "uid.label User ID"
   43     echo "gid.label Group ID"
   44     exit 0
   45 fi
   46 
   47 printf "uid.value "
   48 id -u
   49 printf "uid.extinfo "
   50 id -nu
   51 printf "gid.value "
   52 id -g
   53 printf "gid.extinfo "
   54 id -Gn