/[pxelator]/lib/PXElator/pxe.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/pxe.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 60 by dpavlin, Thu Jul 30 15:23:29 2009 UTC revision 63 by dpavlin, Thu Jul 30 16:16:18 2009 UTC
# Line 20  $url = "http://$server::ip/pxelator/"; Line 20  $url = "http://$server::ip/pxelator/";
20    
21  my $squash = tftpd::path('debian-live/*squashfs');  my $squash = tftpd::path('debian-live/*squashfs');
22    
23  my $config = "$tftpd::dir/pxelinux.cfg";  sub config_for_ip {
 mkdir $config unless -d $config;  
 $config .= '/default';  
24    
25  write_file $config, qq{          my $ip = shift;
26            $ip = uc sprintf "%02x%02x%02x%02x", split /\./,$ip;
27    
28  default linux          my $config = "$tftpd::dir/pxelinux.cfg";
29  label linux          mkdir $config unless -d $config;
30          kernel $url/debian-live/vmlinuz1          $config .= '/' . $ip;
         append initrd=$url/debian-live/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=$url/$squash  
31    
32  };          write_file $config, qq{
33    
34  warn "config $config ", -s $config;          default linux
35            label linux
36                    kernel $url/debian-live/vmlinuz1
37                    append initrd=$url/debian-live/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=$url/$squash
38    
39            };
40    
41            warn "config $config ", -s $config;
42    
43    }
44    
45  warn "loaded";  warn "loaded";
46    

Legend:
Removed from v.60  
changed lines
  Added in v.63

  ViewVC Help
Powered by ViewVC 1.1.26