#!/usr/bin/perl -w # Save this script as "rename-old-icons.pl" # then log in as 'root', change to the EtherShare volume root directory # and call this script. # # Note: # - This script cannot run when users are connected to the volume # - This script calls 'rebuild' which may take some time on large volumes use strict; use File::Find; use Cwd; my $heliosdir=""; open (FD, "/etc/HELIOSInstallPath") || die "cannot find HELIOS product, check installation\n"; chop($heliosdir = ); close(FD); my $lookUpName = "Icon^0d"; my $newName = "Icon\r"; my $currVol = cwd; die "Volume is in use. Disconnect all clients and try again.\n" if -f ".DeskServer"; find(\&wanted, $currVol); sub wanted { if ($_ eq $lookUpName) { print "Rename $File::Find::name\n"; rename($lookUpName, $newName); } } print "Starting rebuild...\n"; system("$heliosdir/sbin/rebuild", "-f", "$currVol"); exit 0;