T7278: Fix missing cracklib database files on image update

This commit is contained in:
oniko94 2025-03-25 01:38:05 +02:00
parent feb144cdd7
commit 0646013a7c
No known key found for this signature in database
GPG Key ID: 8782BD562CE54A7A
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,13 @@
#!/bin/sh
CRACKLIB_DIR=/var/cache/cracklib
CRACKLIB_DB=cracklib_dict
if [ ! -f "${CRACKLIB_DIR}/${CRACKLIB_DB}.pwd" ]; then
echo "I: Creating the cracklib database ${CRACKLIB_DIR}/${CRACKLIB_DB}"
mkdir -p $CRACKLIB_DIR
/usr/sbin/create-cracklib-dict -o $CRACKLIB_DIR/$CRACKLIB_DB \
/usr/share/dict/cracklib-small
fi

View File

@ -44,7 +44,8 @@ usr/games/*
usr/local/games/* usr/local/games/*
# T5511: We do not need any caches on the system (will be recreated when needed). # T5511: We do not need any caches on the system (will be recreated when needed).
var/cache/* # T7278: We need directory created by python3-cracklib for password checks
var/cache/!(cracklib)
# T5511: We do not need any log-files on the system (will be recreated when needed). # T5511: We do not need any log-files on the system (will be recreated when needed).
var/log/*.log var/log/*.log