#!/usr/bin/perl

my $targetVol = $ARGV[2];

if (-e "$targetVol/private/etc/X11")
{
   my $suffix = "AppleBackup";
   my $count = 2;

   while (-e "$targetVol/private/etc/X11.$suffix")
   {
      $suffix = "AppleBackup$count";
      $count++;
   }

   `/bin/mv -f "$targetVol/private/etc/X11" "$targetVol/private/etc/X11.$suffix"`;
}
