[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] update-dlw-krb5-keytabs: Handle missing/empty diskless-workstation-hosts
Mike Gabriel (@sunweaver)
gitlab at salsa.debian.org
Mon Aug 7 15:14:36 BST 2023
Mike Gabriel pushed to branch master at Debian Edu / debian-edu-config
Commits:
69cd4c75 by Guido Berhoerster at 2023-08-07T14:13:47+00:00
update-dlw-krb5-keytabs: Handle missing/empty diskless-workstation-hosts
The "set -e" makes the shell exit with status 1 immediately without any message
if the grep in the subshell does not match anything. This in turn makes scripts
like gosa-remove-host fail without any error message. Exit gracefully with a
message and exit status 0 if diskless-workstation-hosts netgroup is
missing/empty.
- - - - -
1 changed file:
- share/debian-edu-config/tools/update-dlw-krb5-keytabs
Changes:
=====================================
share/debian-edu-config/tools/update-dlw-krb5-keytabs
=====================================
@@ -49,7 +49,7 @@ DLW_KRB5_KEYTABS_DIR="/var/lib/debian-edu/dlw-keytabs"
# Clear caching daemon's NIS netgroup cache (this assures an LDAP re-lookup).
nscd -i netgroup
-DLW_HOSTS_NETGROUP=$(netgroup diskless-workstation-hosts | grep -E "\.${DOMAIN}$")
+DLW_HOSTS_NETGROUP="$(netgroup diskless-workstation-hosts | grep -E "\.${DOMAIN}$")" || true
# Do some sanity checks...
if [ "$(id -u)" != "0" ]; then
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/69cd4c752f6bb91773f59742445d8f71bea9f8fd
--
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/69cd4c752f6bb91773f59742445d8f71bea9f8fd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20230807/c130f226/attachment.htm>
More information about the debian-edu-commits
mailing list