You are not logged in.

#1 2006-05-17 15:40:53

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

My brainwave! (or foolishness??)

I have an idea which can help out the lilo users out there. Like when arch installs(upgrades) a new kernel using pacman -Syu or pacman -S kernel[26/24], and if he is using lilo cant pacman automatically run /sbin/lilo anyway syu will be executed as root. So permissions are there.
This is just an idea that passed my mind after I read another article about a newbie ruining his system without running /sbin/lilo (Of Course this can be rectified but save us of the trouble.
Another reasonI would want this is my upgrade time. i upgrade when i sleep.
So when i waske up sleepy, i may forget /sbin/lilo
I would have put this in had I the wit or worth. I have none of these. I am just on the learning curve nad i am yet to start C pacman was written in!
P.S. Can I run this as a weekly cron job instead
add upgrade as the name an include

pacman -Syu --noconfirm --noprogressbar 
/sbin/lilo

[/code]


Be yourself, because you are all that you can be

Offline

#2 2006-05-17 15:52:49

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: My brainwave! (or foolishness??)

The only problem is - how can you tell that you're using lilo?   Just because you have lilo installed on your system doesn't mean that's the bootloader you're using (I had lilo for ages because it was in the base packages, but I'm a grub user) so you can't just check [ -x /sbin/lilo ].

Offline

#3 2006-05-17 16:01:59

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: My brainwave! (or foolishness??)

Cerebral wrote:

The only problem is - how can you tell that you're using lilo?   Just because you have lilo installed on your system doesn't mean that's the bootloader you're using (I had lilo for ages because it was in the base packages, but I'm a grub user) so you can't just check [ -x /sbin/lilo ].

is this of use cerebral??
http://www.webhostingtalk.com/archive/t … 647-1.html


Be yourself, because you are all that you can be

Offline

#4 2006-05-17 16:07:41

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: My brainwave! (or foolishness??)

if it directly doesnt work try the /sbin/grubby
If the script is no found or if reply is grub, it is grub not lilo.
Else it is lilo


Be yourself, because you are all that you can be

Offline

#5 2006-05-17 16:10:08

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: My brainwave! (or foolishness??)

Must everything be a poll?

[  ] Yes
[  ] No
[  ] Tacos


I am a gated community.

Offline

#6 2006-05-17 16:12:25

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: My brainwave! (or foolishness??)

this must because if it is yes, then this must be implemented democratically


Be yourself, because you are all that you can be

Offline

#7 2006-05-17 16:17:43

PJ
Member
From: Sweden
Registered: 2005-10-11
Posts: 602

Re: My brainwave! (or foolishness??)

I think it is better to make a script in /etc/rc.d/ . It could for an example be named lilo and be executed when the system is shutdown. To make it even better it could check where the kernels are placed (from /etc/lilo.conf) and check when they last were changed and compair it to a stored time. This time is supposed to be when the script last uppdated lilo. This means that the script will only update lilo if at least one kernel is uppdated.

Offline

#8 2006-05-17 16:49:25

raskolnikov
Member
From: France
Registered: 2006-01-08
Posts: 100

Re: My brainwave! (or foolishness??)

I don't care, as I compile kernels myself.
And pacman issues a reminder when installing a kernel, saying " don't forget to run lilo if you use it ".


Excessive showering, grooming, and toothbrushing is not only vain, it wastes valuable coding time.

Offline

#9 2006-05-17 16:51:12

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My brainwave! (or foolishness??)

this has been brought up before. I think I suggested a more generic "hooks" option, but its really not that necessary. Fact is you could write a script that greps pacman output for 'kernel26' and runs lilo if it is found.

Dusty

Offline

#10 2006-05-17 17:00:06

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: My brainwave! (or foolishness??)

ScriptDevil wrote:

this must because if it is yes, then this must be implemented democratically

Says who?

Offline

#11 2006-05-17 17:08:21

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: My brainwave! (or foolishness??)

you could always just write a script yourself that does this using yes | pacman -Syu; /bin/lilo.  I mean... It's really not worth lines of code in my opinion.

Offline

#12 2006-05-17 19:15:16

briancurtin
Member
From: Chicago, IL
Registered: 2006-02-11
Posts: 132
Website

Re: My brainwave! (or foolishness??)

stonecrest wrote:

Must everything be a poll?

[  ] Yes
[  ] No
[ X ] Tacos

Offline

#13 2006-05-17 19:49:57

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: My brainwave! (or foolishness??)

tacos!


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#14 2006-05-17 20:12:29

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: My brainwave! (or foolishness??)

I've deleted the poll, but further discussion should go on topic. Those who insist on discussing tacos are directed to one of the following:

http://bbs.archlinux.org/viewtopic.php?t=21548
http://www.tacotown.org/

Dusty

Offline

#15 2006-05-20 08:57:21

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: My brainwave! (or foolishness??)

Really, I thought polls were cool(I dont want people posting answers for the above line)
Still, i dont mind the poll being taken out.
In reply to raskolnikov
pacman does issue messages-> right.
But the messages get scrolled up the screen. Not many care to do a shift + PageUP.!
In reply to Dusty PJ, and especially codemac.
We can do everything by ourselves if we wanted to. Fine Arch maybe for advanced users, but isnt it a better option to include it in pacman, pacman will hardly be 1kb bigger( so it may be worth the lines of code). Startup scripts need not start network, we can do it ourselves. Even fsck(which happens one in abt 30 mounts unless u override it). Imagine the growth of pacman from about 1mb to about 2.9 mb now
Also it will be of better use to people who have come new to arch and who put their first pacman -Syu when they were sleep, woke up at 4am and in the dazed state put off their pc.
Never mind if this is going in the useless track. I thought myself that the idea maynot be welcome in the begining. thats why i put up such a title and a poll too!
I already have the rc.d script but it does the /sbin/lilo everyday. Its not going to hurt even if kernel wasnt updated!


Be yourself, because you are all that you can be

Offline

#16 2006-05-20 10:01:24

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,272

Re: My brainwave! (or foolishness??)

I think the need to re-run lilo after a kernel update is one of the things keeping people from using LiLo. (that and the syntax are my main reasons for NOT using LiLo).

How about we create a daemon for LiLo ?

It would work something like this :


We introduce a permanent flag , LiLo_kernel_version
Initial state : 0

Every time LiLo is run, it stores the current kernel version in this flag.


The daemon

On startup it should do nothing

On shutdown :

IF LiLo_kernel_version = 0
  THEN
          return  # LiLo isn't used, nothing to do
  ELSE
     IF LiLo_Kernel_version = current_kernel_version
        THEN
           return  # kernel hasn't changed, nothing to do
        ELSE
            # kernel HAS changed
            run LiLo
            return

--------------------

This daemon should be added to the ARCH LiLo package.

I am aware this is not a real daemon, but neither is the one ALSA uses.
For grub users this would add a small delay on startup/shutdown, for LiLo users this could be a lifesaver.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#17 2006-05-20 10:53:10

raskolnikov
Member
From: France
Registered: 2006-01-08
Posts: 100

Re: My brainwave! (or foolishness??)

Lone_Wolf wrote:

I think the need to re-run lilo after a kernel update is one of the things keeping people from using LiLo. (that and the syntax are my main reasons for NOT using LiLo).

Funny enough, that's the syntax of Grub that keep me from using it.

Your "daemon" script is not a bad idea, though wink

@ScriptDevil : right, but you can use the tee(1) command to duplicate the output of pacman to a file, and read it after upgrades. Of course it would be better if pacman do this itself in a logfile (say /var/log/updates.log)...


Excessive showering, grooming, and toothbrushing is not only vain, it wastes valuable coding time.

Offline

#18 2006-05-20 13:57:47

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: My brainwave! (or foolishness??)

I do not know about everyone else by I check what it's going to be upgraded before I press yes.
Having said that a simple solution for those using lilo is to concatenate commands. I mean, if you see that you have a kernel upgrade then use the command : pacman -Syu && lilo so when pacman exits the lilo command will be executed.

Hope this helps.

Offline

#19 2006-05-20 16:52:29

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: My brainwave! (or foolishness??)

well, i repeat the same thing. It is like this, add it in pacman or keep telling lilo users to run lilo at the end of messages
Like why cant all error and warning messages be published at the ende than at the middle


Be yourself, because you are all that you can be

Offline

#20 2006-05-20 17:15:58

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: My brainwave! (or foolishness??)

ScriptDevil, I can appreciate the 'value' of an automated process (grub like) but I see no harm in concatenating commands as a simple and fast solution.
The error message process needs no change (when you use concatenated commands) and yet you have a 'safe' way to upgrade kernel.

Offline

#21 2006-05-21 04:54:13

ihavenoname
Member
Registered: 2006-01-09
Posts: 198

Re: My brainwave! (or foolishness??)

Dusty wrote:

I've deleted the poll, but further discussion should go on topic. Those who insist on discussing tacos are directed to one of the following:

http://bbs.archlinux.org/viewtopic.php?t=21548
http://www.tacotown.org/

Dusty


HA! Funniest thing I've read all day!


In this land of the pain the sane lose not knowing they were part of the game.

~LP

Offline

Board footer

Powered by FluxBB