aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL/common.d/10_base
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-21 13:36:55 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-12-21 16:02:19 +0000
commit1c1e44006e3ed401c2398d71fff429c8b56f6091 (patch)
tree42aed2d9010cd96917153dbf734c9267223796e5 /INSTALL/common.d/10_base
parent9cdc2cd9e63f250914ccf5eda877d2c697a81f7b (diff)
Set CONTAINER_TYPE to docker when running within docker.eel_4.99.5eel/4.99.54.99.5
Change-Id: Ida9d5a12b12f94bb5439a875696f65ded2dff087 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'INSTALL/common.d/10_base')
-rw-r--r--INSTALL/common.d/10_base14
1 files changed, 7 insertions, 7 deletions
diff --git a/INSTALL/common.d/10_base b/INSTALL/common.d/10_base
index fa9cb51..825e4fa 100644
--- a/INSTALL/common.d/10_base
+++ b/INSTALL/common.d/10_base
@@ -26,12 +26,14 @@ apt-get remove -y exim4 exim4-base exim4-config exim4-daemon-light
apt-get autoremove -y
# remove some useless systemd services
-for sysdir in /lib/systemd /etc/systemd; do
- for pattern in tty udev; do
- find $sysdir -name "*${pattern}*" -exec rm -rf {} \; || :
+if [[ "$CONTAINER_TYPE" = "docker" ]]; then
+ for sysdir in /lib/systemd /etc/systemd; do
+ for pattern in tty udev; do
+ find $sysdir -name "*${pattern}*" -exec rm -rf {} \; || :
+ done
done
-done
-rm -f /lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount
+ rm -f /lib/systemd/system/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount
+fi
# allow to use systemd as user (systemd --user)
apt-get install -y libpam-systemd
@@ -84,5 +86,3 @@ cat <<EOF >>/etc/ssh/sshd_config
# configuration options added from docker-worker-generator (script $BASH_SOURCE)
AddressFamily inet
EOF
-
-