Actions
Bug #5101
closedexec.php - Last line of shell execute output repeated
Description
When using exec.php to run a shell command, the last line of the output is repeated.
Example #1:
Example #2:
Updated by Anonymous about 9 years ago
- Status changed from Confirmed to Feedback
- Assignee changed from Anonymous to Jim Pingle
system() replaced with exec().
system() emits the output to STDOUT, but that is trapped
by PHP when running system. PHP then prints the output of the command
when using the "system" function call and returns the last line (which the
OP then echoes).
Updated by Anonymous about 9 years ago
- % Done changed from 0 to 100
Applied in changeset pfsense:6aef15f8cfa409d19e421bf2858667ca5de5026b.
Updated by Jim Pingle about 9 years ago
- Status changed from Feedback to Confirmed
- Assignee changed from Jim Pingle to Anonymous
Interesting. On 2.2.x it is using popen rather than either system or exec. Wonder why that was changed away from popen.
There is still an extra blank line at the end of the output, looks like it's a bunch of indentation before the closing pre tag.
Updated by Anonymous about 9 years ago
- Status changed from Confirmed to Feedback
- Assignee changed from Anonymous to Jim Pingle
Removed new line/space before closing
Updated by Jim Pingle about 9 years ago
- Status changed from Feedback to Resolved
Looks good now, thanks!
Actions