2024-10-05 06:46:05 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source versions.sh
|
|
|
|
|
|
|
|
GLSOURCES="/sources"
|
|
|
|
|
2024-10-09 03:43:22 +08:00
|
|
|
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
2024-10-05 06:46:05 +08:00
|
|
|
|
|
|
|
[ -d cracklib-${cracklib_version} ] && rm -rf cracklib-${cracklib_version}
|
|
|
|
|
|
|
|
tar -Jxf ${cracklib_tarball}
|
|
|
|
|
|
|
|
cd cracklib-${cracklib_version}
|
|
|
|
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--disable-static \
|
|
|
|
--with-default-dict=/usr/lib/cracklib/pw_dict
|
|
|
|
|
|
|
|
make
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
myfail "Failed building cracklib"
|
|
|
|
fi
|
|
|
|
|
2024-10-05 07:59:17 +08:00
|
|
|
make install
|
2024-10-05 06:46:05 +08:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
myfail "Failed installing cracklib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
install -v -m644 -D ../cracklib-words-2.10.2.xz \
|
|
|
|
/usr/share/dict/cracklib-words.xz
|
|
|
|
|
|
|
|
unxz -v /usr/share/dict/cracklib-words.xz
|
|
|
|
ln -v -sf cracklib-words /usr/share/dict/words
|
|
|
|
|
2024-10-05 07:59:17 +08:00
|
|
|
echo $(hostname) >> /usr/share/dict/cracklib-extra-words
|
|
|
|
|
2024-10-05 06:46:05 +08:00
|
|
|
install -v -m755 -d /usr/lib/cracklib
|
|
|
|
|
|
|
|
create-cracklib-dict /usr/share/dict/cracklib-words \
|
|
|
|
/usr/share/dict/cracklib-extra-words
|
|
|
|
|
2024-10-08 12:28:55 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
# cleanup
|
|
|
|
|
|
|
|
pushd $GLSOURCES
|
|
|
|
|
|
|
|
rm -rf cracklib-${cracklib_version}
|
|
|
|
|
|
|
|
popd
|