use client;
use file;
use ssh;
+use upstream;
use File::Slurp;
sub debian_live {
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 $from = 'http://cdimage.debian.org/cdimage/release/current-live/i386/web/';
+ $from = 'http://cdimage.debian.org/cdimage/squeeze_live_alpha2/i386/web/';
+ my $variant = 'standard';
+
+ my $dir = upstream::files $from => 'MD5SUMS';
+
+ my ( $vmlinuz, $initrd, $squashfs );
+
+ my @md5sum = read_file "$dir/MD5SUMS";
+
+ foreach ( @md5sum ) {
+ $vmlinuz = $1 if m/\s+(\S*vmlinuz\S*)/;
+ $initrd = $1 if m/\s+(\S*$variant\S*initrd\S*)/;
+ $squashfs = $1 if m/\s+(\S*$variant\S*\.squashfs)$/;
+ warn "# MD5SUM: $_\n";
+ }
+
+ upstream::files $from => $vmlinuz, $initrd, $squashfs;
my $hostname = client::conf( $ip => 'hostname' ) || 'debian-live';
+ # FIXME drop in shell because we can't create user
+
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 noprompt
+ kernel $vmlinuz
+ append initrd=$initrd fetch=http://$server_ip:7777/debian_live/$squashfs boot=live nopersistent hostname=$hostname union=aufs noprompt autologin username=user debug init=/bin/bash
});
}
-use upstream;
-
=head1 webconverger
Webconverger - the opensource Web Kiosk