.frr_history file not empty

Noticed that in the root home dir, the .history_frr file contains command history which I assume was being performed prior to preparing the rolling iso.

configure terminal
ip route 0.0.0.0/0 wg0 table 100
configure terminal
ip route 0.0.0.0/0 Null0 table 100 255
configure terminal
ip route 0.0.0.0/0 wg1 table 110
configure terminal
ip route 0.0.0.0/0 Null0 table 110 255
sh run
configure terminal
ip route 192.168.0.0/16 Null0
configure terminal
ip route 172.16.0.0/12 Null0
configure terminal
ip route 0.0.0.0/0 172.31.255.5
configure terminal
ip route 10.0.0.0/8 Null0

Not a huge thing, but might be worth your build scripts delete such files or their contents.

I tried in the lab, I could not find the file.
May I know in which version, are you seeing the file ?

Every rolling version, under /root.

edit - Of course checking the latest rolling doesn’t have the file. However I wasn’t imagining it’s existence, and the contents of the file as above are nothing to do with anything I have configured. Downloading a few other rolling ISOs and expanding the squashfs also reveals nothing in /root. Very strange.

Maybe some config process at some point ends up creating that file?

Seems something creates this. File got created today at 10:14 CET. See output below. Just interested in what this is and why it gets created.

phillipmcmahon@myrouter:~$  sudo -s
vbash-4.1#  cd
vbash-4.1#  ls -al
total 22
drwx------ 1 root root 4096 Nov 30 17:23 .
drwxr-xr-x 1 root root 4096 Dec  1 10:13 ..
-rw------- 1 root root  168 Dec  1 16:21 .bash_history
-rw-r--r-- 1 root root  599 Nov 30 03:23 .bashrc
drwx------ 3 root root 4096 Nov 30 17:23 .config
-rw------- 1 root root  856 Dec  1 10:14 .history_frr
-rw-r--r-- 1 root root  148 Aug 17  2015 .profile
vbash-4.1#   cat .history_frr
configure terminal
ip route 0.0.0.0/0 wg0 table 100
configure terminal
ip route 0.0.0.0/0 Null0 table 100 255
configure terminal
ip route 0.0.0.0/0 wg1 table 110
configure terminal
ip route 0.0.0.0/0 Null0 table 110 255
sh run
configure terminal
ip route 192.168.0.0/16 Null0
configure terminal
ip route 172.16.0.0/12 Null0
configure terminal
ip route 0.0.0.0/0 172.31.255.5
configure terminal
ip route 10.0.0.0/8 Null0
configure terminal
ip route 0.0.0.0/0 wg0 table 100
configure terminal
ip route 0.0.0.0/0 Null0 table 100 255
configure terminal
ip route 0.0.0.0/0 wg1 table 110
configure terminal
ip route 0.0.0.0/0 Null0 table 110 255
sh run
configure terminal
ip route 192.168.0.0/16 Null0
configure terminal
ip route 172.16.0.0/12 Null0
configure terminal
ip route 0.0.0.0/0 172.31.255.5
configure terminal
ip route 10.0.0.0/8 Null0
vbash-4.1#

Thank you for the detailed information.

In a fresh set up, the file .history_frr does not exit. As you configure/execute any commands related to frr, the file gets created automatically. Likewise .bash_history also gets created with the commands executed.

vyos@vyos:~$ date
Thu Dec  3 14:01:14 UTC 2020
vyos@vyos:~$ pwd
    /home/vyos
    vyos@vyos:~$ ls -al
    total 24
    drwxr-xr-x 3 vyos users 4096 Dec  3 13:56 .
    drwxr-xr-x 1 root root  4096 Dec  3 13:56 ..
    -rw-r--r-- 1 vyos users  220 Nov  5  2016 .bash_logout
    -rw-r--r-- 1 vyos users 3999 Apr 12  2020 .bashrc
    -rw-r--r-- 1 vyos users  675 Apr 12  2020 .profile
    drwxr-x--- 2 vyos users 4096 Dec  3 13:56 .ssh

I created config related to wireguard, so after that it created the file:

vyos@vyos:~$ ls -al
total 32
drwxr-xr-x 3 vyos users     4096 Dec  3 14:05 .
drwxr-xr-x 1 root root      4096 Dec  3 13:56 ..
-rw------- 1 vyos users      765 Dec  3 14:05 .bash_history
-rw-r--r-- 1 vyos users      220 Nov  5  2016 .bash_logout
-rw-r--r-- 1 vyos users     3999 Apr 12  2020 .bashrc
-rw------- 1 vyos vyattacfg   53 Dec  3 14:05 .history_frr
-rw-r--r-- 1 vyos users      675 Apr 12  2020 .profile
drwxr-x--- 2 vyos users     4096 Dec  3 13:56 .ssh
vyos@vyos:~$ cat .history_frr
configure terminal
ip route 10.1.0.0/24 wg01
sh run

It seems to be a feature of vtysh to create the history_frr file.

The confusing part is I don’t run as root and I don’t run specific FRR config. The history file is not being created in my standard user profile but only under root.

It isn’t an issue, it is more out of curiosity to understand what is happening here.