diff --git a/elements/base/install.d/99-dkms b/elements/base/install.d/99-dkms index 56e8e1601..44b2d4ce0 100755 --- a/elements/base/install.d/99-dkms +++ b/elements/base/install.d/99-dkms @@ -1,2 +1,2 @@ -#!/bin/sh +#!/bin/bash install-packages dkms diff --git a/elements/cache-url/bin/cache-url b/elements/cache-url/bin/cache-url index e1f953669..312cbe5ed 100755 --- a/elements/cache-url/bin/cache-url +++ b/elements/cache-url/bin/cache-url @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2012 Hewlett-Packard Development Company, L.P. # All Rights Reserved. diff --git a/elements/config-applier/install.d/20-config-applier b/elements/config-applier/install.d/20-config-applier index c7e863df6..1b153fcf9 100755 --- a/elements/config-applier/install.d/20-config-applier +++ b/elements/config-applier/install.d/20-config-applier @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash home=$(dirname $0) set -uex diff --git a/elements/deploy-kexec/install.d/53-install-kexec b/elements/deploy-kexec/install.d/53-install-kexec index 19e430e53..1a26ff78a 100755 --- a/elements/deploy-kexec/install.d/53-install-kexec +++ b/elements/deploy-kexec/install.d/53-install-kexec @@ -1,2 +1,2 @@ -#!/bin/sh +#!/bin/bash install-packages kexec-tools diff --git a/elements/deploy/install.d/51-install-tgt b/elements/deploy/install.d/51-install-tgt index dc17f90ab..9c36dcaeb 100755 --- a/elements/deploy/install.d/51-install-tgt +++ b/elements/deploy/install.d/51-install-tgt @@ -1,2 +1,2 @@ -#!/bin/sh +#!/bin/bash install-packages tgt diff --git a/elements/deploy/install.d/52-install-busybox b/elements/deploy/install.d/52-install-busybox index 356188ae5..fdecb5dd3 100755 --- a/elements/deploy/install.d/52-install-busybox +++ b/elements/deploy/install.d/52-install-busybox @@ -1,2 +1,2 @@ -#!/bin/sh +#!/bin/bash install-packages busybox diff --git a/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces b/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces index a9ef2afa9..89ddcea82 100755 --- a/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces +++ b/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces @@ -1,4 +1,6 @@ -#!/bin/sh -x +#!/bin/bash + +set -x # Prepare the target system for regenerating /etc/network/interfaces # on its first boot. diff --git a/elements/dkms/post-install.d/99-dkms b/elements/dkms/post-install.d/99-dkms index 02ff606fe..1e3773a6b 100755 --- a/elements/dkms/post-install.d/99-dkms +++ b/elements/dkms/post-install.d/99-dkms @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Trigger a run of dkms for all the modules installed # to ensure we have valid modules build for all. diff --git a/elements/dpkg/bin/install-packages b/elements/dpkg/bin/install-packages index 35dc9d69d..d5ce2306f 100644 --- a/elements/dpkg/bin/install-packages +++ b/elements/dpkg/bin/install-packages @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2012 Hewlett-Packard Development Company, L.P. # All Rights Reserved. diff --git a/elements/dpkg/pre-install.d/00-disable-apt-recommends b/elements/dpkg/pre-install.d/00-disable-apt-recommends index 36c310cfa..8221e4422 100755 --- a/elements/dpkg/pre-install.d/00-disable-apt-recommends +++ b/elements/dpkg/pre-install.d/00-disable-apt-recommends @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Prevent apt from installing recommended packages dd of=/etc/apt/apt.conf.d/95disable-recommends << _EOF_ diff --git a/elements/dpkg/pre-install.d/01-install-bin b/elements/dpkg/pre-install.d/01-install-bin index 555bc782b..651085e1a 100755 --- a/elements/dpkg/pre-install.d/01-install-bin +++ b/elements/dpkg/pre-install.d/01-install-bin @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash install -m 0755 -o root -g root $(dirname $0)/../bin/* /usr/local/bin diff --git a/elements/dracut-network/install.d/11-patch-dracut b/elements/dracut-network/install.d/11-patch-dracut index c15bd7efe..cee09c957 100755 --- a/elements/dracut-network/install.d/11-patch-dracut +++ b/elements/dracut-network/install.d/11-patch-dracut @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # If the patch doesn't apply just do nothing. This patch fixes a small # issue in the script that writes the network configuration files from diff --git a/elements/fedora/bin/install-packages b/elements/fedora/bin/install-packages index d353d2c9f..b2ea563c3 100644 --- a/elements/fedora/bin/install-packages +++ b/elements/fedora/bin/install-packages @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2012 Hewlett-Packard Development Company, L.P. # All Rights Reserved. diff --git a/elements/ramdisk/cleanup.d/99-extract-ramdisk-files b/elements/ramdisk/cleanup.d/99-extract-ramdisk-files index a1b258c05..aa6de6208 100755 --- a/elements/ramdisk/cleanup.d/99-extract-ramdisk-files +++ b/elements/ramdisk/cleanup.d/99-extract-ramdisk-files @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e set -x diff --git a/elements/rhel/bin/install-packages b/elements/rhel/bin/install-packages index d65b4c43f..f3f6548c9 100644 --- a/elements/rhel/bin/install-packages +++ b/elements/rhel/bin/install-packages @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain diff --git a/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf b/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf index 5e3f2cedb..78e53e18b 100755 --- a/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf +++ b/elements/rpm-distro/post-install.d/06-network-config-nonzeroconf @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # zeroconf should not be activated or it will add a 169.254.0.0 # route. The route will interfere with access to the nova metadata diff --git a/elements/rpm-distro/pre-install.d/01-install-bin b/elements/rpm-distro/pre-install.d/01-install-bin index 555bc782b..651085e1a 100755 --- a/elements/rpm-distro/pre-install.d/01-install-bin +++ b/elements/rpm-distro/pre-install.d/01-install-bin @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash install -m 0755 -o root -g root $(dirname $0)/../bin/* /usr/local/bin diff --git a/elements/rpm-distro/pre-install.d/01-override-yum-arch b/elements/rpm-distro/pre-install.d/01-override-yum-arch index bf0c6ed84..0e4ca66f4 100755 --- a/elements/rpm-distro/pre-install.d/01-override-yum-arch +++ b/elements/rpm-distro/pre-install.d/01-override-yum-arch @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash if [ "i386" = "$ARCH" ]; then basearch=i386 diff --git a/elements/selinux-permissive/install.d/11-selinux-permissive b/elements/selinux-permissive/install.d/11-selinux-permissive index 40255cf2b..a08f9bb17 100755 --- a/elements/selinux-permissive/install.d/11-selinux-permissive +++ b/elements/selinux-permissive/install.d/11-selinux-permissive @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo "SELINUX=permissive" > /etc/selinux/config echo "SELINUXTYPE=targeted" >> /etc/selinux/config diff --git a/elements/serial-console/install.d/20-stty b/elements/serial-console/install.d/20-stty index f8fa8e5fe..ca91e7df7 100755 --- a/elements/serial-console/install.d/20-stty +++ b/elements/serial-console/install.d/20-stty @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash home=$(dirname $0) set -uex diff --git a/elements/source-repositories/install.d/01-source-repositories b/elements/source-repositories/install.d/01-source-repositories index 1f9740a88..4ef606a75 100755 --- a/elements/source-repositories/install.d/01-source-repositories +++ b/elements/source-repositories/install.d/01-source-repositories @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -uex diff --git a/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index b/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index index f1c24647f..c785802b8 100755 --- a/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index +++ b/elements/ubuntu/pre-install.d/00-remove-apt-xapian-index @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This package is broken and causes real issues on update: # https://bugs.launchpad.net/ubuntu/+source/apt-xapian-index/+bug/1227420 apt-get --yes remove apt-xapian-index || : diff --git a/elements/vm/finalise.d/52-force-text-mode-console b/elements/vm/finalise.d/52-force-text-mode-console index ebc1a1363..a647e00df 100755 --- a/elements/vm/finalise.d/52-force-text-mode-console +++ b/elements/vm/finalise.d/52-force-text-mode-console @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e