[BLFS Trac] #2390: Create Linux-PAM symlinks using 'readlink'

BLFS Trac trac at linuxfromscratch.org
Tue Sep 4 10:00:59 PDT 2007


#2390: Create Linux-PAM symlinks using 'readlink'
----------------------------------------+-----------------------------------
 Reporter:  randy at linuxfromscratch.org  |        Owner:  blfs-book at linuxfromscratch.org
     Type:  enhancement                 |       Status:  new                           
 Priority:  normal                      |    Milestone:  6.3                           
Component:  BOOK                        |      Version:  SVN                           
 Severity:  normal                      |   Resolution:                                
 Keywords:                              |  
----------------------------------------+-----------------------------------
Comment (by dnicholson at linuxfromscratch.org):

 I happened to write a preliminary patch this morning (attached), but you
 can go for it if you want. The basic addition is this:

 {{{
 for lib in libpam{,c,_misc}.so; do
     link=$(readlink /usr/lib/$lib) &&
     ln -svf ../../lib/$link /usr/lib/$lib
 done
 }}}

 The only problem is that you can't repeat the command because it will just
 keep adding "../../lib/" to the beginning of the existing symlink.

 I also changed the mv command so that it moves *.so.* instead of *.so.0*
 since I wanted to eliminate all notion of the DSO name. However, it would
 be better to just use --libdir=/lib as you say.

-- 
Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/2390#comment:2>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch



More information about the blfs-book mailing list