version 1.4, 2002/08/01 04:57:18
|
version 1.5, 2002/09/05 17:20:46
|
Line 90 use Getopt::Long;
|
Line 90 use Getopt::Long;
|
|
|
my $retval = &GetOptions("verbose|v","lm|list-missing","lq|list-questionable", |
my $retval = &GetOptions("verbose|v","lm|list-missing","lq|list-questionable", |
"dir|d=s","ftp:s","noftp","download|dl","recheck|r", |
"dir|d=s","ftp:s","noftp","download|dl","recheck|r", |
"nk|no-kernel","update","c=s"); |
"nk|no-kernel","update","c=s","rpmuser=s"); |
|
|
=pod |
=pod |
|
|
Line 203 example configuration file is given belo
|
Line 203 example configuration file is given belo
|
is omitted, I<check-rpms> will use the default configuration |
is omitted, I<check-rpms> will use the default configuration |
file I</usr/local/etc/check-rpms.conf>, if it exists. |
file I</usr/local/etc/check-rpms.conf>, if it exists. |
|
|
|
=item B<--rpmuser> I<user name> |
|
|
|
Specifying $RPMUSER on the command line. |
|
|
=back |
=back |
|
|
=head1 EXAMPLES |
=head1 EXAMPLES |
Line 263 $DEFCONF = "/usr/local/etc/check-rpms.co
|
Line 267 $DEFCONF = "/usr/local/etc/check-rpms.co
|
$DEFRPMDIR = "/mnt/redhat/RedHat/RPMS"; |
$DEFRPMDIR = "/mnt/redhat/RedHat/RPMS"; |
$DEFFTPSERVER = "updates.redhat.com"; |
$DEFFTPSERVER = "updates.redhat.com"; |
$DEFFTPUPDATES = "$RHversion/en/os"; |
$DEFFTPUPDATES = "$RHversion/en/os"; |
$DEFRPMUSER = "harris41"; |
$DEFRPMUSER = "nobody"; |
|
|
$RPMDIR=$DEFRPMDIR; |
$RPMDIR=$DEFRPMDIR; |
|
|
Line 297 Example configuration file:
|
Line 301 Example configuration file:
|
|
|
# $RPMUSER is the user name that check-rpms switches to for most of |
# $RPMUSER is the user name that check-rpms switches to for most of |
# the script when run as root |
# the script when run as root |
$RPMUSER = "harris41"; |
$RPMUSER = "adminjoe"; |
|
|
# $FTPSERVER and $FTPUPDATES are the hostname of a ftp server and the |
# $FTPSERVER and $FTPUPDATES are the hostname of a ftp server and the |
# directory where RPM updates can be found without the <arch> directory. |
# directory where RPM updates can be found without the <arch> directory. |
Line 318 if ( -f $CONF) {
|
Line 322 if ( -f $CONF) {
|
$FTPUPDATES = $DEFFTPUPDATES; |
$FTPUPDATES = $DEFFTPUPDATES; |
} |
} |
|
|
|
if ($opt_rpmuser) { |
|
$DEFRPMUSER = $opt_rpmuser; |
|
} |
|
|
# check whether we are running as root |
# check whether we are running as root |
if ($< == 0){ |
if ($< == 0){ |
if (! $RPMUSER) { |
if (! $RPMUSER) { |