#!/usr/bin/perl

system("/bin/mkdir -p /dev/ncap");
system("/bin/rm -f /dev/ncap/eth*");

if(open(IN, "/proc/devices")) {
  while(<IN>) {
    if($_ =~ /eth/) {
      chop;
      ($id, $name) = split(/ /, $_);
      #print "'$id' - '$name'\n";
      system("/bin/mknod /dev/ncap/$name c $id 0"); 
    }
  }
  close(IN);
}
