version 1.20, 2006/09/12 03:20:39 |
version 1.23, 2007/01/08 22:16:29 |
|
|
package Net::Telnet::Trango; |
package Net::Telnet::Trango; |
# $RedRiver: Trango.pm,v 1.19 2006/09/12 02:16:43 andrew Exp $ |
# $RedRiver: Trango.pm,v 1.21 2006/10/05 17:10:39 andrew Exp $ |
use strict; |
use strict; |
use warnings; |
use warnings; |
use base 'Net::Telnet'; |
use base 'Net::Telnet'; |
|
|
eth_link => { String => 'eth link', expect => $success }, |
eth_link => { String => 'eth link', expect => $success }, |
su_info => { String => 'su info', decode => 'all', expect => $success }, |
su_info => { String => 'su info', decode => 'all', expect => $success }, |
save_ss => { String => 'save ss', expect => $success }, |
save_ss => { String => 'save ss', expect => $success }, |
|
opmode => { decode => 'all', expect => $success }, |
# eth r, w and reset??? |
# eth r, w and reset??? |
#su password??? |
#su password??? |
#_bootloader |
#_bootloader |
|
|
|
|
=item su_password |
=item su_password |
|
|
C<su_password('all'|suid, 'new_password')> |
C<su_password('new_password'[, 'suid'])> If no suid is specified, |
|
the default is "all". |
|
|
=cut |
=cut |
|
|
sub su_password |
sub su_password |
{ |
{ |
my $self = shift; |
my $self = shift; |
my $su = shift || '!'; |
|
my $new_pass = shift || ''; |
my $new_pass = shift || ''; |
|
my $su = shift || 'all'; |
unless (defined $su) { |
|
warn "No su passed!" |
|
#return undef; |
|
} |
|
|
|
unless (defined $new_pass) { |
unless (defined $new_pass) { |
warn "No new password!" |
warn "No new password!" |