You are not logged in.

#1 2011-07-06 15:04:50

mtbrooks33
Member
Registered: 2011-06-08
Posts: 52

Idea: Refresh & Update at boot/login?

Would anyone happen to know if its possible to add <sudo pacman -Syy> and <sudo pacman -Syu> to the end of the /etc/rc.local file and have the system refresh and upgrade on boot? I don't see why there would be a problem with it, but I'm just wondering if anyone has attempted this yet and if it was a success / failure.

Thanks.

Offline

#2 2011-07-06 15:11:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Idea: Refresh & Update at boot/login?

Why not try it yourself?
Keep a liveCD at hand, just in case it will break something, so you can boot the liveCD and remove the offending lines.

I'd prefer to e.g. update daily via cron and use cronwhip or anacron to help with the missed cronjobs.

Offline

#3 2011-07-06 15:41:04

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Idea: Refresh & Update at boot/login?

Also, pacman -Syu is all you need, -Syy beforehard is unnecessary.

Offline

#4 2011-07-06 15:45:33

MrCode
Member
Registered: 2010-02-06
Posts: 373

Re: Idea: Refresh & Update at boot/login?

IMO this sort of thing would only be reliable if you had an established internet connection immediately during boot-up.  Those of us who are on laptops (with a wireless connection) might take a bit longer than the initial bootup to get online.  For me, it takes until just after I log into Xfce for my WNIC to finally authenticate and get an IP address from the router (problem, perhaps? hmm).

Last edited by MrCode (2011-07-06 15:45:48)

Offline

#5 2011-07-06 16:20:13

mtbrooks33
Member
Registered: 2011-06-08
Posts: 52

Re: Idea: Refresh & Update at boot/login?

MrCode wrote:

IMO this sort of thing would only be reliable if you had an established internet connection immediately during boot-up.  Those of us who are on laptops (with a wireless connection) might take a bit longer than the initial bootup to get online.  For me, it takes until just after I log into Xfce for my WNIC to finally authenticate and get an IP address from the router (problem, perhaps? hmm).

That's a very good point, i didn't think of that. Does anyone know of a way to check for an established internet connection before running those commands?

Offline

#6 2011-07-06 16:56:13

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Idea: Refresh & Update at boot/login?

ping.

Offline

#7 2011-07-06 20:52:50

erebetez
Member
Registered: 2011-06-06
Posts: 2

Re: Idea: Refresh & Update at boot/login?

To run pacman in a script without interaction, you can use the --noconfim option:

pacman --noconfirm -Suy

I once made a deamon/function that did this at shutdown.
http://pastebin.com/RyGdyRBD
Put the content in /etc/rc.d/autoupdate and autoupdate in the daemons array.

Not shure if thats the nice way:)

Offline

#8 2011-07-06 22:10:58

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: Idea: Refresh & Update at boot/login?

This has been discussed more than once , but this thread I found.
https://bbs.archlinux.org/viewtopic.php?id=83118
It is not a good idea, pacman output is designed for you to be informed and to take actions on it.

Offline

#9 2011-07-06 22:11:40

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Idea: Refresh & Update at boot/login?

I wouldn't do this just for the simple reason that I like to see if pacman tells me something important after updating certain packages so that I can make the necessary changes in the conf files and/or merge the pacnew files.

You are going to miss all that info and probably create threads for help when all you needed was merging of pacnew files. Over time, it could become difficult and tedious.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#10 2011-07-06 23:15:53

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Idea: Refresh & Update at boot/login?

Inxsible wrote:

I wouldn't do this just for the simple reason that I like to see if pacman tells me something important after updating certain packages so that I can make the necessary changes in the conf files and/or merge the pacnew files.

You are going to miss all that info and probably create threads for help when all you needed was merging of pacnew files. Over time, it could become difficult and tedious.

Agree. You could run 'sudo pacman -Syuw' instead.  That will refresh your db and download the new packages but won't install them.

Offline

#11 2011-07-07 17:45:00

erebetez
Member
Registered: 2011-06-06
Posts: 2

Re: Idea: Refresh & Update at boot/login?

You are of course right. I'am not even using this script myself.
Sorry, should have mentioned that...

Offline

Board footer

Powered by FluxBB