MErge en cours x86_64 -> trunk
[hvlinux.git] / stage2 / cis-pam
index af7d2b8..e65418e 100755 (executable)
@@ -1,4 +1,6 @@
 #!/bin/sh
+set -o errexit
+
 # First argument of this script is the package name
 
 # Reading system configuration informations, functions and package versions.
@@ -7,32 +9,35 @@ source ../functions
 source ../packages-list
 
 # Applying patches (if any)
-apply_patches ${1} &&
+apply_patches ${1}
 
-cd ${LFS_TMP}/${1}-build &&
+cd ${LFS_TMP}/${1}-build
+# --libdir=/lib
+#   Necessary to prevent PAM from instaling into /lib64
 ../${1}/configure \
     --libdir=/lib \
     --sbindir=/lib/security \
-    --enable-securedir=/lib/security \
     --docdir=/usr/share/doc/${1} \
-    --enable-read-both-confs &&
-make -j ${MAKEJOBS} &&
-make install &&
+    --enable-read-both-confs
+make -j ${MAKEJOBS}
+make install
+
+chmod -v 4755 /lib/security/unix_chkpwd
+
+mv -v /lib/security/pam_tally /sbin
 
-chmod -v 4755 /lib/security/unix_chkpwd &&
-mv -v /lib/security/pam_tally /sbin &&
-mv -v /lib/libpam{,c,_misc}.la /usr/lib &&
-sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la &&
+mv -v /lib/libpam{,c,_misc}.la /usr/lib
+sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la
 
 if [ -L /lib/libpam.so ]; then
    for LINK in libpam{,c,_misc}.so; do
-       ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} &&
+       ln -svfT ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK}
        rm -v /lib/${LINK}
    done
-fi &&
+fi
 
-mkdir -p /etc/pam.d &&
-cat > /etc/pam.d/other << EOF &&
+mkdir -p /etc/pam.d
+cat > /etc/pam.d/other << EOF
 # /etc/pam.d/other
 
 auth            required        pam_unix.so     nullok
@@ -50,5 +55,4 @@ other           session         required        pam_unix.so
 other           password        required        pam_unix.so     nullok
 EOF
 
-# Return last error
 exit $?