1 |
wellsi |
1.1 |
diff -ruN e-smith-base-5.6.0.old/root/sbin/e-smith/console e-smith-base-5.6.0/root/sbin/e-smith/console |
2 |
|
|
--- e-smith-base-5.6.0.old/root/sbin/e-smith/console 2008-10-07 10:34:53.000000000 -0700 |
3 |
|
|
+++ e-smith-base-5.6.0/root/sbin/e-smith/console 2014-04-05 10:48:42.000000000 -0700 |
4 |
|
|
@@ -1,4 +1,4 @@ |
5 |
|
|
-#!/usr/bin/perl -w |
6 |
|
|
+#!/usr/bin/perl -wT |
7 |
|
|
|
8 |
|
|
#---------------------------------------------------------------------- |
9 |
|
|
# copyright (C) 1999-2006 Mitel Corporation |
10 |
|
|
@@ -36,28 +36,28 @@ |
11 |
|
|
|
12 |
|
|
$ENV{TERM} = $termType if($termType); |
13 |
|
|
|
14 |
|
|
-system("/bin/sh", "/etc/profile.d/lang.sh"); |
15 |
|
|
+system '/bin/sh', '/etc/profile.d/lang.sh'; |
16 |
|
|
|
17 |
|
|
my %menu2object = (); |
18 |
|
|
my @args = (); |
19 |
|
|
my @items = (); |
20 |
|
|
|
21 |
|
|
-my $menu_dir = "/sbin/e-smith/console-menu-items"; |
22 |
|
|
+my $menu_dir = '/sbin/e-smith/console-menu-items'; |
23 |
|
|
|
24 |
|
|
-opendir(ITEMS, $menu_dir); |
25 |
|
|
+opendir ITEMS, $menu_dir; |
26 |
|
|
|
27 |
|
|
-while (defined(my $item = readdir(ITEMS))) |
28 |
|
|
+while (defined (my $item = readdir ITEMS )) |
29 |
|
|
{ |
30 |
|
|
next unless -f "$menu_dir/$item"; |
31 |
|
|
|
32 |
|
|
if ($item =~ /([\w\.]+)/) |
33 |
|
|
{ |
34 |
|
|
- $item = $1; |
35 |
|
|
+ $item = $1; |
36 |
|
|
} |
37 |
|
|
else |
38 |
|
|
{ |
39 |
|
|
- warn "Don't know what to do with $menu_dir/$item\n"; |
40 |
|
|
- next; |
41 |
|
|
+ warn "Don't know what to do with $menu_dir/$item\n"; |
42 |
|
|
+ next; |
43 |
|
|
} |
44 |
|
|
|
45 |
|
|
my $obj = require "$menu_dir/$item"; |
46 |
|
|
@@ -73,9 +73,9 @@ |
47 |
|
|
{ |
48 |
|
|
next if ($item->order < 0); |
49 |
|
|
push @args, $number . '.', gettext($item->name); |
50 |
|
|
- $menu2object{$number++ . "."} = $item; |
51 |
|
|
+ $menu2object{$number++ . '.'} = $item; |
52 |
|
|
} |
53 |
|
|
- |
54 |
|
|
+ |
55 |
|
|
my $quit = esmith::console::quitConsole->new; |
56 |
|
|
while (1) |
57 |
|
|
{ |
58 |
|
|
@@ -85,21 +85,21 @@ |
59 |
|
|
|
60 |
|
|
$db->reload; |
61 |
|
|
|
62 |
|
|
- my $title = gettext("Server console"); |
63 |
|
|
- $title .= " (${SystemName}.${DomainName})"; |
64 |
|
|
+ my $title = gettext('Server console'); |
65 |
|
|
+ $title .= " (${SystemName}.${DomainName}) "; |
66 |
|
|
|
67 |
|
|
- $title .= " " . gettext("** unsaved changes **") |
68 |
|
|
+ $title .= gettext('** unsaved changes **') |
69 |
|
|
if ( $db->get_value('UnsavedChanges') eq 'yes' ); |
70 |
|
|
|
71 |
|
|
my ($rc, $choice) = $console->menu_page |
72 |
|
|
( |
73 |
|
|
title => $title, |
74 |
|
|
text => |
75 |
|
|
- gettext("Welcome to the server console!") . |
76 |
|
|
+ gettext('Welcome to the server console!') . |
77 |
|
|
"\n\n" . |
78 |
|
|
- gettext("Use the Arrow and Tab keys to make your selection, then press Enter."), |
79 |
|
|
+ gettext('Use the Arrow and Tab keys to make your selection, then press Enter.'), |
80 |
|
|
argsref => \@args, |
81 |
|
|
- left => gettext("Exit"), |
82 |
|
|
+ left => gettext('Exit'), |
83 |
|
|
); |
84 |
|
|
|
85 |
|
|
$choice = ($rc == 0) ? $menu2object{$choice} : $quit; |