mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
The client part deployment fails in the configuration of NIS. The command /usr/bin/nisdomainname is failing in a container in this task as the container is not privileged. The hostnamectl-wrapper is copied from the freeipa-container container project to replace /usr/bin/nisdomainname in the container.
13 lines
249 B
Bash
13 lines
249 B
Bash
#!/bin/bash -eu
|
|
|
|
if setpriv --dump | grep -q sys_admin ; then
|
|
if [[ "$( basename $0 )" =~ "domainname" ]] ; then
|
|
/usr/bin/hostname -y "$@"
|
|
else
|
|
$0.orig "$@"
|
|
fi
|
|
else
|
|
echo "Skipping invocation of $0 $@ in unprivileged container." >&2
|
|
exit
|
|
fi
|