Modified the Linux-PAM instructions to install the libraries into /lib and then use the 'readlink' command to create the symlinks so that the instructions are not version specific.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7099 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Randy McMurchy 2007-09-05 01:00:16 +00:00
parent 4d6d306fcd
commit 6869595169
3 changed files with 42 additions and 16 deletions

View File

@ -3,7 +3,7 @@ $LastChangedBy$
$Date$ $Date$
--> -->
<!ENTITY day "04"> <!-- Always 2 digits --> <!ENTITY day "05"> <!-- Always 2 digits -->
<!ENTITY month "09"> <!-- Always 2 digits --> <!ENTITY month "09"> <!-- Always 2 digits -->
<!ENTITY year "2007"> <!ENTITY year "2007">
<!ENTITY version "svn-&year;&month;&day;"> <!ENTITY version "svn-&year;&month;&day;">

View File

@ -41,6 +41,18 @@
--> -->
<listitem>
<para>September 5, 2007</para>
<itemizedlist>
<listitem>
<para>[randy] - Modified the Linux-PAM instructions to install
the libraries into /lib and then use the 'readlink' command to
create the symlinks so that the instructions are not version
specific.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem> <listitem>
<para>September 4, 2007</para> <para>September 4, 2007</para>
<itemizedlist> <itemizedlist>

View File

@ -94,7 +94,7 @@
<para>Install <application>Linux-PAM</application> by <para>Install <application>Linux-PAM</application> by
running the following commands:</para> running the following commands:</para>
<screen><userinput>./configure --libdir=/usr/lib \ <screen><userinput>./configure --libdir=/lib \
--sbindir=/lib/security \ --sbindir=/lib/security \
--enable-securedir=/lib/security \ --enable-securedir=/lib/security \
--docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; \ --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; \
@ -123,11 +123,16 @@ make</userinput></screen>
<screen role="root"><userinput>make install &amp;&amp; <screen role="root"><userinput>make install &amp;&amp;
chmod -v 4755 /lib/security/unix_chkpwd &amp;&amp; chmod -v 4755 /lib/security/unix_chkpwd &amp;&amp;
mv -v /lib/security/pam_tally /sbin &amp;&amp; mv -v /lib/security/pam_tally /sbin &amp;&amp;
mv -v /usr/lib/libpam*.so.0* /lib &amp;&amp;
ln -v -sf ../../lib/libpam.so.0.81.6 /usr/lib/libpam.so &amp;&amp; mv -v /lib/libpam{,c,_misc}.la /usr/lib &amp;&amp;
ln -v -sf ../../lib/libpamc.so.0.81.0 /usr/lib/libpamc.so &amp;&amp; sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la &amp;&amp;
ln -v -sf ../../lib/libpam_misc.so.0.81.2 /usr/lib/libpam_misc.so</userinput></screen>
for LINK in libpam{,c,_misc}.so; do
ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} &amp;&amp;
rm -v /lib/${LINK}
done</userinput></screen>
<!-- <para>If you downloaded the documentation, install it using the following <!-- <para>If you downloaded the documentation, install it using the following
command:</para> command:</para>
@ -142,14 +147,15 @@ done</userinput></screen> -->
<sect2 role="commands"> <sect2 role="commands">
<title>Command Explanations</title> <title>Command Explanations</title>
<para><parameter>--libdir=/usr/lib</parameter>: This parameter results in <para><parameter>--libdir=/lib</parameter>: This parameter results in
the libraries being installed in the libraries being installed in
<filename class='directory'>/usr/lib</filename>.</para> <filename class='directory'>/lib</filename> as they may be required in
single-user mode.</para>
<para><parameter>--sbindir=/lib/security</parameter>: This parameter <para><parameter>--sbindir=/lib/security</parameter>: This parameter
results in two executables, one which is not intended to be run from the results in two executables, one of which is not intended to be run from the
command line, being installed in the same directory as the PAM modules. command line, being installed in the same directory as the PAM modules.
One of the executables is later moved to the The other executable is later moved to the
<filename class='directory'>/sbin</filename> directory.</para> <filename class='directory'>/sbin</filename> directory.</para>
<para><parameter>--enable-securedir=/lib/security</parameter>: This <para><parameter>--enable-securedir=/lib/security</parameter>: This
@ -173,13 +179,21 @@ done</userinput></screen> -->
administrator, possibly in single-user mode, so it is moved to the administrator, possibly in single-user mode, so it is moved to the
appropriate directory.</para> appropriate directory.</para>
<para><command>mv -v /usr/lib/libpam*.so.0* /lib</command>: This command <para><command>mv -v /lib/libpam{,c,_misc}.la /usr/lib</command>: This
moves the dynamic libraries to <filename class='directory'>/lib</filename> command moves the <application>Libtool</application> library files to
as they may be required in single user mode.</para> <filename class='directory'>/usr/lib</filename> as they are expected to
reside there.</para>
<para><command>ln -v -sf ...</command>: These commands recreate the <para><command>sed -i 's| /lib| /usr/lib|'
<filename class='symlink'>.so</filename> symlinks as the libraries they /usr/lib/libpam_misc.la</command>: This command corrects an installation
pointed to were moved to <filename class='directory'>/lib</filename>.</para> reference due to the file being moved in the previous step.</para>
<para><command>for ...; do ...; done</command>: These commands are used
to relocate the <filename class='symlink'>.so</filename> files into
<filename class='directory'>/usr/lib</filename>. The
<command>readlink</command> command is used so that the commands are not
specific to the names of the libraries, and will work regardless of the
version number extensions of the library names.</para>
</sect2> </sect2>