Skip to content

Commit

Permalink
Merge pull request kubernetes#62657 from matthyx/master
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update all script shebangs to use /usr/bin/env interpreter instead of /bin/interpreter

This is required to support systems where bash doesn't reside in /bin (such as NixOS, or the *BSD family) and allow users to specify a different interpreter version through $PATH manipulation.
https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html
```release-note
Use /usr/bin/env in all script shebangs to increase portability.
```
  • Loading branch information
Kubernetes Submit Queue authored May 3, 2018
2 parents 4558e41 + 9b15af1 commit b5f61ac
Show file tree
Hide file tree
Showing 254 changed files with 265 additions and 265 deletions.
2 changes: 1 addition & 1 deletion build/build-image/rsyncd.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/common.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/copy-output.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/lib/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/make-build-image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/make-clean.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/package-tarballs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion build/release-in-a-container.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion build/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/shell.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion build/util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/addons/addon-manager/kube-addons.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/config-build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/config-default.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/config-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/deployAddons.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/make-ca-cert.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/master/scripts/apiserver.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/master/scripts/controller-manager.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/master/scripts/flannel.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/master/scripts/post-etcd.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/master/scripts/scheduler.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/node/bin/mk-docker-opts.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/node/bin/remove-docker0.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/node/scripts/docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/node/scripts/flannel.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/node/scripts/kubelet.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/node/scripts/proxy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/centos/util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/clientbin.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/common.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2017 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/config-common.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/config-default.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/config-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/delete-stranded-load-balancers.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/gci/configure.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
4 changes: 2 additions & 2 deletions cluster/gce/gci/flexvolume_node_setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2017 The Kubernetes Authors.
#
Expand Down Expand Up @@ -119,7 +119,7 @@ generate_chroot_wrapper() {

mkdir -p $wrapper_dir
cat >$wrapper_path <<EOF
#!/bin/bash
#!/usr/bin/env bash
chroot ${MOUNTER_PATH} ${driver_path} "\$@"
EOF

Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/gci/health-monitor.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/gci/helper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/gci/master-helper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/gci/node-helper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/list-resources.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/upgrade-aliases.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2018 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/upgrade.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2017 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/get-kube-local.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/juju/config-default.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/juju/config-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/juju/layers/kubernetes-e2e/actions/test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -ex

Expand Down
2 changes: 1 addition & 1 deletion cluster/juju/layers/kubernetes-master/actions/restart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set +ex

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
MY_HOSTNAME=$(hostname)

: ${JUJU_UNIT_NAME:=`uuidgen`}
Expand Down
2 changes: 1 addition & 1 deletion cluster/juju/layers/kubernetes-worker/actions/pause
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -ex

Expand Down
2 changes: 1 addition & 1 deletion cluster/juju/layers/kubernetes-worker/actions/resume
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -ex

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
MY_HOSTNAME=$(hostname)

: ${JUJU_UNIT_NAME:=`uuidgen`}
Expand Down
2 changes: 1 addition & 1 deletion cluster/juju/prereqs/ubuntu-juju.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/juju/util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2015 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/kube-down.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/kube-up.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/kube-util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubeadm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2016 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubectl.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2014 The Kubernetes Authors.
#
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubemark/gce/config-default.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Copyright 2017 The Kubernetes Authors.
#
Expand Down
Loading

0 comments on commit b5f61ac

Please sign in to comment.