[SOLVED] rc.modules looks to need a little attention.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes, that's the idea. In fact, after a bit more thinking, there's no reason the rc.modules file couldn't also source an rc.modules-$(uname -r) file if one exists. That keeps things somewhat similar to how they currently are; in fact, I think I'll modify it just a bit for that...
EDIT - new rc.modules.sample is:
Code:
#!/bin/sh
# Update module dependencies and load extra (not autoloaded) modules
# Determine the version of the running kernel:
RELEASE=$(uname -r)
if [ -e "/lib/modules/$RELEASE/modules.dep" ]; then
echo "Updating module dependency list for $RELEASE:"
/sbin/depmod --quick
else
echo "Creating module dependency list for $RELEASE:"
/sbin/depmod --all
fi
# Load any rc.modules-$(uname -r) file that exists
# This is used if you have specific modules which should only be loaded
# for specific kernel versions
if [ -x "/etc/rc.d/rc.modules-$(uname -r)" ]; then
/etc/rc.d/rc.modules-$(uname -r)
fi
# Almost all necessary modules are automatically loaded when needed,
# but there are a few exceptions. Here's a (not all-inclusive) list,
# so uncomment any of the below entries or add others as needed:
#/sbin/modprobe tun # Universal TUN/TAP device driver
#/sbin/modprobe sg # Generic SCSI support for SATA DVD-RW
Last edited by rworkman; 11-21-2015 at 06:34 PM.
Reason: new rc.modules.sample
Ahh, that's not quite what I thought you meant. What I was expecting was something along the lines of a /etc/rc.d/rc.modules:
Code:
#!/bin/sh
# /etc/rc.d/rc.modules
########################################################################
# Update module dependencies:
# Determine the version of the running kernel:
RELEASE=$(uname -r)
if [ -e "/lib/modules/$RELEASE/modules.dep" ]; then
echo "Updating module dependency list for $RELEASE:"
/sbin/depmod --quick
else
echo "Creating module dependency list for $RELEASE:"
/sbin/depmod --all
fi
########################################################################
# Run local or kernel version specific files if they exist:
if [ -r "/etc/rc.d/rc.modules.local" ]; then
. /etc/rc.d/rc.modules.local
elif [ -r "/etc/rc.d/rc.modules.$RELEASE" ]; then
. /etc/rc.d/rc.modules.$RELEASE
fi
########################################################################
... and then a /etc/rc.d/rc.modules.local:
Code:
# /etc/rc.d/rc.modules.local ##########################################
########################################################################
# Manual loading of kernel modules:
#
# Most kernel modules will be loaded on-demand directly by the kernel
# or by udev as needed, but there are a few exceptions that may
# require manual loading. Additionally, it is sometimes desirable to
# pre-load a module rather than waiting for the on-demand loading to
# trigger.
#
# Such modules may be loaded via '/sbin/modprobe' here:
# Here's a (not all-inclusive) list:
#/sbin/modprobe tun # Universal TUN/TAP device driver
#/sbin/modprobe sg # Generic SCSI support for SATA DVD-RW
########################################################################
... that would be left for the local admin to create.
Either way, fixing the depmod was my main concern.
I like that too, and I had edited the note to Pat to reflect such (but didn't change it here). I've since made that a bit more explicit in my note to him, so we'll see what happens :-)
The new scripts look terrific. Little things like this often go unnoticed but they really help to clean up the system and bring Slackware even more in line with its own KISS philosophy. Good work, guys!
I am adapting the polyglot version of the scripts shipped in pkgtools to cope with the changes made to *pkg and pkgtools and that needs much attention not to miss anything.
I see a lot of enhancements and simplifications, of which the ChangeLog only gives a light idea so congrats to all who contributed and tested
PS makepkg was updated from version 3.14159 to 3.14141593. Just wondering: when will we reach 3,14159265358979323846?
Last edited by Didier Spaier; 12-16-2015 at 11:49 AM.
Reason: PS added.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.