Hi,
i'm using this snippet to get the hostname from the ip-adress.
works like a charm.
# File to hold site-specific customizations.
# Enable maximum warnings and disallow sloppy constructs.
use warnings;
use strict;
use IO::Socket;
use Net::hostent;
#
# PUT YOUR CHANGES HERE
#
# Get Hostname by IP-Address
$u->{'UserData'}->{'ComputerName'} =
sub {
my $addr = $u->{'_meta'}->{'ipaddr'};
defined $addr
or return undef;
my $host = gethostbyaddr (inet_aton ($addr));
if (!defined $host) {
warn "Unable to gethostbyaddr ($addr): $? $^E\n";
return undef;
}
my $name = $host->name ();
# Strip off domain portion
$name =~ s/\.(.*)//;
# Convert to uppercase
$name =~ tr/a-z/A-Z/;
return $name;
};
# Make this file evaluate to "true".
1;
but not with the dosboot, which i need for vmware.
this happens:
do z:\site\config.pl failed: Can't locate SelectSaver.pm in @INC icn
contains Z:\lib /dev/env/DJDIR/lib/perl5
/dev/env/DJDIR/lib/perl5/site /dev/env/DJDIR/lib/perl5/site
/dev/env/DJDIR/lib/perl5/site
at /dev/env/DJDIR/lib/perl5/IO/Handle.pm line 255
Compilation aborted....
any clues?
thanks.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
unattended-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-devel