I encountered the same problem... There is a mismatch between the code in install.pl and config.pl (using unattended 3.5).
--- Snippet from install.pl --- if (-e $site_conf) { my $result = do $site_conf; $@ and die "do $site_conf failed: $@"; defined $result or die "Could not do $site_conf: $^E"; } --- End Snippet --- The script will die if $result is not defined. But in the original example config.pl code, it explicitly returns an undefined value (depending on which OS is chosen). This only matters on the very last code block (ProductID in the example config.pl). If you add a bogus return line at the end of the script (after the fine "};"), such as: return 'foo'; The script should run correctly with no ill effects. Someone with more perl experience might have a better explanation/solution. I'm just beginning to learn... Chris -----Original Message----- From: Max Lovius <[EMAIL PROTECTED]> RE: Problems with site/config.pl 2004-01-27 05:27 It would be helpful if you say. What version of unattended are you using? What is line 933 in install.pl To me it looks like something else than your script that is causing the problem. my config looks something like this seems to work fine, I use install.pl 1.97 with some modifcations: It looks on that version more like a diskformatting problem. Looking again at your script why do you have the two lines below, try with out these two lines, I don't think you realy want them Unless you realy know what you are doing (I don't): my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'}); my $os_name = $media_obj->name (); MY config.pl $u->{'UserData'}->{'ProductID'} = sub { my $src = $u->{'_meta'}->{'OS_media'}; if ($src =~ /Windows 2000/i) { return 'PRODUCT KEY'; } elsif ($src =~ /Windows XP/i) { return 'PRODUCT KEY'; } else { die "Unrecognized OS source directory $src"; } }; Thanks Max -----Original Message----- From: pommerer [mailto:[EMAIL PROTECTED] Sent: Tuesday, 27 January, 2004 1:52 PM To: [EMAIL PROTECTED] Subject: [Unattended] Problems with site/config.pl Hi, On the Advanced Configuration (web)page there is an example, "Assigning product key based on OS type". I copied the code exactly as it appears on the page, replaced the "MY-WINDOWS-XP-KEY" ,"MY-WINDOWS-2000-KEY" and "MY-SERVER-2003-KEY" entries to contain my serial numbers: ---------------------------------------------------------------------------- -------- use warnings; use strict; $u->{'UserData'}->{'ProductKey'} = sub { my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'}); my $os_name = $media_obj->name (); if ($os_name =~ /Windows XP/) { return 'MY-WINDOWS-XP-KEY'; } elsif ($os_name =~ /Windows Server 2003/) { return 'MY-SERVER-2003-KEY'; } return undef; }; $u->{'UserData'}->{'ProductID'} = sub { my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'}); my $os_name = $media_obj->name (); if ($os_name =~ /Windows 2000/) { return 'MY-WINDOWS-2000-KEY'; } elsif (defined $u->{'UserData'}->{'ProductKey'}) { # It is OK for us to return undef as long as there is a # ProductKey. return undef; } die "No ProductKey nor ProductID!"; }; ---------------------------------------------------------------------------- -------- The program works as expected for Windows 2000, but not for WINXP and WIN2003. When I select WINXP or WIN2003, the script stops with the error: could not do z:\site\config.pl: Function not implemented (ENOSYS) at z:\dosbin\install.pl line 933 I played a little with the code: e.g.: ---------------------------------------------------------------------------- -------- use warnings; use strict; $u->{'UserData'}->{'ProductKey'} = sub { my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'}); my $os_name = $media_obj->name (); if ($os_name =~ /Windows XP/) { return 'MY-WINDOWS-XP-KEY'; } elsif ($os_name =~ /Windows Server 2003/) { return 'MY-SERVER-2003-KEY'; } return undef; }; ---------------------------------------------------------------------------- -------- The program works as expected for WINXP and WIN2003 but not for WIN2000. When I select WIN2000, the script stops with the error: could not do z:\site\config.pl: Function not implemented (ENOSYS) at z:\dosbin\install.pl line 933 ---------------------------------------------------------------------------- -------- any Ideas? Regards Werner ---------------------------------------------------------- Werner Pommerer email: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] Rechenzentrum Universität Hohenheim Schloß Westhof Süd Telefon: +49 (0711) 459 2837 70593 Stuttgart Fax: +49 (0711) 459 3449 ---------------------------------------------------------- ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ unattended-info mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unattended-info