From: Dobrica Pavlinusic Date: Fri, 29 Oct 2010 15:45:04 +0000 (+0000) Subject: added memtest X-Git-Url: http://git.rot13.org/?p=pxelator;a=commitdiff_plain;h=f4e5030ae50371907b7c5d5f5830ca6d481d8baf added memtest --- diff --git a/lib/PXElator/config.pm b/lib/PXElator/config.pm index 4bf5816..5cf688a 100644 --- a/lib/PXElator/config.pm +++ b/lib/PXElator/config.pm @@ -24,6 +24,7 @@ sub available { qw/ openvz printer wrt clonezilla ubuntu memdisk vyatta android systemrescue + memtest / }; sub debian_live { @@ -292,6 +293,23 @@ label systemrescue }); } +# http://www.memtest.org/ +sub memtest { + my $ip = shift; + + my $dir = "$server::base_dir/tftp/memtest"; + mkdir $dir unless -e $dir; + symlink '/boot/memtest86+.bin', "$dir/memtest.bin" unless -e "$dir/memtest.bin"; + + pxelinux::config_for_ip( $ip, qq{ + +default memtest +label memtest + linux memtest.bin + + }); +} + sub in_chroot { my ( $dir, $command ) = @_; write_file "$dir/tmp/inside.sh", $command;