From 751f39533f0ffcae84acfb2645ddb836c43c6d23 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Mon, 19 Nov 2018 12:29:42 +0000 Subject: [PATCH] rootfs/config: Simplify config files Remove redundant `|| true` and use single equals in string test for consistency. Signed-off-by: James O. D. Hunt --- rootfs-builder/alpine/config.sh | 2 +- rootfs-builder/centos/config.sh | 4 ++-- rootfs-builder/clearlinux/config.sh | 4 ++-- rootfs-builder/euleros/config.sh | 4 ++-- rootfs-builder/fedora/config.sh | 4 ++-- rootfs-builder/ubuntu/config.sh | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rootfs-builder/alpine/config.sh b/rootfs-builder/alpine/config.sh index 2b8d69a1..b002ba07 100644 --- a/rootfs-builder/alpine/config.sh +++ b/rootfs-builder/alpine/config.sh @@ -23,4 +23,4 @@ INIT_PROCESS=kata-agent # as reported by `uname -m` ARCH_EXCLUDE_LIST=() -[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" || true +[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" diff --git a/rootfs-builder/centos/config.sh b/rootfs-builder/centos/config.sh index 07637a96..f1bd1486 100644 --- a/rootfs-builder/centos/config.sh +++ b/rootfs-builder/centos/config.sh @@ -27,7 +27,7 @@ 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 +[ "$AGENT_INIT" = "no" ] && PACKAGES+=" systemd" # Init process must be one of {systemd,kata-agent} INIT_PROCESS=systemd @@ -35,4 +35,4 @@ INIT_PROCESS=systemd # as reported by `uname -m` ARCH_EXCLUDE_LIST=() -[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" || true +[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" diff --git a/rootfs-builder/clearlinux/config.sh b/rootfs-builder/clearlinux/config.sh index 9f534c9a..fe4c93a2 100644 --- a/rootfs-builder/clearlinux/config.sh +++ b/rootfs-builder/clearlinux/config.sh @@ -20,7 +20,7 @@ PACKAGES="iptables-bin libudev0-shim" #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 +[ "$AGENT_INIT" = "no" ] && PACKAGES+=" systemd" # Init process must be one of {systemd,kata-agent} INIT_PROCESS=systemd @@ -28,4 +28,4 @@ INIT_PROCESS=systemd # as reported by `uname -m` ARCH_EXCLUDE_LIST=(ppc64le) -[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" || true +[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" diff --git a/rootfs-builder/euleros/config.sh b/rootfs-builder/euleros/config.sh index d6b41231..3e26de5f 100644 --- a/rootfs-builder/euleros/config.sh +++ b/rootfs-builder/euleros/config.sh @@ -15,7 +15,7 @@ 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 +[ "$AGENT_INIT" = "no" ] && PACKAGES+=" systemd" # Init process must be one of {systemd,kata-agent} INIT_PROCESS=systemd @@ -26,4 +26,4 @@ ARCH_EXCLUDE_LIST=() # For more info see: https://github.com/kata-containers/osbuilder/issues/190 BUILD_CAN_FAIL=1 -[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" || true +[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" diff --git a/rootfs-builder/fedora/config.sh b/rootfs-builder/fedora/config.sh index 10315c48..1dd5c57e 100644 --- a/rootfs-builder/fedora/config.sh +++ b/rootfs-builder/fedora/config.sh @@ -14,10 +14,10 @@ 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 +[ "$AGENT_INIT" = "no" ] && PACKAGES+=" systemd" # Init process must be one of {systemd,kata-agent} INIT_PROCESS=systemd ARCH_EXCLUDE_LIST=() -[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" || true +[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp" diff --git a/rootfs-builder/ubuntu/config.sh b/rootfs-builder/ubuntu/config.sh index 40263c12..11b0f99a 100644 --- a/rootfs-builder/ubuntu/config.sh +++ b/rootfs-builder/ubuntu/config.sh @@ -30,4 +30,4 @@ INIT_PROCESS=systemd # as reported by `uname -m` ARCH_EXCLUDE_LIST=() -[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp2" || true +[ "$SECCOMP" = "yes" ] && PACKAGES+=" libseccomp2"