#
# These should be changed to constants eventually, since they should not
# change after the script is started.
- our $zone = '';
+ my $ZONE = '';
our $help = '';
our $version = '';
# Set this to 1 or higher to get debug output in the log file.
GetOptions('help' => \$help,
'version' => \$version,
- 'zone|z|s=s' => \$zone,
+ 'zone|z|s=s' => \$ZONE,
'tstampcheck=i' => \$TSTAMPCHECK,
'nomail=i' => \$NOMAIL,
'debug|d=i' => \$DEBUG,
'testing-this-script' => \$TestingMode,
);
+ constant->import(ZONE => $ZONE);
constant->import(DEBUG => $DEBUG);
constant->import(NOMAIL => $NOMAIL);
constant->import(TSTAMPCHECK => $TSTAMPCHECK);
}
}
-our $zone;
our $help;
our $version;
pod2usage(-verbose => 1, -exitval => 0) if ($help);
pod2usage(-message => 'ERROR: Required parameter not given or invalid.',
-verbose => 0, -exitval => 2)
- if (($zone ne 'ftp') && ($zone ne 'alpha') && ($zone ne 'distros'));
+ if ((ZONE ne 'ftp') && (ZONE ne 'alpha') && (ZONE ne 'distros'));
my $zone_tag = 'ftp';
-$zone_tag = 'alpha' if ($zone eq 'alpha');
-$zone_tag = 'gnu+linux-distros' if ($zone eq 'distros');
+$zone_tag = 'alpha' if (ZONE eq 'alpha');
+$zone_tag = 'gnu+linux-distros' if (ZONE eq 'distros');
# Settings to configure:
my $package_config_base = "/home/gatekpr/packages";
our $Log_Tag = 'Test';
} else {
our $Log_Tag = 'GNU';
- $Log_Tag = 'Alpha' if ($zone eq 'alpha');
- $Log_Tag = 'Distros' if ($zone eq 'distros');
+ $Log_Tag = 'Alpha' if (ZONE eq 'alpha');
+ $Log_Tag = 'Distros' if (ZONE eq 'distros');
}
# If this is set to a defined value, ftp_syslog will prepend it, inside