Date: Sat, 21 Apr 2007 08:49:00 -0400 From: MuntadaNet Webmaster <webmaster (at mark) muntada.com> Subject: [coba-e:09641] Re: Perl Dependencies To: coba-e (at mark) bluequartz.org Message-Id: <200704211253.l3LCrvWN019540 (at mark) huda.muntadanet.com> In-Reply-To: <109c01c783dc$f2a79060$0601a8c0@systemax> References: <200704191340.l3JDdxhI013711 (at mark) huda.muntadanet.com> <109c01c783dc$f2a79060$0601a8c0 (at mark) systemax> X-Mail-Count: 09641Gerald, That didn't seem to work but I am still looking at the results since they were sorted differently. The main issue is that I am getting this error all the time from the cron. I posted this issue several weeks ago and the best suggestion at the time came out that I needed to synchronize the cced with the actual quotas. Hence, the attempt to use Patricko's meta-verify utility that he wrote for BQ. It was when I tried to run that when I ran into the Perl Dependencies issue. Date: Fri, 20 Apr 2007 21:30:04 -0700 From: root (at mark) juhfah.xxxxx.com (Cron Daemon) To: root (at mark) juhfah.jannah.com Subject: Cron <root (at mark) juhfah> /usr/sbin/swatch -c /etc/swatch.conf Use of uninitialized value in subroutine entry at /usr/sausalito/swatch/bin/am_disk.pl line 348, <GEN1> line 27. Use of uninitialized value in subroutine entry at /usr/sausalito/swatch/bin/am_disk.pl line 348, <GEN1> line 27. Use of uninitialized value in subroutine entry at /usr/sausalito/swatch/bin/am_disk.pl line 348, <GEN1> line 27. Meta-Verify Code #!/usr/bin/perl -w -I/usr/sausalito/perl -I/usr/sausalito/handlers/base/vsite # ####### meta-verify, version 0.01a # # # system(OS) & database(codb aka meta) verification and integrity check utility # for the Cobalt 550 / Bluequartz product family # # Patrick Ong Tiong Heng (patricko (at mark) staff.singnet.com.sg) # # # ####### OPERATION # # meta-verify -u -q | -s -q | -a | [-v] [-h] # # -u user # -s virtual site # # -q quota # -a all | users + virtual sites # # -v verbose # -h usage help # # # ####### DESCRIPTION # # # Actually, this script should call system-verify as it attempts to detect and # repair coherency problems between the state saved in the database and # the system configuration state. In order to let cobalt users feel "at home", # I decided to retain the name: meta-verify. # # - (KIV) Verify and repair virtual sites. # - (KIV) Verify and repair user accounts. # - (KIV )Maintain intergrity of the RaQ system configuration files. # - (Partial - Only Quota) Ensure coherency between System and Meta/quota backend. # # ####### SUPPORTED SYSTEMS # # Cobalt 550, Bluequartz # # ####### CHANGELOG # # # version 0.01a (Feb 21 2006) # - initial creation alpha # # ####### BEGIN { require CCE; require Quota; use Getopt::Std; use vars qw($TITLE $VERSION $AUTHOR $COPYRIGHT); $TITLE = "meta-verify"; $VERSION = "0.01a"; $AUTHOR = "Patrick Ong Tiong Heng (patricko\ (at mark) staff.singnet.com.sg)"; $COPYRIGHT = "bluequartz.org"; } use CCE; use strict; use Quota; my $path = "/home"; my $dev; my $uid = ""; my $uqs = ""; my $uqh = ""; my $siteUID = ""; my $userUID = ""; use vars qw($opt_u $opt_s $opt_q $opt_a $opt_h $Verbose); # command-line arguments, verbose level getopts("usqavh"); # usage help &usage if ($opt_h); if ($opt_a) { &meta2system(); } elsif ($opt_u) { print "KIV\n"; } elsif ($opt_s) { print "KIV\n"; } elsif ($opt_q) { print "KIV\n"; } elsif ($Verbose) { print "KIV\n"; } else { &usage; } print "\n" unless ($Verbose); exit 0; 1; sub usage () { printf("\n"); printf(" usage: %s [options]\n", $TITLE); printf("\n"); printf(" -u user\n"); printf(" -s virtual site\n"); printf("\n"); printf(" -q quota\n"); printf(" -a all \| users + virtual sites\n"); printf("\n"); printf(" -v verbose\n"); printf(" -h help\n"); printf("\n"); exit 1; } sub meta2system() { my $cce = new CCE; $cce->connectuds(); my @vsites; my @vsitelist; my @userlist; my $hostname=`hostname`; chomp($hostname); $dev = Quota::getqcarg($path) || die "$path: $!\n"; ### Find Domain records @vsitelist = $cce->findx('Vsite'); foreach my $vsite (@vsitelist) { my @userlist; my $siteNum; my $userNum; my $fqdn; my $domain; my $vsitequota; my $vsitequotaExtra; my $userquota; my $userquotaExtra; my ($ok, $object, $old, $new) = $cce->get($vsite); my ($vDiskok, $vDiskobject, $vDiskold, $vDisknew) = $cce->get($vsite, "Disk"); $siteNum="${%{$object}}{'name'}"; $domain="${%{$object}}{'domain'}"; $fqdn="${%{$object}}{'fqdn'}"; $vsitequota="${%{$vDiskobject}}{'quota'}"; $vsitequota*=1024; $vsitequotaExtra=$vsitequota; $vsitequotaExtra+=1024; $siteUID = `quota -g $siteNum | head -1 | awk -F \"gid \" '{print \$2}' | awk -F \"): \" '{print \$1}'` ; chomp($siteUID); $uid = $siteUID; $uqs = $vsitequota; $uqh = $vsitequotaExtra; unless(Quota::setqlim($dev, $uid, $uqs, $uqh, 0, 0)) { print "Quota set for $uid, $domain, $siteNum, QUOTA\: $vsitequota\n"; } print $fqdn." ".$siteUID." ".$siteNum." ".$vsitequota." ".$vsitequotaExtra."\n"; ### Find User account @userlist = $cce->findx('User', {"site" => "$siteNum"} ); foreach my $user (@userlist) { my ($userOK, $userOBJ, $userOLD, $userNEW) = $cce->get($user); my ($userDiskOK, $userDiskOBJ, $userDiskOLD, $userDiskNEW) = $cce->get($user, "Disk"); #print "${%{$userOBJ}}{name}"." (at mark) "."$domain\n"; $userNum="${%{$userOBJ}}{'name'}"; $userquota="${%{$userDiskOBJ}}{'quota'}"; $userquota*=1024; $userquotaExtra=$userquota; $userquotaExtra+=1024; $userUID = `quota $userNum | head -1 | awk -F \"uid \" '{print \$2}' | awk -F \"): \" '{print \$1}'` ; chomp($userUID); $uid = $userUID; $uqs = $userquota; $uqh = $userquotaExtra; unless(Quota::setqlim($dev, $uid, $uqs, $uqh, 0, 0)) { print "Quota set for $uid, $domain, $userNum, QUOTA\: $userquota\n"; } print $fqdn." ".$userUID." ".$userNum." ".$userquota." ".$userquotaExtra."\n"; } } $cce->bye('SUCCESS'); #exit(0); exit(1); } ### Find User account @userlist = $cce->findx('User', {"site" => "$siteNum"} ); foreach my $user (@userlist) { my ($userOK, $userOBJ, $userOLD, $userNEW) = $cce->get($user); my ($userDiskOK, $userDiskOBJ, $userDiskOLD, $userDiskNEW) = $cce->get($user, "Disk"); #print "${%{$userOBJ}}{name}"." (at mark) "."$domain\n"; $userNum="${%{$userOBJ}}{'name'}"; $userquota="${%{$userDiskOBJ}}{'quota'}"; $userquota*=1024; $userquotaExtra=$userquota; $userquotaExtra+=1024; $userUID = `quota $userNum | head -1 | awk -F \"uid \" '{print \$2}' | awk -F \"): \" '{print \$1}'` ; chomp($userUID); $uid = $userUID; $uqs = $userquota; $uqh = $userquotaExtra; unless(Quota::setqlim($dev, $uid, $uqs, $uqh, 0, 0)) { print "Quota set for $uid, $domain, $userNum, QUOTA\: $userquota\n"; } print $fqdn." ".$userUID." ".$userNum." ".$userquota." ".$userquotaExtra."\n"; } } $cce->bye('SUCCESS'); #exit(0); exit(1); } At 02:18 AM 4/21/2007, you wrote: >Rashid, > >Since quota's are not working correctly on your system, you might try this >Maybe do a "repquota -a" first and copy /home/aquota.user and >/home/aquota.group to /root for recovery > >[root@cbq ~]# /sbin/quotaoff -aug >[root@cbq ~]# /sbin/quotacheck -cmuga (m flag forces quotacheck) >[root@cbq ~]# /sbin/quotaon -aug > >now do another "repquota -a" and see if they are different > >Gerald >-----Original Message----- >From: MuntadaNet Webmaster [mailto:webmaster (at mark) muntada.com] >Sent: Thursday, April 19, 2007 8:36 AM >To: coba-e (at mark) bluequartz.org >Subject: [coba-e:09625] Re: Perl Dependencies > >This is patrick's utility. I was trying to figure out what >dependencies are failing because I am trying to fix the fact that >the quota aren't running correctly on the system. > >-Rashid > > >At 06:51 AM 4/19/2007, you wrote: >>Rashid, >> >>are you talking about BQ or RaQ? >> >>there is no meta-verify on BQ. >> >>as for dependencies - you will need to understand what packages >>exactly you need and then search for them at rpm repos, such as DAG, or yum. >> >>And please write in plain text - i suffer badly from html mails :) >> >>Thanks! >> >> >>Best, >> >>-- >>Arthur >> >> >> >>---------- >>From: MuntadaNet Webmaster [ mailto:webmaster (at mark) muntada.com] >>Sent: Thursday, April 19, 2007 6:49 AM >>To: coba-e (at mark) bluequartz.org >>Subject: [coba-e:09619] Perl Dependencies >>I am missing some Perl Dependencies. Does anyone have any idea of >>how I can fix this? Perhaps a yum command? >>Global symbol "@userlist" requires explicit package name at >>/usr/sbin/meta-verify line 229. >>Global symbol "$cce" requires explicit package name at >>/usr/sbin/meta-verify line 229. >>Global symbol "$siteNum" requires explicit package name at >>/usr/sbin/meta-verify line 229. >>Global symbol "@userlist" requires explicit package name at >>/usr/sbin/meta-verify line 231. >>Global symbol "$cce" requires explicit package name at >>/usr/sbin/meta-verify line 232. >>Global symbol "$cce" requires explicit package name at >>/usr/sbin/meta-verify line 233. >>Global symbol "$userNum" requires explicit package name at >>/usr/sbin/meta-verify line 235. >>Global symbol "$userquota" requires explicit package name at >>/usr/sbin/meta-verify line 236. >>Global symbol "$userquota" requires explicit package name at >>/usr/sbin/meta-verify line 237. >>Global symbol "$userquotaExtra" requires explicit package name at >>/usr/sbin/meta-verify line 238. >>Global symbol "$userquota" requires explicit package name at >>/usr/sbin/meta-verify line 238. >>Global symbol "$userquotaExtra" requires explicit package name at >>/usr/sbin/meta-verify line 239. >>Global symbol "$userNum" requires explicit package name at >>/usr/sbin/meta-verify line 242. >>Global symbol "$userquota" requires explicit package name at >>/usr/sbin/meta-verify line 245. >>Global symbol "$userquotaExtra" requires explicit package name at >>/usr/sbin/meta-verify line 246. >>Global symbol "$domain" requires explicit package name at >>/usr/sbin/meta-verify line 249. >>Global symbol "$userNum" requires explicit package name at >>/usr/sbin/meta-verify line 249. >>Global symbol "$userquota" requires explicit package name at >>/usr/sbin/meta-verify line 249. >>Global symbol "$fqdn" requires explicit package name at >>/usr/sbin/meta-verify line 251. >>Global symbol "$userNum" requires explicit package name at >>/usr/sbin/meta-verify line 251. >>Global symbol "$userquota" requires explicit package name at >>/usr/sbin/meta-verify line 251. >>Global symbol "$userquotaExtra" requires explicit package name at >>/usr/sbin/meta-verify line 251. >>Unmatched right curly bracket at /usr/sbin/meta-verify line 254, at >>end of line >>/usr/sbin/meta-verify has too many errors. >>-Rashid >>***************************************************************** >>MuntadaNet Web Hosting and Web Design Services >>http://www.muntada.com >> >>Sales - sales (at mark) muntada.com >>Support - support (at mark) muntada.com >>Billing - billing (at mark) muntada.com >>Main Office - 808-689-6092 >>Fax - (808) 356-0279 >>***************************************************************** >> >>***************************************************************** >>MuntadaNet Web Hosting and Web Design Services >>http://www.muntada.com >>Sales - sales (at mark) muntada.com >>Support - support (at mark) muntada.com >>Billing - billing (at mark) muntada.com >>Main Office - 808-689-6092 >>Fax - (808) 356-0279 >>***************************************************************** > >***************************************************************** >MuntadaNet Web Hosting and Web Design Services >http://www.muntada.com > >Sales - sales (at mark) muntada.com >Support - support (at mark) muntada.com >Billing - billing (at mark) muntada.com > >Main Office - 808-689-6092 >Fax - (808) 356-0279 >***************************************************************** >-- >This message has been scanned for viruses and >dangerous content by <http://www.mailscanner.info/>MailScanner, and is >believed to be clean. > > >-- >This message has been scanned for viruses and >dangerous content by <http://www.mailscanner.info/>MailScanner, and is >believed to be clean. ***************************************************************** MuntadaNet Web Hosting and Web Design Services http://www.muntada.com Sales - sales (at mark) muntada.com Support - support (at mark) muntada.com Billing - billing (at mark) muntada.com Main Office - 808-689-6092 Fax - (808) 356-0279 *****************************************************************9641_2.html (attatchment)(tag is disabled)