/[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

Contents of /lib/PXElator/pxe.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (show annotations)
Wed Jul 29 22:25:42 2009 UTC (12 years, 4 months ago) by dpavlin
File size: 724 byte(s)
fix booting, added tftp transport for kernel and initrd

1 package pxe;
2
3 use warnings;
4 use strict;
5 use autodie;
6
7 use File::Slurp;
8
9 use server;
10 use tftpd;
11
12 our $file = 'gpxelinux.0';
13 my $path = "$tftpd::dir/$file";
14 symlink '/usr/lib/syslinux/gpxelinux.0', $path unless -l $path;
15 warn "file $path ", -s $path;
16
17 my $url = "http://$server::ip/pxelator/";
18 $url = "tftp://$server::ip/"; # fallback to tftp
19
20 my $squash = tftpd::path('debian-live/*squashfs');
21
22 my $config = "$tftpd::dir/pxelinux.cfg/default";
23
24 write_file $config, qq{
25
26 default linux
27 label linux
28 kernel $url/debian-live/vmlinuz1
29 append initrd=$url/debian-live/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=http://$server::ip/pxelator/$squash
30
31 };
32
33 warn "config $config ", -s $config;
34
35 warn "loaded";
36
37 1;

  ViewVC Help
Powered by ViewVC 1.1.26