--- lib/PXElator/config.pm 2009/08/29 17:03:35 347 +++ lib/PXElator/config.pm 2009/08/29 18:07:49 348 @@ -8,12 +8,13 @@ use pxelinux; use client; use file; +use ssh; use File::Slurp; our $mounted; -sub available { qw/debian_live webconverger debirf tinycore nfsroot openvz_host openvz_ve printer wrt/ }; +sub available { qw/debian_live webconverger debirf tinycore nfsroot openvz_host openvz_container printer wrt/ }; sub debian_live { my ($ip) = @_; @@ -183,15 +184,21 @@ }); } -sub openvz_host {} -sub openvz_ve {} +sub openvz_host { + my $ip = shift; + ssh::shell( $ip, 'cat /proc/vz/veinfo', 'vzlist -a', 'uptime', 'free', 'df' ); +} +sub openvz_container { + my $ip = shift; + ssh::shell( $ip, 'cat /proc/vz/veinfo', 'uptime', 'free', 'df' ); +} sub printer {} sub wrt {} sub for_ip { my $ip = shift || return; - my $deploy = client::conf( $ip => 'deploy' ) || return; - eval $deploy . '($ip)'; + my $config = client::conf( $ip => 'config' ) || return; + eval $config . '($ip)'; # $tftp::dir = "$server::base_dir/tftp/$pxelinux::path_prefix"; }