-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
infra/image/dockerfile/c10s: Fix client part deployment for the server
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.
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
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 |