/[pxelator]/lib/PXElator/config.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/config.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 538 by dpavlin, Fri Sep 17 22:00:49 2010 UTC revision 546 by dpavlin, Sat Oct 9 15:28:42 2010 UTC
# Line 18  our $mounted; Line 18  our $mounted;
18  our $server;  our $server;
19  our $server_ip;  our $server_ip;
20    
21  sub available { qw/katalog debian_live webconverger debirf tinycore nfsroot openvz printer wrt clonezilla ubuntu memdisk vyatta android/ };  sub available { qw/
22            katalog debian_live webconverger
23            debirf tinycore nfsroot
24            openvz printer wrt
25            clonezilla ubuntu memdisk vyatta android
26            systemrescue
27    / };
28    
29  sub debian_live {  sub debian_live {
30          my ($ip) = @_;          my ($ip) = @_;
# Line 70  L<http://webconverger.org/> Line 76  L<http://webconverger.org/>
76    
77  =cut  =cut
78    
79    sub _glob_first {
80            my ( $dir, $path ) = @_;
81            my @glob = glob "$dir/$path";
82            my $first = $glob[0] || die "no $dir/$path";
83            $dir   =~ s{iso/*$}{};
84            $first =~ s{^\Q$dir\E}{}g;
85            return $first;
86    }
87    
88  sub webconverger {  sub webconverger {
89          my ($ip) = @_;          my ($ip) = @_;
90    
91          $mounted->{"webconverger/$ip"} ||= upstream::iso( 'http://download.webconverger.com/webc-5.5.iso' );          $mounted->{"webconverger/$ip"} ||= upstream::iso( 'http://download.webconverger.com/webc-6.2.iso' );
92    
93          my $hostname = client::conf( $ip => 'hostname' ) || 'webconverger';          my $hostname = client::conf( $ip => 'hostname' ) || 'webconverger';
94    
# Line 82  sub webconverger { Line 97  sub webconverger {
97          my $fetch    = client::conf( $ip => 'webconverger/fetch'          my $fetch    = client::conf( $ip => 'webconverger/fetch'
98                  , default => "http://$server_ip:7777/webconverger/iso/live/filesystem.squashfs" );                  , default => "http://$server_ip:7777/webconverger/iso/live/filesystem.squashfs" );
99    
100            my $mnt = "$server::base_dir/tftp/webconverger/iso";
101            warn "# mnt: $mnt\n";
102            my $kernel = _glob_first $mnt => 'live/vmlinuz*';
103            my $initrd = _glob_first $mnt => 'live/initrd.img*';
104    
105          pxelinux::config_for_ip( $ip, qq{          pxelinux::config_for_ip( $ip, qq{
106    
107  default webconverger  default webconverger
108  label webconverger  label webconverger
109          kernel iso/live/vmlinuz-2.6.30-backports.1-486          kernel $kernel
110          append initrd=iso/live/initrd.img-2.6.30-backports.1-486 fetch=$fetch boot=live quiet nosudo splash video=vesa:ywrap,mtrr vga=788 nopersistent username=webc hostname=$hostname union=aufs homepage=$homepage locale=hr noprompt kioskresetstation=10          append initrd=$initrd fetch=$fetch boot=live quiet nosudo splash video=vesa:ywrap,mtrr vga=788 nopersistent username=webc hostname=$hostname union=aufs homepage=$homepage locale=hr noprompt kioskresetstation=10
111    
112          });          });
113    
# Line 249  label android-1.6-donut Line 269  label android-1.6-donut
269    
270          });          });
271  }  }
272    
273    
274    # http://www.sysresccd.org/Sysresccd-manual-en_PXE_network_booting
275    sub systemrescue {
276            my $ip = shift;
277            my $path = upstream::iso( 'http://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/1.6.1/systemrescuecd-x86-1.6.1.iso/download' );
278    
279            my $dir = "$server::base_dir/tftp/systemrescue";
280            symlink '/usr/lib/syslinux/memdisk', "$dir/memdisk" unless -e "$dir/memdisk";
281    
282            client::conf $ip => 'kvm.boot' => "n -cdrom $path";
283    
284            pxelinux::config_for_ip( $ip, qq{
285    
286    default systemrescue
287    label systemrescue
288    
289            kernel iso/isolinux/rescuecd
290            append initrd=iso/isolinux/initram.igz dodhcp netboot=http://$server::ip:7777/systemrescue/iso/sysrcd.dat
291    
292            });
293    }
294    
295  sub in_chroot {  sub in_chroot {
296          my ( $dir, $command ) = @_;          my ( $dir, $command ) = @_;

Legend:
Removed from v.538  
changed lines
  Added in v.546

  ViewVC Help
Powered by ViewVC 1.1.26