Project

General

Profile

Actions

Feature #12675

closed

Move command line history to a GUI option stored in ``config.xml`` rather than a manual flag file

Added by Steve Wheeler 4 months ago. Updated 11 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Configuration Backend
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default

Description

Currently the CLI history is retained if the file .keephistory is present.

It would be nice if that option was retained as a config setting so that it is restored with that after a re-install.

Actions #1

Updated by Viktor Gurov 4 months ago

Maybe it's better to add an option to the WebGUI?

Actions #2

Updated by Steve Wheeler 4 months ago

Sure that would be even better.

Actions #3

Updated by Jim Pingle 4 months ago

It would need to be on the per-user settings since the file would need to be synchronized to each separate user account with shell privileges.

Actions #5

Updated by Jim Pingle 4 months ago

  • Status changed from New to Pull Request Review
  • Target version changed from CE-Next to 2.7.0
  • Plus Target Version changed from Plus-Next to 22.05
Actions #6

Updated by Jim Pingle 4 months ago

  • Assignee set to Viktor Gurov
Actions #7

Updated by Viktor Gurov 3 months ago

  • Status changed from Pull Request Review to Feedback
  • % Done changed from 0 to 100
Actions #8

Updated by Jim Pingle 2 months ago

  • Status changed from Feedback to New

The MR implemented the config setting/backend part but not the GUI option. And now if the user touches the file manually it gets cleared at the next boot, so there is no way to retain the setting from the GUI.

Additionally, even with the value set in the user it doesn't appear to work. The ~/.keephistory file is not present in /root/ when the admin user has the option in its config.xml section.

Actions #9

Updated by Jim Pingle 2 months ago

  • Status changed from New to In Progress
  • Assignee changed from Viktor Gurov to Jim Pingle
Actions #10

Updated by Jim Pingle 2 months ago

  • Status changed from In Progress to Feedback

I merged a fix for the option check and also added a GUI option when editing the user. Will be in snapshots soon.

Actions #11

Updated by Viktor Gurov 2 months ago

Jim Pingle wrote in #note-10:

I merged a fix for the option check and also added a GUI option when editing the user. Will be in snapshots soon.

commit: https://github.com/pfsense/pfsense/commit/98ecfb9f840bf561ce204d0cca4ec88486e1ea33

works as expected

Actions #12

Updated by Viktor Gurov 2 months ago

  • Status changed from Feedback to New

Jim Pingle wrote in #note-8:

nd now if the user touches the file manually it gets cleared at the next boot, so there is no way to retain the setting from the GUI.

fix:
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/678

Actions #13

Updated by Jim Pingle about 2 months ago

  • Status changed from New to In Progress

Taking another look at this, there is no need to use the flag file at all now. It can be read directly from the config. I'm going to commit a change to handle it that way. It's worked fine in testing so far.

Actions #14

Updated by Jim Pingle about 2 months ago

  • Status changed from In Progress to Feedback
Actions #15

Updated by Jim Pingle about 2 months ago

  • Subject changed from Keep command line history as a config option to Move command line history to a GUI option stored in ``config.xml`` rather than a manual flag file

Updating subject for release notes.

Actions #16

Updated by Jim Pingle 11 days ago

  • Status changed from Feedback to Resolved

This is working very well. Option is active after config restore, it's only in the config, no more flag file. All OK.

Actions

Also available in: Atom PDF