Feature #15079
closedRemove spaces from filenames generated by status.php
0%
Description
This eases filename expansion on the command line, and simplifies iterating over the files with commands or scripts. It also makes the filenames consistent. For instance current version has:
status_cmd_define("DHCP-IPv4 Configuration", '/usr/bin/sed "s/\([[:blank:]]secret \).*/\1<redacted>/" /var/dhcpd/etc/dhcpd.conf'); status_cmd_define("DHCP-IPv6-Configuration", '/usr/bin/sed "s/\([[:blank:]]secret \).*/\1<redacted>/" /var/dhcpd/etc/dhcpdv6.conf');
This requires one edit to /usr/local/pfSense/include/www/status_output.inc:
- $descr .= "-Last {$number} entries"; + $descr .= "-Last-{$number}-entries";
I have attached the updated status.php from master, as well as a diff. So it should be ready to go. Tested on 23.09.1-RELEASE.
Files
Updated by Jim Pingle over 1 year ago
- Status changed from New to Rejected
I don't see the value in this. Properly quoting filenames or escaping spaces is trivial in this day and age, and changing to dashes makes the filenames more difficult to read for humans, who are the intended audience for the status output files. You have the exact same issues with tab expansion with/without spaces as any other character.
Updated by Craig Coonrad over 1 year ago
Every file in the status output has one or more dashes except one: Config History.txt. This change makes that consistent across the filename. If the objecive is human readability then all those dashes should be removed.