lfs-buildscripts/CH8Build/CH08.26-shadow.sh

55 lines
1.2 KiB
Bash
Raw Normal View History

2024-10-05 06:46:05 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
[ -d shadow-${shadow_version} ] && rm -rf shadow-${shadow_version}
tar -Jxf ${shadow_tarball}
cd shadow-${shadow_version}
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \
-e 's:/var/spool/mail:/var/mail:' \
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
-i etc/login.defs
2024-10-06 13:16:25 +08:00
#sed -i 's:DICTPATH.*:DICTPATH\t/lib/cracklib/pw_dict:' etc/login.defs
2024-10-05 06:46:05 +08:00
touch /usr/bin/passwd
./configure --sysconfdir=/etc \
--disable-static \
--with-{b,yes}crypt \
--without-libbsd \
2024-10-06 13:16:25 +08:00
--with-group-name-max-length=32
2024-10-05 06:46:05 +08:00
make
if [ $? -ne 0 ]; then
myfail "Failed building shadow"
fi
make exec_prefix=/usr install
if [ $? -ne 0 ]; then
myfail "Failed installing shadow"
fi
2024-10-06 13:16:25 +08:00
make -C man install-man
2024-10-05 06:46:05 +08:00
pwconv
grpconv
2024-10-06 13:16:25 +08:00
mkdir -p /etc/default
useradd -D --gid 999
2024-10-05 06:46:05 +08:00