diff --git a/share/hooks/normal/8070-remove-temporary-files.hook.chroot b/share/hooks/normal/8070-remove-temporary-files.hook.chroot index 21bc5ee6f..5f75f639d 100755 --- a/share/hooks/normal/8070-remove-temporary-files.hook.chroot +++ b/share/hooks/normal/8070-remove-temporary-files.hook.chroot @@ -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