added debirf rescue
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 4 Aug 2009 18:05:49 +0000 (18:05 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 4 Aug 2009 18:05:49 +0000 (18:05 +0000)
lib/PXElator/config.pm
lib/PXElator/t/config.t

index 3bcb53d..b7c72d5 100644 (file)
@@ -16,6 +16,14 @@ sub debian_live {
 
 use upstream;
 
+=head1 webconverger
+
+Webconverger - the opensource Web Kiosk
+
+L<http://webconverger.org/>
+
+=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<http://cmrg.fifthhorseman.net/wiki/debirf>
+
+=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";
 }
 
index 547596e..1c6bfe6 100755 (executable)
@@ -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' );