Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # vim: ts=4 sw=4 sts=4 et tw=72 : |
| 4 | |
| 5 | # force any errors to cause the script and job to end in failure |
| 6 | set -xeu -o pipefail |
| 7 | |
| 8 | ensure_kernel_install() { |
| 9 | # Workaround for mkinitrd failing on occassion. |
| 10 | # On CentOS 7 it seems like the kernel install can fail it's mkinitrd |
| 11 | # run quietly, so we may not notice the failure. This script retries for a |
| 12 | # few times before giving up. |
| 13 | initramfs_ver=$(rpm -q kernel | tail -1 | sed "s/kernel-/initramfs-/") |
| 14 | grub_conf="/boot/grub/grub.conf" |
| 15 | # Public cloud does not use /boot/grub/grub.conf and uses grub2 instead. |
| 16 | if [ ! -e "$grub_conf" ]; then |
| 17 | echo "$grub_conf not found. Using Grub 2 conf instead." |
| 18 | grub_conf="/boot/grub2/grub.cfg" |
| 19 | fi |
| 20 | |
| 21 | for i in $(seq 3); do |
| 22 | if grep "$initramfs_ver" "$grub_conf"; then |
| 23 | break |
| 24 | fi |
| 25 | echo "Kernel initrd missing. Retrying to install kernel..." |
| 26 | yum reinstall -y kernel |
| 27 | done |
| 28 | if ! grep "$initramfs_ver" "$grub_conf"; then |
| 29 | cat /boot/grub/grub.conf |
| 30 | echo "ERROR: Failed to install kernel." |
| 31 | exit 1 |
| 32 | fi |
| 33 | } |
| 34 | |
| 35 | ensure_ubuntu_install() { |
| 36 | # Workaround for mirrors occassionally failing to install a package. |
| 37 | # On Ubuntu sometimes the mirrors fail to install a package. This wrapper |
| 38 | # checks that a package is successfully installed before moving on. |
| 39 | |
| 40 | packages=($@) |
| 41 | |
| 42 | for pkg in "${packages[@]}" |
| 43 | do |
| 44 | # Retry installing package 5 times if necessary |
| 45 | for i in {0..5} |
| 46 | do |
| 47 | if [ "$(dpkg-query -W -f='${Status}' "$pkg" 2>/dev/null | grep -c "ok installed")" -eq 0 ]; then |
| 48 | apt-cache policy "$pkg" |
| 49 | apt-get install "$pkg" |
| 50 | continue |
| 51 | else |
| 52 | echo "$pkg already installed." |
| 53 | break |
| 54 | fi |
| 55 | done |
| 56 | done |
| 57 | } |
| 58 | |
| 59 | rh_systems() { |
| 60 | # Handle the occurance where SELINUX is actually disabled |
| 61 | SELINUX=$(grep -E '^SELINUX=(disabled|permissive|enforcing)$' /etc/selinux/config) |
| 62 | MODE=$(echo "$SELINUX" | cut -f 2 -d '=') |
| 63 | case "$MODE" in |
| 64 | permissive) |
| 65 | echo "************************************" |
| 66 | echo "** SYSTEM ENTERING ENFORCING MODE **" |
| 67 | echo "************************************" |
| 68 | # make sure that the filesystem is properly labelled. |
| 69 | # it could be not fully labeled correctly if it was just switched |
| 70 | # from disabled, the autorelabel misses some things |
| 71 | # skip relabelling on /dev as it will generally throw errors |
| 72 | restorecon -R -e /dev / |
| 73 | |
| 74 | # enable enforcing mode from the very start |
| 75 | setenforce enforcing |
| 76 | |
| 77 | # configure system for enforcing mode on next boot |
| 78 | sed -i 's/SELINUX=permissive/SELINUX=enforcing/' /etc/selinux/config |
| 79 | ;; |
| 80 | disabled) |
| 81 | sed -i 's/SELINUX=disabled/SELINUX=permissive/' /etc/selinux/config |
| 82 | touch /.autorelabel |
| 83 | |
| 84 | echo "*******************************************" |
| 85 | echo "** SYSTEM REQUIRES A RESTART FOR SELINUX **" |
| 86 | echo "*******************************************" |
| 87 | ;; |
| 88 | enforcing) |
| 89 | echo "*********************************" |
| 90 | echo "** SYSTEM IS IN ENFORCING MODE **" |
| 91 | echo "*********************************" |
| 92 | ;; |
| 93 | esac |
| 94 | |
| 95 | # Allow jenkins access to alternatives command to switch java version |
| 96 | cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults |
| 97 | Defaults:jenkins !requiretty |
| 98 | jenkins ALL = NOPASSWD: /usr/sbin/alternatives |
| 99 | EOF |
| 100 | |
| 101 | echo "---> Updating operating system" |
| 102 | yum clean all |
| 103 | yum install -y deltarpm |
| 104 | yum update -y |
| 105 | |
| 106 | ensure_kernel_install |
| 107 | |
| 108 | # add in components we need or want on systems |
| 109 | echo "---> Installing base packages" |
| 110 | yum install -y @base https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
| 111 | # separate group installs from package installs since a non-existing |
| 112 | # group with dnf based systems (F21+) will fail the install if such |
| 113 | # a group does not exist |
| 114 | yum install -y unzip xz puppet git git-review perl-XML-XPath |
| 115 | yum install -y python-{devel,virtualenv,setuptools,pip} |
| 116 | |
| 117 | # All of our systems require Java (because of Jenkins) |
| 118 | # Install all versions of the OpenJDK devel but force 1.7.0 to be the |
| 119 | # default |
| 120 | |
| 121 | echo "---> Configuring OpenJDK" |
| 122 | yum install -y 'java-*-openjdk-devel' |
| 123 | |
| 124 | FACTER_OS=$(/usr/bin/facter operatingsystem) |
| 125 | FACTER_OSVER=$(/usr/bin/facter operatingsystemrelease) |
| 126 | case "$FACTER_OS" in |
| 127 | Fedora) |
| 128 | if [ "$FACTER_OSVER" -ge "21" ] |
| 129 | then |
| 130 | echo "---> not modifying java alternatives as OpenJDK 1.7.0 does not exist" |
| 131 | else |
| 132 | alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java |
| 133 | alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64 |
| 134 | fi |
| 135 | ;; |
| 136 | RedHat|CentOS) |
| 137 | if [ "$(echo "$FACTER_OSVER" | cut -d'.' -f1)" -ge "7" ] |
| 138 | then |
| 139 | echo "---> not modifying java alternatives as OpenJDK 1.7.0 does not exist" |
| 140 | else |
| 141 | alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java |
| 142 | alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64 |
| 143 | fi |
| 144 | ;; |
| 145 | *) |
| 146 | alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java |
| 147 | alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64 |
| 148 | ;; |
| 149 | esac |
| 150 | |
| 151 | ######################## |
| 152 | # --- START LFTOOLS DEPS |
| 153 | |
| 154 | # Used by various scripts to push patches to Gerrit |
| 155 | yum install -y git-review |
| 156 | |
| 157 | # Needed to parse OpenStack commands used by opendaylight-infra stack commands |
| 158 | # to initialize Heat template based systems. |
| 159 | yum install -y jq |
| 160 | |
| 161 | # Used by lftools scripts to parse XML |
| 162 | yum install -y xmlstarlet |
| 163 | |
| 164 | # Haskel Packages |
| 165 | # Cabal update fails on a 1G system so workaround that with a swap file |
| 166 | dd if=/dev/zero of=/tmp/swap bs=1M count=1024 |
| 167 | mkswap /tmp/swap |
| 168 | swapon /tmp/swap |
| 169 | |
| 170 | yum install -y cabal-install |
| 171 | cabal update |
| 172 | cabal install "Cabal<1.18" # Pull Cabal version that is capable of building shellcheck |
| 173 | cabal install --bindir=/usr/local/bin "shellcheck-0.4.6" # Pin shellcheck version |
| 174 | |
| 175 | # --- END LFTOOLS DEPS |
| 176 | ###################### |
| 177 | |
| 178 | # install haveged to avoid low entropy rejecting ssh connections |
| 179 | yum install -y haveged |
| 180 | systemctl enable haveged.service |
| 181 | } |
| 182 | |
| 183 | ubuntu_systems() { |
| 184 | # Ignore SELinux since slamming that onto Ubuntu leads to |
| 185 | # frustration |
| 186 | |
| 187 | # Allow jenkins access to update-alternatives command to switch java version |
| 188 | cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults |
Zack Williams | 52b4cb6 | 2019-08-30 08:09:07 -0700 | [diff] [blame] | 189 | Cmnd_Alias UALTS = /usr/sbin/update-alternatives, /usr/sbin/update-java-alternatives |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 190 | Defaults:jenkins !requiretty |
Zack Williams | 52b4cb6 | 2019-08-30 08:09:07 -0700 | [diff] [blame] | 191 | jenkins ALL = NOPASSWD: UALTS |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 192 | EOF |
| 193 | |
| 194 | export DEBIAN_FRONTEND=noninteractive |
| 195 | cat <<EOF >> /etc/apt/apt.conf |
| 196 | APT { |
| 197 | Get { |
| 198 | Assume-Yes "true"; |
| 199 | allow-change-held-packages "true"; |
| 200 | allow-downgrades "true"; |
| 201 | allow-remove-essential "true"; |
| 202 | }; |
| 203 | }; |
| 204 | |
| 205 | Dpkg::Options { |
| 206 | "--force-confdef"; |
| 207 | "--force-confold"; |
| 208 | }; |
| 209 | |
| 210 | EOF |
| 211 | |
| 212 | # Add hostname to /etc/hosts to fix 'unable to resolve host' issue with sudo |
| 213 | sed -i "/127.0.0.1/s/$/ $(hostname)/" /etc/hosts |
| 214 | |
| 215 | echo "---> Updating operating system" |
| 216 | |
Zack Williams | 852578f | 2018-04-12 14:03:57 -0700 | [diff] [blame] | 217 | # Change made 2018-07-09 by zdw |
| 218 | # per discussion on #lf-releng, the upstream Ubuntu image changed to be |
| 219 | # missing add-apt-repository, so the next command failed. |
| 220 | apt-get update -m |
| 221 | apt-get install -y software-properties-common |
| 222 | |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 223 | # add additional repositories |
Zack Williams | 852578f | 2018-04-12 14:03:57 -0700 | [diff] [blame] | 224 | add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse" |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 225 | |
| 226 | echo "---> Installing base packages" |
| 227 | apt-get clean |
| 228 | apt-get update -m |
| 229 | apt-get upgrade -m |
| 230 | apt-get dist-upgrade -m |
| 231 | |
Andy Bavier | b781c4c | 2018-09-20 08:16:52 -0700 | [diff] [blame] | 232 | apt-get update -m |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 233 | ensure_ubuntu_install unzip xz-utils puppet git libxml-xpath-perl |
| 234 | |
Zack Williams | 1b00d40 | 2019-07-22 17:17:10 -0700 | [diff] [blame] | 235 | # Deprecated - updating to corretto Java distro, 2019-07-22, zdw |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 236 | # install Java 7 |
Zack Williams | 1b00d40 | 2019-07-22 17:17:10 -0700 | [diff] [blame] | 237 | # echo "---> Configuring OpenJDK" |
| 238 | # FACTER_OSVER=$(/usr/bin/facter operatingsystemrelease) |
| 239 | # case "$FACTER_OSVER" in |
| 240 | # 14.04) |
| 241 | # apt-get install openjdk-7-jdk |
| 242 | # # make jdk8 available |
| 243 | # add-apt-repository -y ppa:openjdk-r/ppa |
| 244 | # apt-get update |
| 245 | # # We need to force openjdk-8-jdk to install |
| 246 | # apt-get install openjdk-8-jdk |
| 247 | # # make sure that we still default to openjdk 7 |
| 248 | # update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java |
| 249 | # update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac |
| 250 | # ;; |
| 251 | # 16.04) |
| 252 | # apt-get install openjdk-8-jdk |
| 253 | # ;; |
| 254 | # *) |
| 255 | # echo "---> Unknown Ubuntu version $FACTER_OSVER" |
| 256 | # exit 1 |
| 257 | # ;; |
| 258 | # esac |
| 259 | ######################## |
| 260 | |
| 261 | echo "---> Configuring Corretto JDK Distribution" |
| 262 | # instructions: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/generic-linux-install.html |
| 263 | # install prereqs |
| 264 | apt-get install java-common |
| 265 | |
| 266 | # install Java8 |
| 267 | CORRETTO_JAVA8_VERSION="8.222.10-1" |
| 268 | CORRETTO_JAVA8_SHA256SUM="e5fd6c6f2d1a1fc5e6926f7a543e67ad0f0e0389ddc5d2deb5890bdeb21ea445" |
| 269 | curl -L -o /tmp/corretto_java8.deb "https://d3pxv6yz143wms.cloudfront.net/$(echo $CORRETTO_JAVA8_VERSION | tr - .)/java-1.8.0-amazon-corretto-jdk_${CORRETTO_JAVA8_VERSION}_amd64.deb" |
| 270 | echo "$CORRETTO_JAVA8_SHA256SUM /tmp/corretto_java8.deb" | sha256sum -c - |
| 271 | dpkg -i /tmp/corretto_java8.deb |
| 272 | |
| 273 | # install Java11 |
| 274 | CORRETTO_JAVA11_VERSION="11.0.4.11-1" |
| 275 | CORRETTO_JAVA11_SHA256SUM="f47c77f8f9ee5a80804765236c11dc749d351d3b8f57186c6e6b58a6c4019d3e" |
| 276 | curl -L -o /tmp/corretto_java11.deb "https://d3pxv6yz143wms.cloudfront.net/$(echo $CORRETTO_JAVA11_VERSION | tr - .)/java-11-amazon-corretto-jdk_${CORRETTO_JAVA11_VERSION}_amd64.deb" |
| 277 | echo "$CORRETTO_JAVA11_SHA256SUM /tmp/corretto_java11.deb" | sha256sum -c - |
| 278 | dpkg -i /tmp/corretto_java11.deb |
| 279 | |
Zack Williams | 52b4cb6 | 2019-08-30 08:09:07 -0700 | [diff] [blame] | 280 | # Fix corretto 11 lack of jinfo that prevents update-java-alternatives from working |
| 281 | # Upstream fix not integrated yet: https://github.com/corretto/corretto-11/pull/27 |
| 282 | cat <<EOF >/usr/lib/jvm/.java-11-amazon-corretto.jinfo |
| 283 | name=java-11-amazon-corretto |
| 284 | alias=java-11-amazon-corretto |
| 285 | priority=11100002 |
| 286 | section=main |
| 287 | |
| 288 | jdk java /usr/lib/jvm/java-11-amazon-corretto/bin/java |
| 289 | jdk keytool /usr/lib/jvm/java-11-amazon-corretto/bin/keytool |
| 290 | jdk rmid /usr/lib/jvm/java-11-amazon-corretto/bin/rmid |
| 291 | jdk rmiregistry /usr/lib/jvm/java-11-amazon-corretto/bin/rmiregistry |
| 292 | jdk jjs /usr/lib/jvm/java-11-amazon-corretto/bin/jjs |
| 293 | jdk pack200 /usr/lib/jvm/java-11-amazon-corretto/bin/pack200 |
| 294 | jdk unpack200 /usr/lib/jvm/java-11-amazon-corretto/bin/unpack200 |
| 295 | jdk javac /usr/lib/jvm/java-11-amazon-corretto/bin/javac |
| 296 | jdk jaotc /usr/lib/jvm/java-11-amazon-corretto/bin/jaotc |
| 297 | jdk jlink /usr/lib/jvm/java-11-amazon-corretto/bin/jlink |
| 298 | jdk jmod /usr/lib/jvm/java-11-amazon-corretto/bin/jmod |
| 299 | jdk jhsdb /usr/lib/jvm/java-11-amazon-corretto/bin/jhsdb |
| 300 | jdk jar /usr/lib/jvm/java-11-amazon-corretto/bin/jar |
| 301 | jdk jarsigner /usr/lib/jvm/java-11-amazon-corretto/bin/jarsigner |
| 302 | jdk javadoc /usr/lib/jvm/java-11-amazon-corretto/bin/javadoc |
| 303 | jdk javap /usr/lib/jvm/java-11-amazon-corretto/bin/javap |
| 304 | jdk jcmd /usr/lib/jvm/java-11-amazon-corretto/bin/jcmd |
| 305 | jdk jconsole /usr/lib/jvm/java-11-amazon-corretto/bin/jconsole |
| 306 | jdk jdb /usr/lib/jvm/java-11-amazon-corretto/bin/jdb |
| 307 | jdk jdeps /usr/lib/jvm/java-11-amazon-corretto/bin/jdeps |
| 308 | jdk jdeprscan /usr/lib/jvm/java-11-amazon-corretto/bin/jdeprscan |
| 309 | jdk jimage /usr/lib/jvm/java-11-amazon-corretto/bin/jimage |
| 310 | jdk jinfo /usr/lib/jvm/java-11-amazon-corretto/bin/jinfo |
| 311 | jdk jmap /usr/lib/jvm/java-11-amazon-corretto/bin/jmap |
| 312 | jdk jps /usr/lib/jvm/java-11-amazon-corretto/bin/jps |
| 313 | jdk jrunscript /usr/lib/jvm/java-11-amazon-corretto/bin/jrunscript |
| 314 | jdk jshell /usr/lib/jvm/java-11-amazon-corretto/bin/jshell |
| 315 | jdk jstack /usr/lib/jvm/java-11-amazon-corretto/bin/jstack |
| 316 | jdk jstat /usr/lib/jvm/java-11-amazon-corretto/bin/jstat |
| 317 | jdk jstatd /usr/lib/jvm/java-11-amazon-corretto/bin/jstatd |
| 318 | jdk rmic /usr/lib/jvm/java-11-amazon-corretto/bin/rmic |
| 319 | jdk serialver /usr/lib/jvm/java-11-amazon-corretto/bin/serialver |
| 320 | |
| 321 | EOF |
| 322 | |
Zack Williams | 1b00d40 | 2019-07-22 17:17:10 -0700 | [diff] [blame] | 323 | # Set default version to be Java8 |
Zack Williams | 52b4cb6 | 2019-08-30 08:09:07 -0700 | [diff] [blame] | 324 | update-java-alternatives --set java-1.8.0-amazon-corretto |
Zack Williams | 1b00d40 | 2019-07-22 17:17:10 -0700 | [diff] [blame] | 325 | |
| 326 | # Set default version to be Java11 |
Zack Williams | 52b4cb6 | 2019-08-30 08:09:07 -0700 | [diff] [blame] | 327 | # update-java-alternatives --set java-11-amazon-corretto |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 328 | |
| 329 | ######################## |
| 330 | # --- START LFTOOLS DEPS |
| 331 | |
| 332 | # Used by various scripts to push patches to Gerrit |
| 333 | ensure_ubuntu_install git-review |
| 334 | |
| 335 | # Needed to parse OpenStack commands used by opendaylight-infra stack commands |
| 336 | # to initialize Heat template based systems. |
| 337 | ensure_ubuntu_install jq |
| 338 | |
| 339 | # Used by lftools scripts to parse XML |
| 340 | ensure_ubuntu_install xmlstarlet |
| 341 | |
Zack Williams | ae52f5e | 2018-04-12 11:47:57 -0700 | [diff] [blame] | 342 | # Change made by zdw on 2018-04-12 |
| 343 | # hackage.haskell.org was down, talked to zxiiro on #lf-releng and he recommended |
| 344 | # pulling down the packages in a way similar to this ansible role, rather than using cabal: |
| 345 | # https://github.com/lfit/ansible-roles-shellcheck-install/blob/master/tasks/main.yml |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 346 | |
Zack Williams | 1b00d40 | 2019-07-22 17:17:10 -0700 | [diff] [blame] | 347 | SHELLCHECK_VERSION="v0.6.0" |
| 348 | SHELLCHECK_SHA256SUM="95c7d6e8320d285a9f026b5241f48f1c02d225a1b08908660e8b84e58e9c7dce" |
Zack Williams | ae52f5e | 2018-04-12 11:47:57 -0700 | [diff] [blame] | 349 | curl -L -o /tmp/shellcheck.tar.xz https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz |
| 350 | echo "$SHELLCHECK_SHA256SUM /tmp/shellcheck.tar.xz" | sha256sum -c - |
| 351 | pushd /tmp |
| 352 | tar -xJvf shellcheck.tar.xz |
| 353 | cp shellcheck-${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/shellcheck |
| 354 | chmod a+x /usr/local/bin/shellcheck |
| 355 | popd |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 356 | |
| 357 | # --- END LFTOOLS DEPS |
| 358 | ###################### |
| 359 | |
| 360 | # install haveged to avoid low entropy rejecting ssh connections |
| 361 | apt-get install haveged |
| 362 | update-rc.d haveged defaults |
| 363 | |
| 364 | # disable unattended upgrades & daily updates |
| 365 | echo '---> Disabling automatic daily upgrades' |
| 366 | sed -ine 's/"1"/"0"/g' /etc/apt/apt.conf.d/10periodic |
| 367 | echo 'APT::Periodic::Unattended-Upgrade "0";' >> /etc/apt/apt.conf.d/10periodic |
| 368 | } |
| 369 | |
| 370 | all_systems() { |
| 371 | # Do any Distro specific installations here |
| 372 | echo "Checking distribution" |
| 373 | FACTER_OS=$(/usr/bin/facter operatingsystem) |
| 374 | case "$FACTER_OS" in |
| 375 | *) |
| 376 | echo "---> $FACTER_OS found" |
| 377 | echo "No extra steps for $FACTER_OS" |
| 378 | ;; |
| 379 | esac |
| 380 | } |
| 381 | |
| 382 | echo "---> Attempting to detect OS" |
| 383 | # upstream cloud images use the distro name as the initial user |
| 384 | ORIGIN=$(if [ -e /etc/redhat-release ] |
| 385 | then |
| 386 | echo redhat |
| 387 | else |
| 388 | echo ubuntu |
| 389 | fi) |
| 390 | #ORIGIN=$(logname) |
| 391 | |
| 392 | case "${ORIGIN}" in |
| 393 | fedora|centos|redhat) |
| 394 | echo "---> RH type system detected" |
| 395 | rh_systems |
| 396 | ;; |
| 397 | ubuntu) |
| 398 | echo "---> Ubuntu system detected" |
| 399 | ubuntu_systems |
| 400 | ;; |
| 401 | *) |
| 402 | # Kill the build for unhandled distributions |
| 403 | echo "---> Unknown operating system" 1>&2 |
| 404 | exit 1 |
| 405 | ;; |
| 406 | esac |
| 407 | |
| 408 | # execute steps for all systems |
| 409 | all_systems |