From 5409ab1542688d29d7350fbf46f983fef058c1d4 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Thu, 3 Dec 2015 14:35:37 +0100 Subject: [PATCH] Clean as much of /etc/systemd/system as possible, making upgrades easier. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 04f7264c..1f56672c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,8 @@ RUN mkdir -p /run/lock && dnf install -y freeipa-server freeipa-server-dns bind ADD ticket-5269.patch /root/ticket-5269.patch RUN patch /usr/lib/python2.7/site-packages/ipaserver/install/cainstance.py < /root/ticket-5269.patch && python -c 'import ipaserver.install.cainstance' +RUN ( cd /etc/systemd/system && grep -R -L '\.include /usr/lib/systemd/system' | while read i ; do rm -f /usr/lib/systemd/system/$i ; mkdir -p $( dirname /usr/lib/systemd/system/$i ) ; mv $i /usr/lib/systemd/system/$i ; done ) +RUN ( cd /etc/systemd/system && find . -name '*.service' | while read i ; do mkdir -p /usr/lib/systemd/system && mv $i /usr/lib/systemd/system/$i.d/abc.conf && sed -i '\|include /usr/lib/systemd/system|d' /usr/lib/systemd/system/$i.d/abc.conf ; done ) ADD dbus.service /usr/lib/systemd/system/dbus.service.d/containerized.conf ADD httpd.service /usr/lib/systemd/system/httpd.service.d/pidfile.conf