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 03-16-2007, 10:33 PM   #1
anwar
Member
 
Registered: Aug 2005
Location: Philippines
Distribution: Slackware 11.0
Posts: 44

Rep: Reputation: 15
ldconfig at startup, necessary?


hi is ldconfig at startup necessary? if not, how do I disable it when starting up?
 
Old 03-16-2007, 11:12 PM   #2
zetabill
Member
 
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 32
In /etc/rc.d/rc.M find the if block that calls /sbin/ldconfig and comment out (#) those four lines. Then ldconfig won't be called at startup. All it does is exactly what it says so unless you're compiling, installing, and removing software frequently it doesn't have to be called. I have that commented out at as well and I make a point to do an ldconfig whenever I do something software-related just for good measure and as a result I've had no reason for it to be run in well over a month.

So disable away my friend. Just don't forget about it when compiling something...
 
Old 03-16-2007, 11:51 PM   #3
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,098

Rep: Reputation: 54
check this thread out...
 
Old 03-17-2007, 12:09 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I say move that and the font config to rc.local_shutdown, so they are run at shutdown instead of startup. In this case, it produces the same effect.
 
Old 03-17-2007, 12:45 AM   #5
anwar
Member
 
Registered: Aug 2005
Location: Philippines
Distribution: Slackware 11.0
Posts: 44

Original Poster
Rep: Reputation: 15
I learned somethign new once again!
zetabill: cool will do my friend!

detpenguin: sorry for the repeat topic!

H_TeXMeX_H: excellent suggestion man!
 
Old 03-17-2007, 02:29 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
There isn't much point in running it at shutdown, except that it will register any libs you installed during the current session. But you probably meant for them to be registered and usable when you installed them no?
ldconfig is only necessary when new libraries are added to the sytem. Slackware runs it at startup as part of general sanity checks You might have installed packages remotely or whatever.
My point is that ldconfig should be run when needed -that's why installpkg and removepkg always runs it after installing/removing packages. Otherwise, the system has no way of knowing when you've installed anything, so ldconfig is run during startup to make sure everything is properly linked. It doesn't really do any good to run it later during the boot process either, because if there are new libs present they may be needed during startup. This command can/should be run as soon as all partitions which contain system libs are mounted. Doing it sooner will give an incomplete result and doing it later is too late.
 
Old 03-17-2007, 05:34 AM   #7
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Gnashley : You are absolutely right. But IMHO there is a reason that PAT includes it in the standard startup scripts. Most people don't remember to do ldconfig by themselves. Sure, in a system where you only use packages to install , ldconfig isn't that necessary as the package manager does it for you. But in an OS for Slack where you install using src a lot , I would recommend that you keep it in the startup scripts/Shutdown scripts.

Another possiblity is to keep it for the first few months of Slackware. Then after you have gotten s reasonable system ready where you wont install anything new much , you could remove ldconfig (and remem to do it yourself if you do install something)

What I personally find works for me is to change the script to run "ldconfig&" which backgrounds the task. I have lots of RAM as the system was designed for Windows and Slackware rarely uses all of the resources. Ofcourse its the ops decision on what to do. For e.g gnashley has found that he prefers the DIY method .. which I would use myself if ldconfig caused any delays during startup for me.

Anwar : If you are tryin to decrease your boot time. Search for a thread called "optimize startup " , it was started by H_TEXMEX_H ... most of teh answers are there already.
 
Old 03-17-2007, 09:36 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You misunderstood me. I don't mean that it should be left out of the boot process, just that running it later, especially after login, may be 'too late'.
It should be run as soon as all partitions are mounted that have libraries you want access to. If you have no nfs mounts, it could be run just after 'mount -a' during bootup.

What if you wanted to start something in rc.local that used libraries in a non-standard location? If ldconfig hasn't been run and they are not already in the cache, then they will not be found.

Pat includes the command because it helps insure a sane startup, just like 'chmod 755 /'. Since you can't know what the status was when the last shutdown/reboot occurred, it just makes sense to do some basic checks.
 
Old 03-17-2007, 09:54 AM   #9
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Placing the & at the end will run it in the background and not slow down the boot process. Works great for me.
 
Old 03-17-2007, 01:06 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by gnashley
You misunderstood me. I don't mean that it should be left out of the boot process, just that running it later, especially after login, may be 'too late'.
It should be run as soon as all partitions are mounted that have libraries you want access to. If you have no nfs mounts, it could be run just after 'mount -a' during bootup.

What if you wanted to start something in rc.local that used libraries in a non-standard location? If ldconfig hasn't been run and they are not already in the cache, then they will not be found.

Pat includes the command because it helps insure a sane startup, just like 'chmod 755 /'. Since you can't know what the status was when the last shutdown/reboot occurred, it just makes sense to do some basic checks.
Oh, I see. Well then, I guess you need it there in that case. I've left it out for some time and it made no difference that I can see.

Last edited by H_TeXMeX_H; 03-17-2007 at 01:10 PM.
 
Old 03-17-2007, 05:44 PM   #11
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,098

Rep: Reputation: 54
Quote:
Originally Posted by anwar
I learned somethign new once again!
zetabill: cool will do my friend!

detpenguin: sorry for the repeat topic!

H_TeXMeX_H: excellent suggestion man!

repeat threads happen...i just thought you might be able to use some of the information on the other one...it answered all my questions
 
  


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
is ldconfig necessary on startup? slinky2004 Linux - Newbie 9 01-05-2006 06:52 AM
ldconfig at startup Riddick Slackware 13 10-15-2005 01:02 PM
What is ldconfig? MicahCarrick Linux - Software 2 10-03-2005 06:31 PM
where is ldconfig ? trutnev Red Hat 3 06-01-2005 12:05 PM
ldconfig diefree Fedora 4 12-11-2004 02:20 AM

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

All times are GMT -5. The time now is 05:49 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