--- lib/PXElator/config.pm 2009/08/02 02:04:00 110 +++ lib/PXElator/config.pm 2009/08/03 20:53:46 129 @@ -4,6 +4,7 @@ use strict; use server; +use pxelinux; use File::Slurp; sub shared { @@ -18,10 +19,34 @@ return $value; } +sub debian_live { + $dhcpd::file = "pxelinux.0"; + $pxelinux::path_prefix = 'live-helper/tftpboot/'; + $pxelinux::config_file = 'pxelinux.cfg/default'; +} + +sub webconverger { + $dhcpd::file = "pxelinux.0"; + $pxelinux::path_prefix = 'webconverger/'; +# $pxelinux::config_file = 'default'; + + return; # FIXME + + my $cfg = "$tftp::dir/pxelinux.cfg"; + return if -e $cfg; + + warn "using iso"; +# system "mount -t 9660 | grep webc-5.2 || sudo mount /srv/pxelator/iso/webc-5.2.iso /srv/pxelator/tftp/webconverger/iso/ -o loop -t iso9660 -v"; + + symlink "/usr/lib/syslinux/pxelinux.0", "$tftp::dir/$dhcpd::file"; + +} + sub for_ip { my $ip = shift; - $tftp::dir = "$server::base_dir/tftp/live-helper/tftpboot"; - $dhcpd::file = "pxelinux.0"; +# debian_live(); + webconverger(); +# $tftp::dir = "$server::base_dir/tftp/$pxelinux::path_prefix"; } 1;