[Sidewinder] Perl question and possible bug in 7.0.0.04

Sidewinder moderated discussion list sidewinder at adeptech.com
Thu Dec 24 11:06:29 EST 2009


Greeting all,

I am writing a script that will allow us to baseline over 170 
Sidewinders as needed. Everything in the script works except for the 
last part of the following code snippett:

sub Create_Resolv_Conf_Files {
    print "Creating New Resolve Conf Files...\n";
    print "     Tarring Up Old Files to /home/swadmin...";
    system ("cd /etc");
    system ("tar -cvf /home/$user/resolvfiles.tar /etc/resolv.*");
  system ("cd");
  print "Completed\n";
  print "     Creating Files...";
  for ($count = 0; $count <=$burbnum; $count++)
      {
        open (RESOLVFILE, ">resolv.conf.$count") || die "Can't open 
file: $!";
        print "$count...";
      print RESOLVFILE "nameserver 127.$count.0.1\n";
        close (RESOLVFILE);
        }
    print "\n";
  open (RESOLVFILE, ">resolv.conf") || die "Can't open file: $!";
  print RESOLVFILE "nameserver 127.0.0.1\n";
        if ($SiteGuide{$SiteName}->{'NOSCid'} == 4) {
            print RESOLVFILE "domain sanitize\n";
      }
          about 20 other else ifs
        }
  close (RESOLVFILE);
    system ("chtype \$Sys:conf resolv.conf.0");
    system ("chtype \$Sys:conf resolv.conf.dflt");
}


As you can see it creates the resolv.conf.x files for the Sidewinder for 
all of the burbs on that particular unit...it does it quite well even on 
the largest ones we have. BUT the last two lines are the problem.....

I cannot get it to execute the following two lines:

    system ("chtype \$Sys:conf resolv.conf.0");
    system ("chtype \$Sys:conf resolv.conf.dflt");

However, with that said, if I chtype DNS1:conf {or any other TE in the 
command} it works fine. and if I just put in the chtype command at the 
command prompt it works fine. There should not be any reason that this 
doesn't work. When this executes there is nothing in the logs, no TE 
errors, etc. The sidewinders have the script on them run when they are 
at 7.0.0.04.

Any thoughts would be appreciated.




More information about the Sidewinder mailing list