implement Debian live and fix tests
[pxelator] / lib / PXElator / config.pm
index 1af44be..294a8a4 100644 (file)
@@ -12,9 +12,25 @@ use File::Slurp;
 sub available { qw/debian_live webconverger debirf tinycore/ };
 
 sub debian_live {
-       $dhcpd::file = "pxelinux.0";
-       $pxelinux::path_prefix = 'live-helper/tftpboot/';
-       $pxelinux::config_file = 'pxelinux.cfg/default';
+       my ($ip) = @_;
+
+       upstream::files( qw{
+               http://cdimage.debian.org/cdimage/release/current-live/i386/web/
+               vmlinuz1
+               initrd1.img
+               debian-live-501-i386-standard.squashfs
+       });
+
+       my $hostname = client::conf( $ip => 'hostname' ) || 'debian-live';
+
+       pxelinux::config_for_ip( $ip, qq{
+
+default debian_live
+label debian_live
+       kernel vmlinuz1
+       append initrd=initrd1.img fetch=http://${server::ip}:7777/debian-live/debian-live-501-i386-standard.squashfs boot=live nopersistent hostname=$hostname union=aufs
+       });
+
 }
 
 use upstream;
@@ -40,7 +56,7 @@ sub webconverger {
 default webconverger
 label webconverger
        kernel iso/live/vmlinuz-2.6.30-backports.1-486
-       append initrd=iso/live/initrd.img-2.6.30-backports.1-486 fetch=http://${server::ip}:7777/webconverger/iso/live/filesystem.squashfs boot=live quiet nosudo splash video=vesa:ywrap,mtrr vga=788 nopersistent username=webc hostname=$hostname union=aufs homepage=$homepage
+       append initrd=iso/live/initrd.img-2.6.30-backports.1-486 fetch=http://${server::ip}:7777/webconverger/iso/live/filesystem.squashfs boot=live quiet nosudo splash video=vesa:ywrap,mtrr vga=788 nopersistent username=webc hostname=$hostname union=aufs homepage=$homepage locale=hr
 
        });