Petition to remove the check for updates on ssh login


(Lorne Gaetz) #1

https://issues.freepbx.org/browse/FREEPBX-21947

On the Distro, when you login via ssh, you get an immediate status screen indicating if there are pending updates. There is also a check for updates that happens in the background which takes a while to complete. The displayed text is the result of the previous check, not the one that is happening currently on login, so the displayed info is often stale. It can also take a while for the background check to complete, during which time yum is locked.

It seems like a good idea, but the implementation causes more confusion than is solves. I think it should be removed, but wanted to solicit opinions (particularly opposing opinions) before doing so.

Thoughts from the community?


#2

Wouldn’t improvement be a better way forward then removal?


(Lorne Gaetz) #3

That’s what this thread and the ticket are for. If you have suggestions, let’s hear them.


#4

Full minimalist: remove the big MOTD and replace it with a one-liner that says “Type ‘fwconsole motd’ for status.”

Semi-minimalist: remove the FreePBX ASCII art and the notifications/updates and just show the IP addresses.


(Dave Burgess) #5

Also, if you want to keep the yum status notification (which I pretty much ignore, so no “dog in hunt”) put an "as of {datetime} " on it so people can more easily see that the message may be stale.

In fact, transitioning this check from ‘ssh login’ to ‘every tuesday at midnight’ might not be a bad idea.


#6

No dog in this race either but many choices with

https://www.redhat.com/sysadmin/using-yum-cron

and sending the cron jobs output into /etc/motd perhaps ?


(TheJames) #7

people who don’t like it can put a exit at the top of /etc/profile.d/z001-updates.sh

This should probably be a cron rather than a login script.


(Lorne Gaetz) #8

If the information is more than 15 minutes stale, I’m of the opinion that it’s no good, and causes more confusion than it corrects. I don’t think running a cron 4 times an hour forever, is an efficient way to address this narrow use case, again my opinion. If an admin needs to see update status on login, they can run a command and wait for output that is current, otherwise they can go about their business and not think about it.


(TheJames) #9

I honestly don’t remember the conversation when this was added but I am sure there was one.
I feel this would have been discussed. Not positive but I am guessing this was something rob wrote.

When I open my terminal using zsh it will prompt me about updates every so often.

My next great idea would be to make it an “advanced setting” or a setting in moduleadmin where people can choose to run it or not. Then the debate (much simpler) becomes what is the default behavior.


#10

Are you being queried to update zsh or ohmyzsh ? Apt or yum will do the zsh updating stuff, ohmyzsh is more dynamic.


(Matt Brooks) #11

I’m all for this. I can’t tell you how many times I’ve had a busted install and I couldn’t login because a module was broken. It. also wrecks debug, but that’s another issue.


#12

Simple. Just give the user the option on a simple user configurable flag on any init file and then…
[[ $KEEPQUIET ]] || echo "The British are coming..."


#13

I agree that you should remove it. The information is readily available in the web interface. If I’m going to the command line, I’m busy with something more important.


#14

As for the stale info on pending updates, I’d like to see it either removed or timestamped (don’t care which). The stale info is mildly annoying.

As for automatically starting a check for updates on ssh login, DEFINITELY remove it. I don’t want/need this info every time I log in. When I do want it I’ll issue the appropriate command(s) myself.

@lgaetz: Glad you brought this up.


(TheJames) #15

can you keep a secret… they are already here…