added memtest
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 29 Oct 2010 15:45:04 +0000 (15:45 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 29 Oct 2010 15:45:04 +0000 (15:45 +0000)
lib/PXElator/config.pm

index 4bf5816..5cf688a 100644 (file)
@@ -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;