git.cweiske.de
/
linksys-wrt3g-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
another test
[linksys-wrt3g-tools.git]
/
scripts
/
linksys-wrt3g.php
diff --git
a/scripts/linksys-wrt3g.php
b/scripts/linksys-wrt3g.php
old mode 100644
(file)
new mode 100755
(executable)
index
1d1b9d2
..
520d6ba
--- a/
scripts/linksys-wrt3g.php
+++ b/
scripts/linksys-wrt3g.php
@@
-1,3
+1,4
@@
+#!/usr/bin/env php
<?php
/**
* Control script for Linksys WRT3g routers.
<?php
/**
* Control script for Linksys WRT3g routers.
@@
-90,7
+91,11
@@
try {
switch ($result->command_name) {
case 'reboot':
switch ($result->command_name) {
case 'reboot':
- $router->reboot();
+ $resp = $router->reboot();
+ echo $resp->getStatus() . ' ' . $resp->getReasonPhrase() . "\n";
+ if (intval($resp->getStatus() / 100) != 2) {
+ exit(3);
+ }
break;
case 'status':
break;
case 'status':