-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor sysinfo #12
base: main
Are you sure you want to change the base?
Refactor sysinfo #12
Conversation
There is a lot that can go wrong if we ask for bind mounts, containers, etc. Stay concise. Also rearrange the output in columns so it is more compact.
@@ -55,7 +55,7 @@ sudo apt install ./dynamic-motd_*.deb | |||
You need to install some packages: | |||
|
|||
``` | |||
apt-get install figlet lsb-release python3-utmp bc | |||
apt-get install figlet lsb-release bc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findmnt
is in util-linux
, could you add it, please?
"--noheading", | ||
"--real", | ||
"--uniq", | ||
"--fstab", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With --fstab
, you won’t show disks mounted with systemd mount units.
To be honest, I don’t like displaying the IP address in the banner. You choose to display only one IP address into the many possibles (it may not suite all users) and And I prefer having multiple login showing, with their IP address and time, as:
We may have a config file to change the behavior of the script, like the |
Luc Didry ***@***.***> writes:
To be honest, I don’t like displaying the IP address in the banner. You choose
to display only one IP address into the many possibles (it may not suite all
users) and ip route list dev won’t work on IPv6-only machines.
And I prefer having multiple login showing, with their IP address and time, as:
• it allows me to know if I’m already logged
• it allows me to see all the IP addresses of those connections (better for
security)
• if a co-worker has an old session on the server, I can ask them if it’s on
purpose or if they can logout, allowing me, for ex., to reboot the server
We may have a config file to change the behavior of the script, like the
hushlogin file.
That is fair, give me some time to address it.
Concerning the findmnt command, I choose the '--fstab' flag because I
want to keep the output terse by eg, not displaying all bind mount that
can be generated by docker or other software.
I can also revise that and/or address it via configurations options.
|
Here we go :)
original message:
I am not sure all will interest you but I have passed a few hours to refactor the sysinfo python script for my own usage :