LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 01-20-2006, 06:36 PM   #1
intox
LQ Newbie
 
Registered: Jan 2006
Posts: 10

Rep: Reputation: 0
Slackware 10.2 - /sbin/ldconfig - How to disable at boot time?


Hi all,

For Slackware 10.2, ldconfig is running at boot-up, and this makes the boot process somewhat slow. I was wondering if anyone knew where (or in what script) /sbin/ldconfig is being called on boot-up so I can disable it. Thanks for your input everyone.

IntoX
 
Old 01-20-2006, 06:39 PM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,744

Rep: Reputation: 71
Edit the /etc/rc.d/rc.M and uncomment the lines:

if [ -x /sbin/ldconfig ]; then
echo "Updating shared library links: /sbin/ldconfig"
/sbin/ldconfig
 
Old 01-20-2006, 06:39 PM   #3
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,744

Rep: Reputation: 71
Forgot to mention, all the boot time scripts and commands are in the /etc/rc.d directory.
 
Old 01-20-2006, 08:04 PM   #4
intox
LQ Newbie
 
Registered: Jan 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks Tangle

Thanks Tangle, I will try that now...

IntoX

PS: I had forgotten to look in /etc/rc.d/rc.M, which going back through the SlackBook, I realize now I should have went there first I trudged through rc.S first, expecting it there. Hmm...

Last edited by intox; 01-20-2006 at 08:07 PM.
 
Old 01-20-2006, 08:15 PM   #5
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,744

Rep: Reputation: 71
You can use the command:

cat /etc/rc.d/rc.M | grep ldconfig

to find the string.

cat just prints the contents of the file to the screen.
| pipes (transfers) the data to the command after the |
grep finds and line that has ldconfig in it.

This a useful command.
 
Old 01-20-2006, 08:27 PM   #6
intox
LQ Newbie
 
Registered: Jan 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Again, Thanks

It works. Woohoo.

IntoX
 
Old 01-20-2006, 08:32 PM   #7
intox
LQ Newbie
 
Registered: Jan 2006
Posts: 10

Original Poster
Rep: Reputation: 0
On grep

I was trying to remember some cool things with grep, which was part of the reason why I didn't find anything on ldconfig in /etc/rc.d/, but I just remembered I could have done

$ grep ldconfig /etc/rc.d/*

To find all files with ldconfig in them, and then gone from there...

IntoX
 
Old 01-20-2006, 09:49 PM   #8
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Are you going to run it from cron instead?
 
Old 01-21-2006, 08:48 AM   #9
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,909

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
You can change ldconfig to run in the background to speed up booting by adding a "&" at the end of the command: in rc.M
Code:
if [ -x /sbin/ldconfig ]; then
echo "Updating shared library links: /sbin/ldconfig"
/sbin/ldconfig &
 
Old 01-21-2006, 10:39 AM   #10
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current
Posts: 745

Rep: Reputation: 64
Another possibility is to comment the ldconfig stuff in /etc/rc.d/rc.M as suggested above, and run it 5 minutes after boot, by adding the following lines in /etc/rc.d/rc.local
Code:
/usr/bin/echo "ldconfig" | /usr/bin/at now +5minutes 2> /dev/null 1> /dev/null
echo "at: /sbin/ldconfig will be started after 5 minutes..."
Don't forget to make rc.local executable, if it isn't yet
Code:
chmod +x /etc/rc.d/rc.local
Cheers, Leon.

Last edited by BroX; 01-21-2006 at 10:42 AM.
 
Old 01-21-2006, 07:34 PM   #11
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Just another tidbit, in /etc/rc.d/rc.M, just below the lines to run ldconfig, is a line to run fc-cache. Unless you are playing with fonts, you probably do not need that line at boot-up either.
 
Old 01-22-2006, 01:39 AM   #12
intox
LQ Newbie
 
Registered: Jan 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thos e are excellent suggestions!

You guys bring up valid points in the streamlining of the boot process by either running it in cron, with the & after it, or with a script that runs it later. I can't believe I havent thought of &, but I will give those options a try and then report on the performance issues I have. Thank you all for you suggestions!

IntoX
 
Old 01-22-2006, 10:53 AM   #13
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current
Posts: 745

Rep: Reputation: 64
There's a thread with more tweaks http://www.linuxquestions.org/questi...d.php?t=369220

Cheers, Leon.
 
  


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
/sbin/ldconfig Not ELF Casket Slackware 7 08-02-2005 01:59 AM
messing with /sbin/ldconfig errors. Andronik Slackware 3 12-20-2004 03:43 PM
/sbin/ldconfig alaios Linux - Newbie 1 10-21-2004 04:46 PM
disable ldconfig at boot? rgiggs Slackware 23 07-04-2004 04:45 PM
/sbin/ldconfig and X problems c31c Slackware 1 06-28-2004 10:24 AM


All times are GMT -5. The time now is 09:43 PM.

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