SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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.
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054
Rep:
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.