From afd1250a8fcde3a46563538e361d825b62672034 Mon Sep 17 00:00:00 2001 From: Masahito Yoshida Date: Fri, 19 Dec 2014 02:26:21 +0900 Subject: [PATCH] add "set -o pipefail". --- README.md | 1 + add-book.sh | 2 ++ anti-shellshock/xexecscript.d/anti-shellshock.sh | 1 + apache-tools/xexecscript.d/apache-tools.sh | 1 + apache/xexecscript.d/apache.sh | 1 + cassandra.dsc11/xexecscript.d/cassandra.sh | 1 + cassandra.dsc12/xexecscript.d/cassandra.sh | 1 + chef/xexecscript.d/chef.sh | 1 + docker-io/xexecscript.d/docker-io.sh | 1 + drbd84/xexecscript.d/drbd84.sh | 1 + elrepo-release/xexecscript.d/elrepo-release.sh | 1 + enable-keepcache/xexecscript.d/enable-keepcache.sh | 1 + epel-release/xexecscript.d/epel-release.sh | 1 + haproxy/xexecscript.d/haproxy.sh | 1 + hold-releasever.hold-baseurl/xexecscript.d/hold-baseurl.sh | 1 + hold-releasever/xexecscript.d/hold-releasever.sh | 1 + hop5-repo/xexecscript.d/hop5-repo.sh | 1 + hping/xexecscript.d/hping.sh | 1 + iproute2.netns/xexecscript.d/iproute2.netns.sh | 1 + java-1.6.0-openjdk/xexecscript.d/java-1.6.0-openjdk.sh | 1 + jenkins.core/xexecscript.d/build-tools.sh | 1 + jenkins.master/xexecscript.d/jenkins-master.sh | 1 + jenkins.master/xexecscript.d/jenkins-plugin.sh | 1 + jenkins.slave/xexecscript.d/setup_jenkins-slave.sh | 1 + jre6/xexecscript.d/jre6.sh | 1 + kernel-ml-aufs/xexecscript.d/kernel-ml-aufs.sh | 1 + kernel-ml/xexecscript.d/kernel-ml.sh | 1 + libcgroup/xexecscript.d/libcgroup.sh | 1 + libyaml/xexecscript.d/libyaml.sh | 1 + lxc/xexecscript.d/lxc.sh | 1 + nginx/xexecscript.d/nginx.sh | 1 + ngrep/xexecscript.d/ngrep.sh | 1 + ntp.enable/xexecscript.d/enable-ntp.sh | 1 + ntp/xexecscript.d/ntp.sh | 1 + openvnet.common/xexecscript.d/openvnet.common.sh | 1 + openvnet.repo/xexecscript.d/openvnet.repo.sh | 1 + openvswitch/xexecscript.d/openvswitch.sh | 1 + openvz.vzkernel/xexecscript.d/vzkernel.sh | 1 + packer/xexecscript.d/packer.sh | 1 + pipework/xexecscript.d/pipework.sh | 1 + postfix.disable/xexecscript.d/postfix.disable.sh | 1 + qemu-guest-agent/xexecscript.d/qemu-guest-agent.sh | 1 + rabbitmq-server/xexecscript.d/rabbitmq-server.sh | 1 + rdo-release/xexecscript.d/rdo-release.sh | 1 + redis/xexecscript.d/redis.sh | 1 + rpmbuild/xexecscript.d/rpmbuild.sh | 1 + s3tools-latest/xexecscript.d/s3tools.sh | 1 + s3tools/xexecscript.d/s3tools.sh | 1 + sensu.common/xexecscript.d/sensu.common.sh | 1 + serf/xexecscript.d/serf.sh | 1 + sshd_config/xexecscript.d/sshd_config.sh | 1 + td-agent/xexecscript.d/td-agent.sh | 1 + ucarp/xexecscript.d/ucarp.sh | 1 + vagrant.guest.account/xexecscript.d/vagrant.guest.account.sh | 1 + vagrant/xexecscript.d/vagrant.sh | 1 + virtualbox-4.2/xexecscript.d/virtualbox.sh | 1 + virtualbox-4.3/xexecscript.d/virtualbox.sh | 1 + virtualbox.common/firstboot.sh | 1 + virtualbox.common/xexecscript.d/virtualbox.common.sh | 1 + .../xexecscript.d/virtualbox.guest.additions.sh | 1 + virtualbox.repo/xexecscript.d/virtualbox.repo.sh | 1 + vmware-tools.repo/xexecscript.d/vmware-tools.repo.sh | 1 + zabbix-jp.agent18/xexecscript.d/zabbix-agent.sh | 1 + zabbix-jp.repo/xexecscript.d/zabbix-repo.sh | 1 + zabbix-jp.server18/xexecscript.d/zabbix-jp-server.sh | 1 + zabbix-jp.web18/xexecscript.d/zabbix-jp-web.sh | 1 + zabbix18.agent/xexecscript.d/zabbix-agent.sh | 1 + zabbix18.repo/xexecscript.d/zabbix-repo.sh | 1 + zabbix18.server/xexecscript.d/zabbix-server.sh | 1 + zabbix18.web/xexecscript.d/zabbix-web.sh | 1 + zfs-on-linux/xexecscript.d/zfs-on-linux.sh | 1 + 71 files changed, 72 insertions(+) diff --git a/README.md b/README.md index 7030748..c83cf5f 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ untitled/xexecscript.d/untitled.sh is a sample execscript. # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/add-book.sh b/add-book.sh index 649db41..9129bdb 100755 --- a/add-book.sh +++ b/add-book.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare abs_dirname=${BASH_SOURCE[0]%/*}/ declare name=$1 @@ -34,6 +35,7 @@ cat <<'TEMPLATE' > xexecscript.d/${name}.sh # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/anti-shellshock/xexecscript.d/anti-shellshock.sh b/anti-shellshock/xexecscript.d/anti-shellshock.sh index 28a4068..a930cee 100755 --- a/anti-shellshock/xexecscript.d/anti-shellshock.sh +++ b/anti-shellshock/xexecscript.d/anti-shellshock.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/apache-tools/xexecscript.d/apache-tools.sh b/apache-tools/xexecscript.d/apache-tools.sh index e233eae..4ab28d5 100755 --- a/apache-tools/xexecscript.d/apache-tools.sh +++ b/apache-tools/xexecscript.d/apache-tools.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/apache/xexecscript.d/apache.sh b/apache/xexecscript.d/apache.sh index e34c8d9..36e5e8c 100755 --- a/apache/xexecscript.d/apache.sh +++ b/apache/xexecscript.d/apache.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/cassandra.dsc11/xexecscript.d/cassandra.sh b/cassandra.dsc11/xexecscript.d/cassandra.sh index 34ea14b..827e4ce 100755 --- a/cassandra.dsc11/xexecscript.d/cassandra.sh +++ b/cassandra.dsc11/xexecscript.d/cassandra.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/cassandra.dsc12/xexecscript.d/cassandra.sh b/cassandra.dsc12/xexecscript.d/cassandra.sh index 7d3e114..80a3705 100755 --- a/cassandra.dsc12/xexecscript.d/cassandra.sh +++ b/cassandra.dsc12/xexecscript.d/cassandra.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/chef/xexecscript.d/chef.sh b/chef/xexecscript.d/chef.sh index 7b2fdf1..fc64f52 100755 --- a/chef/xexecscript.d/chef.sh +++ b/chef/xexecscript.d/chef.sh @@ -7,6 +7,7 @@ # http://www.opscode.com/chef/install/ # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/docker-io/xexecscript.d/docker-io.sh b/docker-io/xexecscript.d/docker-io.sh index 33b702c..6966e5c 100755 --- a/docker-io/xexecscript.d/docker-io.sh +++ b/docker-io/xexecscript.d/docker-io.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/drbd84/xexecscript.d/drbd84.sh b/drbd84/xexecscript.d/drbd84.sh index 2a70d31..7adc8da 100755 --- a/drbd84/xexecscript.d/drbd84.sh +++ b/drbd84/xexecscript.d/drbd84.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/elrepo-release/xexecscript.d/elrepo-release.sh b/elrepo-release/xexecscript.d/elrepo-release.sh index 8d23d86..c138c5d 100755 --- a/elrepo-release/xexecscript.d/elrepo-release.sh +++ b/elrepo-release/xexecscript.d/elrepo-release.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/enable-keepcache/xexecscript.d/enable-keepcache.sh b/enable-keepcache/xexecscript.d/enable-keepcache.sh index 1361f54..fb0ec8b 100755 --- a/enable-keepcache/xexecscript.d/enable-keepcache.sh +++ b/enable-keepcache/xexecscript.d/enable-keepcache.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail chroot $1 $SHELL -ex <<'EOS' sed -i 's,^keepcache=.*,keepcache=1,' /etc/yum.conf diff --git a/epel-release/xexecscript.d/epel-release.sh b/epel-release/xexecscript.d/epel-release.sh index 9c22f92..b70ea78 100755 --- a/epel-release/xexecscript.d/epel-release.sh +++ b/epel-release/xexecscript.d/epel-release.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/haproxy/xexecscript.d/haproxy.sh b/haproxy/xexecscript.d/haproxy.sh index 27d3497..49f9289 100755 --- a/haproxy/xexecscript.d/haproxy.sh +++ b/haproxy/xexecscript.d/haproxy.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/hold-releasever.hold-baseurl/xexecscript.d/hold-baseurl.sh b/hold-releasever.hold-baseurl/xexecscript.d/hold-baseurl.sh index 28cba2c..aedbec5 100755 --- a/hold-releasever.hold-baseurl/xexecscript.d/hold-baseurl.sh +++ b/hold-releasever.hold-baseurl/xexecscript.d/hold-baseurl.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/hold-releasever/xexecscript.d/hold-releasever.sh b/hold-releasever/xexecscript.d/hold-releasever.sh index 8cd2831..44c0ac2 100755 --- a/hold-releasever/xexecscript.d/hold-releasever.sh +++ b/hold-releasever/xexecscript.d/hold-releasever.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/hop5-repo/xexecscript.d/hop5-repo.sh b/hop5-repo/xexecscript.d/hop5-repo.sh index eae5914..33a4cf9 100755 --- a/hop5-repo/xexecscript.d/hop5-repo.sh +++ b/hop5-repo/xexecscript.d/hop5-repo.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/hping/xexecscript.d/hping.sh b/hping/xexecscript.d/hping.sh index 40a3720..d36016a 100755 --- a/hping/xexecscript.d/hping.sh +++ b/hping/xexecscript.d/hping.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/iproute2.netns/xexecscript.d/iproute2.netns.sh b/iproute2.netns/xexecscript.d/iproute2.netns.sh index ca671dd..1f86893 100755 --- a/iproute2.netns/xexecscript.d/iproute2.netns.sh +++ b/iproute2.netns/xexecscript.d/iproute2.netns.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/java-1.6.0-openjdk/xexecscript.d/java-1.6.0-openjdk.sh b/java-1.6.0-openjdk/xexecscript.d/java-1.6.0-openjdk.sh index 18143d3..e3f1300 100755 --- a/java-1.6.0-openjdk/xexecscript.d/java-1.6.0-openjdk.sh +++ b/java-1.6.0-openjdk/xexecscript.d/java-1.6.0-openjdk.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/jenkins.core/xexecscript.d/build-tools.sh b/jenkins.core/xexecscript.d/build-tools.sh index ba2bf73..940cb71 100755 --- a/jenkins.core/xexecscript.d/build-tools.sh +++ b/jenkins.core/xexecscript.d/build-tools.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/jenkins.master/xexecscript.d/jenkins-master.sh b/jenkins.master/xexecscript.d/jenkins-master.sh index 05fe3ea..4ad0ac8 100755 --- a/jenkins.master/xexecscript.d/jenkins-master.sh +++ b/jenkins.master/xexecscript.d/jenkins-master.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/jenkins.master/xexecscript.d/jenkins-plugin.sh b/jenkins.master/xexecscript.d/jenkins-plugin.sh index 953f5a1..cf898ad 100755 --- a/jenkins.master/xexecscript.d/jenkins-plugin.sh +++ b/jenkins.master/xexecscript.d/jenkins-plugin.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/jenkins.slave/xexecscript.d/setup_jenkins-slave.sh b/jenkins.slave/xexecscript.d/setup_jenkins-slave.sh index a8d7054..44b6fec 100755 --- a/jenkins.slave/xexecscript.d/setup_jenkins-slave.sh +++ b/jenkins.slave/xexecscript.d/setup_jenkins-slave.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail # jenkins:x:498:497:Jenkins Continuous Build server:/var/lib/jenkins:/bin/bash # jenkins:x:497 diff --git a/jre6/xexecscript.d/jre6.sh b/jre6/xexecscript.d/jre6.sh index 7285926..7840aa6 100755 --- a/jre6/xexecscript.d/jre6.sh +++ b/jre6/xexecscript.d/jre6.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/kernel-ml-aufs/xexecscript.d/kernel-ml-aufs.sh b/kernel-ml-aufs/xexecscript.d/kernel-ml-aufs.sh index 8c762db..4672048 100755 --- a/kernel-ml-aufs/xexecscript.d/kernel-ml-aufs.sh +++ b/kernel-ml-aufs/xexecscript.d/kernel-ml-aufs.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/kernel-ml/xexecscript.d/kernel-ml.sh b/kernel-ml/xexecscript.d/kernel-ml.sh index 284feb2..d8951af 100755 --- a/kernel-ml/xexecscript.d/kernel-ml.sh +++ b/kernel-ml/xexecscript.d/kernel-ml.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/libcgroup/xexecscript.d/libcgroup.sh b/libcgroup/xexecscript.d/libcgroup.sh index 173e91e..8e68e50 100755 --- a/libcgroup/xexecscript.d/libcgroup.sh +++ b/libcgroup/xexecscript.d/libcgroup.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/libyaml/xexecscript.d/libyaml.sh b/libyaml/xexecscript.d/libyaml.sh index b8002f2..a422dd6 100755 --- a/libyaml/xexecscript.d/libyaml.sh +++ b/libyaml/xexecscript.d/libyaml.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/lxc/xexecscript.d/lxc.sh b/lxc/xexecscript.d/lxc.sh index 9a9c42d..b20f7ba 100755 --- a/lxc/xexecscript.d/lxc.sh +++ b/lxc/xexecscript.d/lxc.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/nginx/xexecscript.d/nginx.sh b/nginx/xexecscript.d/nginx.sh index 5f780df..dba2e52 100755 --- a/nginx/xexecscript.d/nginx.sh +++ b/nginx/xexecscript.d/nginx.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/ngrep/xexecscript.d/ngrep.sh b/ngrep/xexecscript.d/ngrep.sh index 8738e83..d24ec69 100755 --- a/ngrep/xexecscript.d/ngrep.sh +++ b/ngrep/xexecscript.d/ngrep.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/ntp.enable/xexecscript.d/enable-ntp.sh b/ntp.enable/xexecscript.d/enable-ntp.sh index 59c80d0..ae87f2a 100755 --- a/ntp.enable/xexecscript.d/enable-ntp.sh +++ b/ntp.enable/xexecscript.d/enable-ntp.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/ntp/xexecscript.d/ntp.sh b/ntp/xexecscript.d/ntp.sh index 2bea2c9..e133d2c 100755 --- a/ntp/xexecscript.d/ntp.sh +++ b/ntp/xexecscript.d/ntp.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/openvnet.common/xexecscript.d/openvnet.common.sh b/openvnet.common/xexecscript.d/openvnet.common.sh index 7db7cce..106beae 100755 --- a/openvnet.common/xexecscript.d/openvnet.common.sh +++ b/openvnet.common/xexecscript.d/openvnet.common.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/openvnet.repo/xexecscript.d/openvnet.repo.sh b/openvnet.repo/xexecscript.d/openvnet.repo.sh index 7b151ad..7b16501 100755 --- a/openvnet.repo/xexecscript.d/openvnet.repo.sh +++ b/openvnet.repo/xexecscript.d/openvnet.repo.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/openvswitch/xexecscript.d/openvswitch.sh b/openvswitch/xexecscript.d/openvswitch.sh index 57868f2..db776fb 100755 --- a/openvswitch/xexecscript.d/openvswitch.sh +++ b/openvswitch/xexecscript.d/openvswitch.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/openvz.vzkernel/xexecscript.d/vzkernel.sh b/openvz.vzkernel/xexecscript.d/vzkernel.sh index 9a66122..bfa2e5d 100755 --- a/openvz.vzkernel/xexecscript.d/vzkernel.sh +++ b/openvz.vzkernel/xexecscript.d/vzkernel.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/packer/xexecscript.d/packer.sh b/packer/xexecscript.d/packer.sh index e2975fa..03a83cd 100755 --- a/packer/xexecscript.d/packer.sh +++ b/packer/xexecscript.d/packer.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/pipework/xexecscript.d/pipework.sh b/pipework/xexecscript.d/pipework.sh index b350a56..272d863 100755 --- a/pipework/xexecscript.d/pipework.sh +++ b/pipework/xexecscript.d/pipework.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/postfix.disable/xexecscript.d/postfix.disable.sh b/postfix.disable/xexecscript.d/postfix.disable.sh index a9a681f..be474ba 100755 --- a/postfix.disable/xexecscript.d/postfix.disable.sh +++ b/postfix.disable/xexecscript.d/postfix.disable.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/qemu-guest-agent/xexecscript.d/qemu-guest-agent.sh b/qemu-guest-agent/xexecscript.d/qemu-guest-agent.sh index 83723a9..58a8621 100755 --- a/qemu-guest-agent/xexecscript.d/qemu-guest-agent.sh +++ b/qemu-guest-agent/xexecscript.d/qemu-guest-agent.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/rabbitmq-server/xexecscript.d/rabbitmq-server.sh b/rabbitmq-server/xexecscript.d/rabbitmq-server.sh index 522e43c..d3698f2 100755 --- a/rabbitmq-server/xexecscript.d/rabbitmq-server.sh +++ b/rabbitmq-server/xexecscript.d/rabbitmq-server.sh @@ -7,6 +7,7 @@ # http://www.rabbitmq.com/releases/rabbitmq-server/current/ # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/rdo-release/xexecscript.d/rdo-release.sh b/rdo-release/xexecscript.d/rdo-release.sh index d58e5a0..3d4d8bb 100755 --- a/rdo-release/xexecscript.d/rdo-release.sh +++ b/rdo-release/xexecscript.d/rdo-release.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/redis/xexecscript.d/redis.sh b/redis/xexecscript.d/redis.sh index aaf7a16..1cc7760 100755 --- a/redis/xexecscript.d/redis.sh +++ b/redis/xexecscript.d/redis.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/rpmbuild/xexecscript.d/rpmbuild.sh b/rpmbuild/xexecscript.d/rpmbuild.sh index 335abda..07b73bd 100755 --- a/rpmbuild/xexecscript.d/rpmbuild.sh +++ b/rpmbuild/xexecscript.d/rpmbuild.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/s3tools-latest/xexecscript.d/s3tools.sh b/s3tools-latest/xexecscript.d/s3tools.sh index e5e45f5..f313d44 100755 --- a/s3tools-latest/xexecscript.d/s3tools.sh +++ b/s3tools-latest/xexecscript.d/s3tools.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail chroot $1 $SHELL -ex <<'EOS' # WARNING: Module python-magic is not available. Guessing MIME types based on file extensions. diff --git a/s3tools/xexecscript.d/s3tools.sh b/s3tools/xexecscript.d/s3tools.sh index 7982f27..9e73b0e 100755 --- a/s3tools/xexecscript.d/s3tools.sh +++ b/s3tools/xexecscript.d/s3tools.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail chroot $1 $SHELL -ex <<'EOS' curl -fsSkL http://s3tools.org/repo/RHEL_6/s3tools.repo -o /etc/yum.repos.d/s3tools.repo diff --git a/sensu.common/xexecscript.d/sensu.common.sh b/sensu.common/xexecscript.d/sensu.common.sh index 2514d4c..bc42191 100755 --- a/sensu.common/xexecscript.d/sensu.common.sh +++ b/sensu.common/xexecscript.d/sensu.common.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/serf/xexecscript.d/serf.sh b/serf/xexecscript.d/serf.sh index 836bf94..d92b814 100755 --- a/serf/xexecscript.d/serf.sh +++ b/serf/xexecscript.d/serf.sh @@ -7,6 +7,7 @@ # https://github.com/hashicorp/serf/blob/master/demo/web-load-balancer/setup_serf.sh # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/sshd_config/xexecscript.d/sshd_config.sh b/sshd_config/xexecscript.d/sshd_config.sh index db55031..40af6a4 100755 --- a/sshd_config/xexecscript.d/sshd_config.sh +++ b/sshd_config/xexecscript.d/sshd_config.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail while read param value; do config_sshd_config ${chroot_dir}/etc/ssh/sshd_config ${param} ${value} diff --git a/td-agent/xexecscript.d/td-agent.sh b/td-agent/xexecscript.d/td-agent.sh index e318d0e..92d040c 100755 --- a/td-agent/xexecscript.d/td-agent.sh +++ b/td-agent/xexecscript.d/td-agent.sh @@ -7,6 +7,7 @@ # - http://docs.fluentd.org/articles/install-by-rpm # set -e +set -o pipefail # make sure to define td-agent version case "${td_agent_version}" in diff --git a/ucarp/xexecscript.d/ucarp.sh b/ucarp/xexecscript.d/ucarp.sh index 410b484..4484f26 100755 --- a/ucarp/xexecscript.d/ucarp.sh +++ b/ucarp/xexecscript.d/ucarp.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail chroot $1 $SHELL -ex <<'EOS' yum install --disablerepo=updates -y ucarp diff --git a/vagrant.guest.account/xexecscript.d/vagrant.guest.account.sh b/vagrant.guest.account/xexecscript.d/vagrant.guest.account.sh index b57362b..f54208c 100755 --- a/vagrant.guest.account/xexecscript.d/vagrant.guest.account.sh +++ b/vagrant.guest.account/xexecscript.d/vagrant.guest.account.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/vagrant/xexecscript.d/vagrant.sh b/vagrant/xexecscript.d/vagrant.sh index 6d7d1fa..e667ab1 100755 --- a/vagrant/xexecscript.d/vagrant.sh +++ b/vagrant/xexecscript.d/vagrant.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/virtualbox-4.2/xexecscript.d/virtualbox.sh b/virtualbox-4.2/xexecscript.d/virtualbox.sh index 15b27c8..63f3900 100755 --- a/virtualbox-4.2/xexecscript.d/virtualbox.sh +++ b/virtualbox-4.2/xexecscript.d/virtualbox.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/virtualbox-4.3/xexecscript.d/virtualbox.sh b/virtualbox-4.3/xexecscript.d/virtualbox.sh index 694c98f..cc4548c 100755 --- a/virtualbox-4.3/xexecscript.d/virtualbox.sh +++ b/virtualbox-4.3/xexecscript.d/virtualbox.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/virtualbox.common/firstboot.sh b/virtualbox.common/firstboot.sh index c2cc65a..b8fd11c 100644 --- a/virtualbox.common/firstboot.sh +++ b/virtualbox.common/firstboot.sh @@ -11,6 +11,7 @@ # /etc/init.d/vboxdrv # set -e +set -o pipefail set -x ## main diff --git a/virtualbox.common/xexecscript.d/virtualbox.common.sh b/virtualbox.common/xexecscript.d/virtualbox.common.sh index 623e2da..53ef71c 100755 --- a/virtualbox.common/xexecscript.d/virtualbox.common.sh +++ b/virtualbox.common/xexecscript.d/virtualbox.common.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/virtualbox.guest.additions/xexecscript.d/virtualbox.guest.additions.sh b/virtualbox.guest.additions/xexecscript.d/virtualbox.guest.additions.sh index 438580c..79248c2 100755 --- a/virtualbox.guest.additions/xexecscript.d/virtualbox.guest.additions.sh +++ b/virtualbox.guest.additions/xexecscript.d/virtualbox.guest.additions.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/virtualbox.repo/xexecscript.d/virtualbox.repo.sh b/virtualbox.repo/xexecscript.d/virtualbox.repo.sh index a913201..30383d6 100755 --- a/virtualbox.repo/xexecscript.d/virtualbox.repo.sh +++ b/virtualbox.repo/xexecscript.d/virtualbox.repo.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/vmware-tools.repo/xexecscript.d/vmware-tools.repo.sh b/vmware-tools.repo/xexecscript.d/vmware-tools.repo.sh index 43558f0..a252798 100755 --- a/vmware-tools.repo/xexecscript.d/vmware-tools.repo.sh +++ b/vmware-tools.repo/xexecscript.d/vmware-tools.repo.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail declare chroot_dir=$1 diff --git a/zabbix-jp.agent18/xexecscript.d/zabbix-agent.sh b/zabbix-jp.agent18/xexecscript.d/zabbix-agent.sh index eb59294..835ed52 100755 --- a/zabbix-jp.agent18/xexecscript.d/zabbix-agent.sh +++ b/zabbix-jp.agent18/xexecscript.d/zabbix-agent.sh @@ -4,6 +4,7 @@ # bash # set -e +set -o pipefail chroot $1 $SHELL -ex <