From f965dc7b7654c7a7872352a2f21f2604bc204ee0 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Fri, 2 Nov 2007 13:23:43 +0000 Subject: [PATCH] Stefan Fiedler: shadow: fix for multilib builds; some cleanups [2007091023140531368] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8740 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/shadow/shadow.conf | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/package/base/shadow/shadow.conf b/package/base/shadow/shadow.conf index e9e2df854..1c13daa68 100644 --- a/package/base/shadow/shadow.conf +++ b/package/base/shadow/shadow.conf @@ -1,3 +1,4 @@ +#!/bin/bash # --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. @@ -20,35 +21,35 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- +libdir="$root/$multilib" + pc_shadow() { # Need to rebuild libtool files, resolve possible version conflicts libtoolize --copy --force } pm_shadow() { - cp etc/limits etc/login.access $root/etc/ - cp etc/login.defs $root/etc/login.defs - if [ -d $root/etc/pam.d ]; then - for x in etc/pam.d/[a-z]*; do - [[ "$x" == *.orig ]] && continue - if [ -f $root/$x ]; then - touch $root/$x + cp etc/{limits,login.access,login.defs} $sysconfdir/ + if [ -d $sysconfdir/pam.d ]; then + for x in $(cd etc/ ; ls pam.d/[a-z]* ) ; do + [[ "etc/$x" == *.orig ]] && continue + if [ -f $sysconfdir/$x ]; then + touch $sysconfdir/$x else - cp $x $root/$x + cp etc/$x $sysconfdir/$x fi done - sed -e 's,^\(.*loginuid\),#\1,' -i ${root}/etc/pam.d/login + sed -e 's,^\(.*loginuid\),#\1,' -i $sysconfdir/pam.d/login fi - touch $root/var/log/lastlog $root/var/log/faillog + mkdir -p $localstatedir/log + touch $localstatedir/log/{lastlog,faillog} [ -f $root/usr/bin/login ] && mv $root/usr/bin/login $root/bin/ [ -f $root/usr/bin/su ] && mv $root/usr/bin/su $root/bin/ - mkdir -p $root/etc/default - echo 'SHELL=/bin/bash' > $root/etc/default/useradd + mkdir -p $sysconfdir/default + echo 'SHELL=/bin/bash' > $sysconfdir/default/useradd } preconf="pc_shadow" postmake="pm_shadow" -confopt="$confopt --enable-shared --disable-desrpc --without-selinux" -libdir="$root/lib" - +var_append extraconfopt " " "--enable-shared --disable-desrpc --without-selinux"