mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Merge pull request #1316 from t-woerner/c10s_niddomainname
infra/image/dockerfile/c10s: Fix client part deployment for the server
This commit is contained in:
@@ -9,9 +9,16 @@ dnf --assumeyes install \
|
||||
bash \
|
||||
systemd \
|
||||
procps-ng \
|
||||
iproute; \
|
||||
iproute \
|
||||
hostname; \
|
||||
rm -rf /var/cache/dnf/;
|
||||
|
||||
# Prepare for basic ipa-server-install in container
|
||||
# Address failing nis-domainname.service in the ipa-client-install step
|
||||
RUN mv /usr/bin/nisdomainname /usr/bin/nisdomainname.orig
|
||||
ADD utils/hostnamectl-wrapper /usr/bin/nisdomainname
|
||||
RUN chmod a+rx /usr/bin/nisdomainname
|
||||
|
||||
RUN (cd /lib/systemd/system/; \
|
||||
if [ -e dbus-broker.service ] && [ ! -e dbus.service ]; then \
|
||||
ln -s dbus-broker.service dbus.service; \
|
||||
|
||||
12
infra/image/utils/hostnamectl-wrapper
Normal file
12
infra/image/utils/hostnamectl-wrapper
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user