You are not logged in.

#1 2005-07-21 21:40:14

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,489

User script called by kernel updates via pacman?

http://bugs.archlinux.org/index.php?do=details&id=2985

I am tired of redoing my nvidia and ndiswrapper modules again and again. How do you think of adding a user script that is called by kernel updates via pacman - you could add your commands to the script, and would not have to do the kernel jobs by hand again.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#2 2005-07-21 21:53:19

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

Re: User script called by kernel updates via pacman?

I had proposed something similar to pacman.conf. Something like:

onUpdate=kernel26: /usr/bin/update-kernel-stuff.sh

would run the script in question. That would be more generic than having a special case for kernels.

Another simple option is to wrap pacman in a python/bash/ruby/YFSL script that parses to see if kernel26 was updated. That's something you can do without having to get a dev to edit pacman or agree on whether the feature is necessary.  (you know how everybody loves to script pacman :-D)

Dusty

Offline

#3 2005-07-22 17:45:18

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: User script called by kernel updates via pacman?

I fixed this little problem not too long ago using rc.local smile

see, the problem is that it doesn't matter when you INSTALL the new kernel -- you have to be running it. nvidia compiles itself for the kernel you are running. so the right time to install the nvidia driver is when you reboot.

lsmod | grep nvidia >/dev/null
if [[ $? -ne 0 ]] ; then
  pacman --noconfirm -S nvidia
fi

Offline

#4 2005-07-22 18:27:18

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: User script called by kernel updates via pacman?

great script paranos big_smile


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#5 2005-07-22 18:53:55

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

Re: User script called by kernel updates via pacman?

genius at work!

That little gem should go in the wiki, maybe under the nvidia page.

Dusty

Offline

#6 2005-07-22 19:15:13

deficite
Member
From: Augusta, GA
Registered: 2005-06-02
Posts: 693

Re: User script called by kernel updates via pacman?

Very very good idea indeed. It just shows that the best solutions are the simple ones.

Offline

#7 2005-07-23 08:24:33

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,489

Re: User script called by kernel updates via pacman?

Simple and convincing. I take a bow.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#8 2005-07-24 07:25:40

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: User script called by kernel updates via pacman?

big_smile I wasn't expecting such a positive reaction! I'll be sure to add it to the new wiki once migration is complete.

if we are going to go so far as to include this functionality into pacman, how should it work? here's my idea:

* each kernel module package is added to a group called kernelmod
* at the end of rc.sysinit:
    * if uname -r != /var/cache/pacman/kernelver, pacman -S <pacman -Qg kernelmod packages>
    * uname -r > /var/cache/pacman/kernelver (i can't find a better location for this file!)

Offline

Board footer

Powered by FluxBB