LinuxQuestions.org
Help answer threads with 0 replies.
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-06-2013, 03:32 PM   #1
GazL
Senior Member
 
Registered: May 2008
Posts: 3,380

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
rc.modules looks to need a little attention.


While I was reviewing the rc.* files I noticed that rc.modules seems a little outdated. I suspect this has been wrong for quite a while.

Code:
RELEASE=$(uname -r)

### Update module dependencies ###
# If /usr is mounted and we have 'find', we can try to take a shortcut:
if [ -x /usr/bin/find -a -e /lib/modules/$RELEASE/modules.dep \
     -a /lib/modules/$RELEASE/modules.dep -nt /etc/modules.conf ]; then
  NEWMODS="$(/usr/bin/find /lib/modules/$RELEASE -mindepth 2 -type f -newer /lib
/modules/$RELEASE/modules.dep)"
  # Only rebuild dependencies if new module(s) are found:
  if [ ! "" = "$NEWMODS" ]; then
    echo "Updating module dependencies for Linux $RELEASE:"
    /sbin/depmod -a
  else
    echo "Module dependencies up to date (no new kernel modules found)."
  fi
else # we don't have find, or there is no existing modules.dep, or it is out of 
date.
  echo "Updating module dependencies for Linux $RELEASE:"
  /sbin/depmod -A
fi
Firstly, there isn't a /etc/modules.conf anymore.

Secondly, the -a and -A options seem to have been reversed. According to the man pages, depmod -a will probe for all modules, where as -A will just process new ones.

All that stuff with find looks a little tortured too. I'm thinking that this section should probably be changed to a simple:
Code:
### Update module dependencies #########################################

# Determine the version of the running kernel:
RELEASE=$(uname -r)

if [ -e /lib/modules/$RELEASE/modules.dep ]; then 
  echo "Updating $RELEASE module dependencies for NEW modules (if any)."
  /sbin/depmod -A
else 
  echo "Updating $RELEASE module dependencies for ALL modules."
  /sbin/depmod -a
fi

########################################################################

Also, IMO all the lines in this file that modprobe various modules should reviewed for suitability and potentially commented out. For example, why would I want "/sbin/modprobe e_powersaver 2>/dev/null" or "/sbin/modprobe longrun 2>/dev/null" running on my X86_64?
 
Old 11-06-2013, 03:36 PM   #2
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0, CRUX 3.1
Posts: 3,051
Blog Entries: 15

Rep: Reputation: 764Reputation: 764Reputation: 764Reputation: 764Reputation: 764Reputation: 764Reputation: 764
It's mostly for systems I suppose that will be ran without udev and still use those individual modprobes for devices. The rc.modules file still works, but it's just very unused on a majority of systems because of what it's intended for.
 
Old 11-06-2013, 03:43 PM   #3
GazL
Senior Member
 
Registered: May 2008
Posts: 3,380

Original Poster
Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
I think my point was that "# Enhanced PowerSaver driver for VIA C7 CPUs" isn't much use in the rc.modules-3.10.17 shipped with the X86_64 kernel. I know the 2>/dev/null is going to hide the failures, but it just seems untidy.

Anyway, my main reason for posting was to draw attention to the depmod stuff, which I believe to be wrong.
 
1 members found this post helpful.
  


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


All times are GMT -5. The time now is 12:49 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration