if ($res->{RESP}->{RC} ne '0x0') {
print "Error setting ${property} to ${value}: ".$res->{RESP}->{RC}."\n";
+ undef;
} else {
- print "${property}: ${oldval} -> ${value}\n";
+ print "${property}: ${oldval} -> ${value}\n" if ($verbose);
+ $oldval;
}
}
if (@sprop) {
foreach my $p (@sprop) {
(my $pr, $v) = split(/=/,$p,2);
- setprop($pr, $v);
+ my $oldval = setprop($pr, $v);
+ if (defined($oldval)) {
+ print "${pr}: ${oldval} -> ${v}\n" if (!$verbose);
+ }
}
}
LAST_IP_ADDRESS LAST_NETMASK);
open (SAVEFILE, ">${save}") || die "Error opening save-file: $!\n";
+ print STDERR "saving" if (!$verbose);
foreach my $ts (@fw_vars) {
next if (grep(/^${ts}$/, @dontsave));
next if ($phash->{PERMS} ne 'RW');
print SAVEFILE "${ts}=".$phash->{VAL}."\n";
+ print STDERR "." if (!$verbose);
}
close(SAVEFILE);
+ print STDERR "done\n" if (!$verbose);
}
if ($load ne '') {
open (LOADFILE, "<${load}") || die "Error opening load-file: $!\n";
+ print STDERR "loading" if (!$verbose);
while(<LOADFILE>) {
chomp;
(my $p, my $v) = split(/=/, $_);
setprop($p, $v);
+ print STDERR "." if (!$verbose);
}
close(LOADFILE);
+ print STDERR "done\n" if (!$verbose);
print "Settings loaded, resetting board...\n";
my $reqstr='<?XML version="1.0"?><?RMCXML version="1.0"?><RMCSEQ><REQ CMD="boardreset"></REQ></RMCSEQ>';
_req($reqstr);