23 |
# |
# |
24 |
proc reboot_via_x10 { dest } { |
proc reboot_via_x10 { dest } { |
25 |
if [board_info $dest exists name] { |
if [board_info $dest exists name] { |
26 |
set dest [board_info $dest name]; |
set dest [board_info $dest name] |
27 |
} |
} |
28 |
|
|
29 |
if [board_info $dest exists x10] { |
if [board_info $dest exists x10] { |
30 |
set x10 [board_info $dest x10]; |
set x10 [board_info $dest x10] |
31 |
verbose "rebooting x10 unit $x10" 1 |
verbose "rebooting x10 unit $x10" 1 |
32 |
rsh_exec rtl "/usr/unsupported/bin/x10-hellcab unit $x10 off" |
rsh_exec rtl "/usr/unsupported/bin/x10-hellcab unit $x10 off" |
33 |
sleep 2 |
sleep 2 |
34 |
rsh_exec rtl "/usr/unsupported/bin/x10-hellcab unit $x10 on" |
rsh_exec rtl "/usr/unsupported/bin/x10-hellcab unit $x10 on" |
35 |
sleep 2 |
sleep 2 |
36 |
return 1; |
return 1 |
37 |
} |
} |
38 |
return 0; |
return 0 |
39 |
} |
} |
40 |
|
|
41 |
proc ${board}_reboot { args } { |
proc ${board}_reboot { args } { |
42 |
if { [llength $args] > 0} { |
if { [llength $args] > 0} { |
43 |
set dest [lindex $args 0]; |
set dest [lindex $args 0] |
44 |
} else { |
} else { |
45 |
set dest target; |
set dest target |
46 |
} |
} |
47 |
return [reboot_via_x10 $dest]; |
return [reboot_via_x10 $dest] |
48 |
} |
} |