From 716400001b673ba41dee11652ee669fc5363dfcf Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 4 Aug 2009 18:05:49 +0000 Subject: [PATCH] added debirf rescue --- lib/PXElator/config.pm | 34 +++++++++++++++++++++++++++++++++- lib/PXElator/t/config.t | 9 ++++++--- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/lib/PXElator/config.pm b/lib/PXElator/config.pm index 3bcb53d..b7c72d5 100644 --- a/lib/PXElator/config.pm +++ b/lib/PXElator/config.pm @@ -16,6 +16,14 @@ sub debian_live { use upstream; +=head1 webconverger + +Webconverger - the opensource Web Kiosk + +L + +=cut + sub webconverger { my $ip = shift; @@ -32,10 +40,34 @@ label webconverger } +=head1 debirf + +debirf is a system that will create diskless, all-in-ram images (kernel and initramfs) that boot entirely into ram and leave the user in a fully functional Debian system. + +L + +=cut + +sub debirf { + my $ip = shift; + + upstream::iso( 'http://cmrg.mayfirst.org/debirf/debirf-rescue_lenny_2.6.26-1-686.iso' ); + + pxelinux::config_for_ip( $ip, qq{ + +default linux +label linux + kernel iso/vmlinuz-2.6.26-1-686 + append initrd=iso//debirf-rescue_lenny_2.6.26-1-686.cgz + + }); +} + sub for_ip { my $ip = shift; # debian_live(); - webconverger($ip); +# webconverger($ip); + debirf($ip); # $tftp::dir = "$server::base_dir/tftp/$pxelinux::path_prefix"; } diff --git a/lib/PXElator/t/config.t b/lib/PXElator/t/config.t index 547596e..1c6bfe6 100755 --- a/lib/PXElator/t/config.t +++ b/lib/PXElator/t/config.t @@ -4,11 +4,14 @@ use warnings; use strict; use autodie; -use Test::More tests => 2; +use Test::More tests => 3; use Data::Dump qw/dump/; use_ok 'config'; -sub test { config::webconverger( '172.0.0.1' ) }; +sub test { + my $name = shift; + eval 'config::' . $name . '( "172.0.0.1" );'; +} -ok( test(), 'webconverger' ); +ok( test($_), $_ ) foreach ( 'webconverger', 'debirf' ); -- 2.20.1