Problem with Perceus dhcpd import script

After a couple days of banging my head against the wall trying to figure out why the import script kept giving this cryptic error, we finally submitted a question to the Perceus mailing list.

Undefined subroutine &main::add_node called at ./ line 46,  line 8.

I’m sure if I knew Perl that error wouldn’t have been so confusing.

Here’s a diff for anyone who’s interested.

<    if ( $_ =~ /^s*hosts+([^s]+)s*{s*$/ ) {
>    if ( $_ =~ /^s*hosts+([^s]+)s*{?s*$/ ) {
<       &add_node($1, $hostname);
> print "Adding: $1, $hostnamen";
>       &node_add($1, $hostname);

Leave a Reply

Your email address will not be published. Required fields are marked *