From: Dobrica Pavlinusic Date: Fri, 17 Sep 2010 22:00:49 +0000 (+0000) Subject: workround for init=/bin/bash only on upstream images X-Git-Url: http://git.rot13.org/?p=pxelator;a=commitdiff_plain;h=c216734413f301a60d36a7eaf02a5e4205fe26b4 workround for init=/bin/bash only on upstream images if we remastered squashfs, using bin/squashfs-overlay.sh then this isn't problem so we don't insert init --- diff --git a/lib/PXElator/config.pm b/lib/PXElator/config.pm index 0fa0ea3..ce56653 100644 --- a/lib/PXElator/config.pm +++ b/lib/PXElator/config.pm @@ -44,14 +44,20 @@ sub debian_live { my $hostname = client::conf( $ip => 'hostname' ) || 'debian-live'; - # FIXME drop in shell because we can't create user + # FIXME drop in shell because users doesn't work in current image + my $custom_init = 'init=/bin/hash'; + + if ( my $custom_squashfs = client::conf( $ip => 'squashfs' ) ) { + $squashfs = $custom_squashfs; + $custom_init = ''; + } pxelinux::config_for_ip( $ip, qq{ default debian_live label debian_live 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 + append initrd=$initrd fetch=http://$server_ip:7777/debian_live/$squashfs boot=live nopersistent hostname=$hostname union=aufs noprompt autologin username=user debug $custom_init }); }