lilalo
diff lm @ 77:e56f21c44faf
Под root'ом приглашение красного цвета
author | devi |
---|---|
date | Mon Feb 13 19:28:51 2006 +0200 (2006-02-13) |
parents | f1ba68510fed |
children | db51b62442ac |
line diff
1.1 --- a/lm Thu Dec 22 08:30:38 2005 +0200 1.2 +++ b/lm Mon Feb 13 19:28:51 2006 +0200 1.3 @@ -68,6 +68,7 @@ 1.4 sub lm_do; 1.5 sub lm_report; 1.6 sub lm_show_hosts; 1.7 +sub lm_show_email; 1.8 sub lm_show_labs; 1.9 1.10 sub load_run; 1.11 @@ -119,6 +120,7 @@ 1.12 case "start" { lm_start } 1.13 case "stop" { lm_stop } 1.14 case "show hosts" { lm_show_hosts } 1.15 + case "show email" { lm_show_email } 1.16 case "show labs" { lm_show_labs } 1.17 case /do / { $arg =~ /do (.*)/; lm_do "$1" } 1.18 else { print_usage_info() } 1.19 @@ -173,6 +175,7 @@ 1.20 "name" => "$student->{firstname} $student->{surname}", 1.21 "firstname" => "$student->{firstname}", 1.22 "user" => "$student->{user}", 1.23 + "email" => "$student->{email}", 1.24 "student" => $student, 1.25 } 1.26 } 1.27 @@ -258,6 +261,18 @@ 1.28 } 1.29 } 1.30 1.31 +sub lm_show_email 1.32 +# Show hosts used to run a commands 1.33 +{ 1.34 + my $i=1; 1.35 + for my $m (sort keys %Machines) { 1.36 + if (!@SelectedMachines || grep /^$i$/, @SelectedMachines) { 1.37 + print $Machines{$m}->{"email"},"\t",$Machines{$m}->{"name"},"\n"; 1.38 + } 1.39 + $i++; 1.40 + } 1.41 +} 1.42 + 1.43 sub lm_show_labs 1.44 # Show hosts used to run a commands 1.45 {