LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-21-2015, 06:30 PM   #31
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351

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
 
2 members found this post helpful.
Old 11-21-2015, 06:59 PM   #32
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Original Poster
Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
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.

Last edited by GazL; 11-21-2015 at 07:04 PM.
 
Old 11-21-2015, 09:31 PM   #33
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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 :-)
 
1 members found this post helpful.
Old 12-16-2015, 06:54 AM   #34
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Original Poster
Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
Now in current.
I'll mark this one as solved.

Robby, and Patrick, thank you.
 
3 members found this post helpful.
Old 12-16-2015, 11:21 AM   #35
Poprocks
Member
 
Registered: Sep 2003
Location: Toronto, Canada
Distribution: Slackware
Posts: 522

Rep: Reputation: 279Reputation: 279Reputation: 279
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!
 
Old 12-16-2015, 11:41 AM   #36
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled
Quote:
Originally Posted by Poprocks View Post
... Little things like this often go unnoticed...
Not by everyone.

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.
 
Old 12-16-2015, 05:50 PM   #37
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,776

Rep: Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425
Wouldn't that be easy as pi?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Attention to Guild..... Sparks_ITCS Linux - Wireless Networking 8 02-16-2005 08:05 PM
How Can I Get Rolledoats Attention? benm89 General 3 12-12-2003 04:14 PM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration