mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
system: configurable hostname (device identity)
Add a device hostname settable from the CLI (`hostname <text>`) and the System Settings page. The value is sanitized on ingest to JSON-safe printable ASCII (<=23 chars), stored in a shared __xdata buffer, seeded to "RTLPlayground" at boot, persisted through the startup-config, and reported in /information.json. It lives in the common header so other modules can advertise it (LLDP uses it as the System Name TLV).
This commit is contained in:
1 parent
481c02c740
commit
f21b3a32bd
8 files changed
+47
No files matched your search
@@ -25,6 +25,7 @@ const conf_cmds = [
|
||||
/^igmp\s+(on|off)$/,
|
||||
/^mtu\s+\d{1,2}\s+\d+$/,
|
||||
/^bw\s+(in|out)\s+\d{1,2}\s+\S+$/,
|
||||
/^hostname\s+.{1,23}$/,
|
||||
];
|
||||
const conf_overwrite = [
|
||||
/^ip\b/,
|
||||
@@ -49,6 +50,7 @@ const conf_overwrite = [
|
||||
/^igmp\b/,
|
||||
/^mtu\s+\d{1,2}\b/,
|
||||
/^bw\s+(in|out)\s+\d{1,2}\b/,
|
||||
/^hostname\b/,
|
||||
];
|
||||
|
||||
function parseConf(s){
|
||||
|
||||
Reference in new issue
Block a user