1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/shadow/shadow.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
14 cp -fv etc/limits etc/login.access $root/etc/
15 cp -fv $confdir/login.defs $root/etc/login.defs
17 # with PAM login does not know all options, discard them
18 if pkginstalled pam; then
19 sed -i 's/^\([ ]*ULIMIT.*\)/# \1/' $root/etc/login.defs
22 touch $root/var/log/lastlog $root/var/log/faillog
23 mv $root/usr/bin/{login,su} $root/bin/
25 if [ -e $root/etc/pam.d ]; then
26 if pkginstalled libselinux; then
27 cp etc/pam.d/[a-z]* $root/etc/pam.d/
29 for i in etc/pam.d/[a-z]*; do
30 sed 's,\(.*selinux.*\),#\1,g' < $i > $root/$i
34 [ -f $root/etc/pam.d/login ] &&
35 sed -i 's,\(.*loginuid.*\),#\1,g' $root/etc/pam.d/login
38 mkdir -p $root/etc/default
39 echo 'SHELL=/bin/bash' > $root/etc/default/useradd
42 hook_add postmake 5 "pm_shadow"
44 var_append confopt ' ' --disable-desrpc
45 [ "$SDECFG_STATIC" != 1 ] && var_append confopt ' ' --enable-shared
47 if ! atstage native; then
48 libdir="/${libdir##*/}"
50 libdir="$root${libdir##*/}"
53 pkginstalled libselinux || var_append confopt ' ' "--without-selinux"
55 #CHECK var_append confopt ' ' "--with-skey"