ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/statgrab/statgrab-make-mrtg-index.in
(Generate patch)

Comparing projects/libstatgrab/src/statgrab/statgrab-make-mrtg-index.in (file contents):
Revision 1.1 by ats, Thu Aug 28 11:26:42 2003 UTC vs.
Revision 1.2 by ats, Sat Oct 18 16:00:29 2003 UTC

# Line 29 | Line 29 | Usage: $progname [OPTION]... [CONFIGFILE]...
29   Generate an XHTML index page on stdout from MRTG config files specified
30   on the command line or read from stdin.
31  
32 + --title TITLE                Use TITLE as the title of the generated page
33   --help                       Display this help and exit
34  
35   Version $package_version - report bugs to $package_bugreport.
36   EOF
37  
38   sub main () {
39 <        GetOptions('help' => \my $help) or die $help_text;
39 >        my $hostname = `hostname`;
40 >        chomp $hostname;
41 >        my $pagetitle = "MRTG: $hostname";
42 >
43 >        GetOptions('title=s' => \$pagetitle,
44 >                   'help' => \my $help) or die $help_text;
45          if ($help) {
46                  print "$help_text";
47                  exit 0;
# Line 53 | Line 59 | sub main () {
59      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
60   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
61   <head>
62 <    <title>MRTG</title>
62 >    <title>$pagetitle</title>
63   </head>
64   <body>
65 < <h1>MRTG</h1>
65 > <h1>$pagetitle</h1>
66   EOF
67          foreach my $title (sort keys %pages) {
68                  my $page = $pages{$title};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines