mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 19:52:52 +00:00
Add 8.25 - Build shadow
This commit is contained in:
parent
f024869865
commit
9dc826f8e1
2 changed files with 61 additions and 0 deletions
49
scripts/chapter8/8.25-shadow.sh
Normal file
49
scripts/chapter8/8.25-shadow.sh
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd /sources
|
||||||
|
tar xf shadow-4.12.2.tar.xz
|
||||||
|
cd shadow-4.12.2
|
||||||
|
|
||||||
|
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 SHA512:' \
|
||||||
|
-e 's:/var/spool/mail:/var/mail:' \
|
||||||
|
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
|
||||||
|
-i etc/login.defs
|
||||||
|
|
||||||
|
touch /usr/bin/passwd
|
||||||
|
./configure --sysconfdir=/etc \
|
||||||
|
--disable-static \
|
||||||
|
--with-group-name-max-length=32
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
make -j5
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
make exec_prefix=/usr install
|
||||||
|
make -C man install-man
|
||||||
|
|
||||||
|
pwconv
|
||||||
|
grpconv
|
||||||
|
|
||||||
|
mkdir -p /etc/default
|
||||||
|
useradd -D --gid 999
|
||||||
|
|
||||||
|
sed -i '/MAIL/s/yes/no/' /etc/default/useradd
|
||||||
|
|
||||||
|
passwd root
|
||||||
|
|
||||||
|
cd /sources
|
||||||
|
rm -rf shadow-4.12.2
|
||||||
|
|
|
@ -834,3 +834,15 @@ then
|
||||||
stop_script "chapter8/8.24-libcap.sh"
|
stop_script "chapter8/8.24-libcap.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Chapter 8.25
|
||||||
|
# ============
|
||||||
|
echo "Building shadow"
|
||||||
|
su -c "bash $SCRIPT/chapter8/8.25-shadow.sh"
|
||||||
|
|
||||||
|
# Exit on error
|
||||||
|
check_exit_code
|
||||||
|
if [ $exit_status -ne 0 ]
|
||||||
|
then
|
||||||
|
stop_script "chapter8/8.25-shadow.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue