apt_hold_packages: broadcast message with wall, if present

This commit is contained in:
Jérémy Lecour 2022-02-24 11:49:04 +01:00 committed by Jérémy Lecour
parent 6321f32e81
commit d9e95218ce
2 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
### Added
* apt: apt_hold_packages: broadcast message with wall, if present
* Explicit permissions for systemd overrides
* evolinux-base: option to bypass raid-related tasks
* generate-ldif: Add support for php-fpm in containers

View File

@ -21,7 +21,12 @@ if [ -f ${config_file} ]; then
if [ -n "${package}" ]; then
if is_installed ${package} && ! is_held ${package}; then
apt-mark hold ${package}
>&2 echo "Package \`${package}' has been marked \`hold'."
msg="Package \`${package}' has been marked \`hold'."
>&2 echo "${msg}"
wall_bin=$(command -v wall)
if [ -n "${wall_bin}" ]; then
"${wall_bin}" --timeout 5 "${msg}"
fi
return_code=1
fi
fi