upgrade debian live to current squeeze alpha2
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 17 Sep 2010 20:57:11 +0000 (20:57 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 17 Sep 2010 20:57:11 +0000 (20:57 +0000)
this is fragile, and drops us into root propt to add user manually since it seems
that live-webhelper is broken at the moment and doesn't create user or autologin
on standard image

to continue booting use

exec /sbin/init 2

after chaning root password!

lib/PXElator/config.pm

index af35fba..0fa0ea3 100644 (file)
@@ -9,6 +9,7 @@ use pxelinux;
 use client;
 use file;
 use ssh;
+use upstream;
 
 use File::Slurp;
 
@@ -22,27 +23,39 @@ sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot open
 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