hooks: Remove /etc/.pwd.lock and /run/mount/utab
When the zero-byte file /etc/.pwd.lock is present in the ISO image, diffoscope will abort (https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/367) This file will be generated when needed, so it can be removed from the image. Cleanup /run/mount/utab (and its directory)
This commit is contained in:
parent
724f449e0d
commit
f290d31960
share/hooks/normal
|
@ -10,3 +10,13 @@ do
|
|||
mkdir -p ${_DIRECTORY}
|
||||
chmod 1777 ${_DIRECTORY}
|
||||
done
|
||||
|
||||
# Remove the old lock file which will be generated when needed
|
||||
rm -f /etc/.pwd.lock
|
||||
|
||||
# Remove /run/mount/utab of util-linux libmount (and its directory)
|
||||
# The file and directory will be generated when needed
|
||||
if [ -d /run/mount ]; then
|
||||
rm -f /run/mount/utab
|
||||
rmdir --ignore-fail-on-non-empty /run/mount
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue