Attention is currently required from: laforge.
fixeria has posted comments on this change by fixeria. (
https://gerrit.osmocom.org/c/libosmocore/+/40187?usp=email )
Change subject: vty: remove broken 'show startup-config' command
......................................................................
Patch Set 1:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/40187/comment/4bc1a658_0d812e58?… :
PS1, Line 9: Saving the current configuration by doing 'write file [FILE]' breaks
: the 'show startup-config' command. If write succeeds, this command
: will be showing contents of the new (potentially modified) file.
Ok, then I
misunderstood the purpose of this command. My [incorrect] understanding was that this
command is supposed to show the initial configuration that was effective when the process
started. This might be useful, for instance, to see difference from the current (running)
configuration.
https://gerrit.osmocom.org/c/libosmocore/+/40187/comment/92a19250_c367c263?… :
PS1, Line 12: If
Doesn't that mean that the write is then broken?
In the ticket I gave an example of writing the configuration to *another* file, which is
not the same as the one that the current process loaded. The problem occurs when you do
`write file some_file`: `show startup-config` will be showing contents of that new
`some_file` even if it's not the one that was given to the process via `-c` (and thus
will not be used if you restart the process).
Another problem occurs when you try writing to a location in which you don't have the
write permissions: the `write file /forbidden/some_file` fails, but yet alters the VTY
state, so `show startup-config` would be trying to `open()` that `/forbidden/some_file`
and obviously would fail.
Maybe we should change the `write file [PATH]` command to not alter the state, i.e. remove
invocation of `host_config_set()` in `config_write_file_cmd`. This would solve both
problems I described above. What do you think?
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/40187?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If0b4a79052c060cad963e6458b29000a979f95ba
Gerrit-Change-Number: 40187
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 02 May 2025 08:53:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>