On Thu, 01 Sep 2005 21:48:50 +0200, Holly Bostick wrote:

> Or... since you know (sometimes) which of such packages need to be
> re-emerged, and you also know when you have upgraded your kernel, you
> *could* just write a (one line) script to re-emerge the relevant
> packages, throw it in /usr/sbin or whatever (optional), and run
> it after you upgraded a kernel.
> 
> I've been meaning to do that for some time now, since it's much easier
> to maintain (you only have to add any new packages the first time you
> emerge them, then you're free to forget what you want :) ).

Some packages only compile against the running kernel, others use
the /usr/src/linux symlink to decide. So I have a few lines
in /etc/conf.d/local.start to take care of such re-emerges when I reboot
with a new kernel.


# Re-emerge NVidia drivers after a kernel compile
lsmod | grep --quiet nvidia || grep --quiet softlevel /proc/cmdline || \
        (FEATURES="-distcc -buildpkg -sandbox" emerge --oneshot nvidia-kernel 
&& modprobe -v nvidia && /etc/init.d/xdm stop zap start)

# Rebuild VMware modules if needed
lsmod | grep --quiet vmnet || grep --quiet softlevel /proc/cmdline || 
/opt/vmware/bin/vmware-config.pl default

# Re-emerge fuse
lsmod | grep --quiet fuse || FEATURES="-distcc -buildpkg" emerge --oneshot 
sys-fs/fuse && modprobe -v fuse

#Re-emerge wlan-ng
if [ ! -f /lib/modules/$(uname -r)/linux-wlan-ng/prism2_usb.ko ] ; then
        if rc-status -nc | grep -q net\.eth0.*started && ethtool eth0 | grep -q 
'Link detected: yes' ; then
                FEATURES="-distcc -buildpkg" emerge --oneshot linux-wlan-ng
                fi
        fi


-- 
Neil Bothwick

Southern DOS: Y'all reckon? (Yep/Nope)

Attachment: pgpgx2zZ1HlRr.pgp
Description: PGP signature

Reply via email to