LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 10.2 - /sbin/ldconfig - How to disable at boot time? (http://www.linuxquestions.org/questions/slackware-14/slackware-10-2-sbin-ldconfig-how-to-disable-at-boot-time-405965/)

intox 01-20-2006 06:36 PM

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

tangle 01-20-2006 06:39 PM

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

tangle 01-20-2006 06:39 PM

Forgot to mention, all the boot time scripts and commands are in the /etc/rc.d directory.

intox 01-20-2006 08:04 PM

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...

tangle 01-20-2006 08:15 PM

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.

intox 01-20-2006 08:27 PM

Again, Thanks
 
It works. Woohoo.

IntoX

intox 01-20-2006 08:32 PM

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

MS3FGX 01-20-2006 09:49 PM

Are you going to run it from cron instead?

bathory 01-21-2006 08:48 AM

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 &


BroX 01-21-2006 10:39 AM

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.

Woodsman 01-21-2006 07:34 PM

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.

intox 01-22-2006 01:39 AM

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

BroX 01-22-2006 10:53 AM

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

Cheers, Leon.


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