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
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-21 13:36:55 +0100
commitea4456d177759676dae5f812b0c528263e46e1e3 (patch)
treee6f642ff5ddc1e049f4fe37c69c29a4bf03965ad /INSTALL/common.d/10_base
parentfd662f2115fd91d51c79649bdb5163cb46e6e5d5 (diff)
Set CONTAINER_TYPE to docker when running within docker.eel_5.0.0eel/5.0.05.0.0
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 9574f79..686d399 100644
--- a/INSTALL/common.d/10_base
+++ b/INSTALL/common.d/10_base
@@ -29,12 +29,14 @@ apt-get autoremove -y
apt-get install gpg -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
@@ -87,5 +89,3 @@ cat <<EOF >>/etc/ssh/sshd_config
# configuration options added from docker-worker-generator (script $BASH_SOURCE)
AddressFamily inet
EOF
-
-