##-- Read the configfile into the hash %fromconf --##
sub read_conf {
        open (CONFFILE,$conffile);
        while (<CONFFILE>) {
                chomp;
                #-- Removeing any whitespaces --#
                $_ =~ s/ =/=/g;
                $_ =~ s/= /=/g;
                #-- Splitting at the = so left side is key and right side the value --#
                if ($_ =~ /^([^\#]+)=(.*)$/) {
                        $fromconf{$1} = $2;
                }
                  if (opendir (CISCOCHECK,"/proc/driver/aironet/".$fromconf{interface})) {  
                        $fromconf{cisco} = "yes";
                  }
                  else {
                        $fromconf{cisco} = 'no';
                  }
                  close(CISCOCHECK);
        }
        close (CONFFILE);
}

