From 97c7e4b7bfa151a0439943d0229b416ff76161c6 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Tue, 30 Jan 2018 17:16:54 +0800 Subject: [PATCH] config.sh: do not install systemd if agent is init When agent is used as init process, there is no need to install systemd. Signed-off-by: Peng Tao --- rootfs-builder/centos/config.sh | 9 ++++++--- rootfs-builder/clearlinux/config.sh | 3 ++- rootfs-builder/euleros/config.sh | 9 ++++++--- rootfs-builder/fedora/config.sh | 3 ++- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/rootfs-builder/centos/config.sh b/rootfs-builder/centos/config.sh index 8c5cf749c3..5a1ba4ef26 100644 --- a/rootfs-builder/centos/config.sh +++ b/rootfs-builder/centos/config.sh @@ -9,7 +9,10 @@ OS_VERSION=${OS_VERSION:-7} #Mandatory Packages that must be installed -# systemd: An init system that will start kata-agent # iptables: Need by Kata agent -# udevlib.so: Need by Kata agent -PACKAGES="systemd iptables" +PACKAGES="iptables" + +#Optional packages: +# systemd: An init system that will start kata-agent if kata-agent +# itself is not configured as init process. +[ "$AGENT_INIT" == "no" ] && PACKAGES+=" systemd" || true diff --git a/rootfs-builder/clearlinux/config.sh b/rootfs-builder/clearlinux/config.sh index 4401ce2491..5872a3648f 100644 --- a/rootfs-builder/clearlinux/config.sh +++ b/rootfs-builder/clearlinux/config.sh @@ -5,4 +5,5 @@ #Use "latest" to always pull the last Clear Linux Release OS_VERSION=${OS_VERSION:-latest} -PACKAGES="systemd iptables-bin libudev0-shim" +PACKAGES="iptables-bin libudev0-shim" +[ "$AGENT_INIT" == "no" ] && PACKAGES+=" systemd" || true diff --git a/rootfs-builder/euleros/config.sh b/rootfs-builder/euleros/config.sh index e3c627bfce..7785bb313d 100644 --- a/rootfs-builder/euleros/config.sh +++ b/rootfs-builder/euleros/config.sh @@ -9,7 +9,10 @@ OS_VERSION=${OS_VERSION:-2.2} #Mandatory Packages that must be installed -# systemd: An init system that will start kata-agent # iptables: Need by Kata agent -# udevlib.so: Need by Kata agent -PACKAGES="systemd iptables" +PACKAGES="iptables" + +#Optional packages: +# systemd: An init system that will start kata-agent if kata-agent +# itself is not configured as init process. +[ "$AGENT_INIT" == "no" ] && PACKAGES+=" systemd" || true diff --git a/rootfs-builder/fedora/config.sh b/rootfs-builder/fedora/config.sh index 58a51f491e..85bbf60a98 100644 --- a/rootfs-builder/fedora/config.sh +++ b/rootfs-builder/fedora/config.sh @@ -5,4 +5,5 @@ #Fedora version to use OS_VERSION=${OS_VERSION:-27} -PACKAGES="systemd iptables" +PACKAGES="iptables" +[ "$AGENT_INIT" == "no" ] && PACKAGES+=" systemd" || true