#!/usr/bin/perl use strict; my $HELIOSDIR; open (FD, "/etc/HELIOSInstallPath") || die "cannot find HELIOS product, check installation\n"; chop($HELIOSDIR = ); close(FD); chdir("$HELIOSDIR") || die "Can't cd into HELIOSDIR\n"; my @rebuildList = (); my @okList = (); open(FD, "bin/prefvalue -k Volumes -l |") || die "Can't open prefvalue."; print "Checking databases ... "; while( ) { chop; next if ("$_" eq "~"); $_ = "$HELIOSDIR/$_" if !(/^\//); # replace a relative path my $s = `bin/sqlite \"$_/.Desktop\" .schema`; if ($s =~ /paridname/) { push @okList, $_; } else { push @rebuildList, $_; } } close FD; print "done.\n\n"; if (scalar(@okList)) { print "The following desktop databases are ok (no rebuild needed):\n"; foreach(@okList) { print " \"$_\"\n"; } print "\n"; } if (scalar(@rebuildList)) { print "The following desktop databases must be updated via HELIOS Admin\n". "or using the rebuild calls below:\n"; foreach(@rebuildList) { print " $HELIOSDIR/sbin/rebuild -f \"$_\"\n"; } } exit 0