Neil wrote:
>Is it possible to use multiple unattended.txt files?
All you need to do is $u->read("another_unattend.txt"); in the config.pl
file,
That will do the modification to the $u object.
How you get the options from tftp is another problem,
I think you would have to add an export to the mastor script, but I've
not done it that way, so maybe someone else has?.

I do it by reading a file for the pc that has all the settings,
something like (see below) this in the config.pl.
Sorry but it is realy messy code!
But I can see the advantage of having the PC config coming from dhcp.




    my $pc = pcname();
    if ($pc) {
        my $pcsettings = "/z/site/users/$pc" or croak "can not chdir
$!";
        if (-e "$pcsettings"){
                $u->read("$pcsettings");
                print "reading usersettings $pc\n";
        }else{
        print "No user settings! for $pcsettings\n";
        };

    };
# pcname   looks in the users.txt file for the hardweare address
# and the pc that is linked to it, the should be a file like
my_pc_name=macaddress for each pc.
sub pcname {
my $hardwareadd = $u->{'_meta'}->{'macaddr'};
    unless ($hardwareadd =~ m/[a-fA-F0-9]{12}/){
       $u->{'UserData'}->{'ComputerName'} =
           sub {
               my $name = simple_q ("Please Enter computer name :\n");
               return $name;
           };
    };
    my @users = read_file ('z:\\site\\users.txt');
    for $user (@users){
        if ($user =~ m/(^.*)=($hardwareadd)/i){
           my $pc = $1;
           print "PC is $pc\n";
           return $pc;
        };

    };

    return;
}

Thanks
Max


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Neil
Robst
Sent: Thursday, 29 April, 2004 2:18 PM
To: [EMAIL PROTECTED]
Subject: [Unattended] Multiple unattend.txt files?






Hi,

Is it possible to use multiple unattended.txt files? I mean, I want to
be able to build two different types of Windows servers from the same OS
repository (e.g. os/win2k/i386/...) and just specify different
unattended.txt (ideally on the tftp boot like as another z_ parameter?).

Thanks,
Neil



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.

Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
unattended-info mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to