jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [apcusv/] [setup.pl] - Blame information for rev 18

 

Line No. Rev Author Line
11simandl#!/usr/bin/env perl
2 
3# $Id: setup.pl,v 1.10 2004/07/12 07:50:13 bernisys Exp $
4 
5# include PERL libraries
6use strict;
7use warnings;
8use diagnostics;
9 
10# include HotSaNIC libraries
11use lib "../../lib";
12use lib "./platform";
13use HotSaNICparser;
14use HotSaNICshellio;
15use HotSaNIClog;
16use common;
17 
18$|=1;
19 
20(my $VERSION = '$Revision: 1.10 $') =~ s/.*(\d+\.\d+).*/$1/;
21(my $IDENTIFIER = '$Id: setup.pl,v 1.10 2004/07/12 07:50:13 bernisys Exp $') =~ s/.*,v (.*) \$/$1/;
22 
23my $MODNAME=HotSaNICparser::get_module_name();
24my %MODCONF=HotSaNICmod::common::configure();
25my $OUTFILE="settings.new";
26if ( ! -e "settings" ) { $OUTFILE="settings"; }
27open OUTFILE,">$OUTFILE" || die "could not open ".HotSaNICparser::get_module_name()." settings file for writing.\n";
28 
29if ($MODCONF{APCACCESS} eq "") {
30 my @found=HotSaNICparser::locate_files("apcaccess");
31 $MODCONF{APCACCESS}=HotSaNICshellio::choose("","apcaccess could not be found.",@found);
32 }
33 
34print OUTFILE "# SHORT DESCRIPTION
35#
36# define path to the apc access tool including the cmdline option
37# to retrieve the status protocol
38#
39# Example:
40# APCACCESS=/usr/local/bin/apcaccess status
41#
42APCACCESS=\"$MODCONF{APCACCESS}\"
43";
44 
45close OUTFILE;
46 
47if ($OUTFILE eq "settings.new") {
48 HotSaNICparser::backup_file("settings");
49 rename "settings.new","settings";
50 }
51 
52print "Please check the settings file and adapt it to satisfy your needs.\n";
53 

Powered by WebSVN 2.2.1