Revision 19a12e06
Added by Renato Botelho about 10 years ago
etc/inc/system.inc | ||
---|---|---|
1457 | 1457 |
} |
1458 | 1458 |
|
1459 | 1459 |
/* Configure the serial port for raw IO and set the speed */ |
1460 |
`stty -f {$serialport}.init raw speed {$gpsbaud}`
|
|
1460 |
mwexec("stty -f {$serialport}.init raw speed {$gpsbaud}");
|
|
1461 | 1461 |
|
1462 | 1462 |
/* Send the following to the GPS port to initialize the GPS */ |
1463 | 1463 |
if (is_array($config['ntpd']) && is_array($config['ntpd']['gps']) && !empty($config['ntpd']['gps']['type'])) { |
... | ... | |
1468 | 1468 |
|
1469 | 1469 |
/* XXX: Why not file_put_contents to the device */ |
1470 | 1470 |
@file_put_contents('/tmp/gps.init', $gps_init); |
1471 |
`cat /tmp/gps.init > $serialport`;
|
|
1471 |
mwexec("cat /tmp/gps.init > {$serialport}");
|
|
1472 | 1472 |
|
1473 | 1473 |
/* Add /etc/remote entry in case we need to read from the GPS with tip */ |
1474 | 1474 |
if (intval(`grep -c '^gps0' /etc/remote`) == 0) { |
Also available in: Unified diff
Replae backtickes by mwexec()