# | Line 170 | Line 170 | sub send_udp_packet() { | |
---|---|---|
170 | ||
171 | my($hostname) = hostname(); | |
172 | $hostname =~ s/\..*$//g; | |
173 | < | my($domainname) = `cat /etc/resolv.conf`; |
174 | < | $domainname =~ /domain\s+([^\s]+)/; |
175 | < | $domainname = $1; |
173 | > | `cat /etc/resolv.conf` =~ /domain\s+([^\s]+)/; |
174 | > | my($domainname) = $1; |
175 | my($machine_name) = "$hostname.$domainname"; | |
176 | my($ip) = inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost'); | |
177 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |