ServDoc_0130unixservices

Code Index:



NAME

ServDoc_0130unixservices - describe running unix services


VERSION

$Id: ServDoc_0130unixservices,v 1.3 2004/02/17 09:51:11 uherbst Exp $


SYNOPSIS

ServDoc_0130unixservices [-h|help] [-v|version] [--debug UXSRV,intensity]


DESCRIPTION

ServDoc_0130unixservices describes:

user/groups
inittab
crontabs


OPTIONS

-h|help
This help.

-v|version
Version

--debug UXBOOT,intensity
Turn on Debugging for that module.

The debug feature for that module is named ``UXBOOT''.


AUTHORS

Ulrich Herbst <Ulrich.Herbst@gmx.de>


#!/usr/bin/perl -w

#----------------------------------------------------------------------

# standard perl modules
use strict;                       # print error about unknown variables ...
use English;                      # long internal variable names;
use FindBin;                      # In which directory is ServDoc itself ?
                                  # There has to be the module and the lib dir!
use lib $FindBin::Bin. "/lib";    # Here are the ServDoc-perl-modules
use File::Basename;
use vars qw($options);

# our own perl modules
use ServDoc;

#----------------------------------------------------------------------

$options->{Version} = '$Id: ServDoc_0130unixservices,v 1.3 2004/02/17 09:51:11 uherbst Exp $';

# We need the cmdline to call the modules with the same debug options.
$options->{cmdline} = join " ", @ARGV;

sub debug { ServDoc_debug( "UXBOOT", $options, shift, shift ); }

$options = &process_cmdline($options);

my $h="Unix%%+Services%%+";
%{$options->{lang}->{en}}=
  (
   syslog       => $h . 'Syslog Daemon',
   syslog_short => i18n_std('filecontent','/etc/syslog.conf'),
   syslog_long  => 'Where will your logged messages be written ?'
  );

$h="Unix%%+Dienste%%+";
%{$options->{lang}->{de}}=
  (
   syslog       => $h . 'Syslog Daemon',
   syslog_short => i18n_std('filecontent','/etc/syslog.conf'),
   syslog_long  => 'Wo landen die mitgeloggten Meldungen ?',
  );

debug( 9, i18n_std('running',$0));

#----------------------------------------------------------------------

# Main

# Here is your useful code.

# If we are not on HP/UX,Solaris, AIX, Linux, return silently.
if ( $OSNAME !~ /hpux|linux|solaris|aix/ ) {
  debug( 1, i18n_std('unsupported',$0));
  exit 0;
}


# syslog
# I think, that is os independent.
if ( ps_grep ( "syslogd" ) ) {
  report_i18n('file','syslog','/etc/syslog.conf');
}