Remove the usage of 'which' (following dib)
diskimage-builder deprecated the usage of which (dib-lint marks its occurrences as error by default): https://review.openstack.org/#/c/466063/ Replace all the occurences of 'which' with 'type -p'. Also, remove the (now useless) installation of which from the disable-firewalld element. Change-Id: I00bda062767070e46133cc800e82c9470923f572
This commit is contained in:
parent
d0bfaa0fa9
commit
52c39ec6d0
@ -1 +0,0 @@
|
||||
package-installs
|
@ -1,2 +0,0 @@
|
||||
which:
|
||||
phase: post-install.d
|
@ -8,7 +8,7 @@ set -o pipefail
|
||||
|
||||
case "${DISTRO_NAME}" in
|
||||
fedora | centos | centos7 | rhel | rhel7 )
|
||||
if which systemctl && [[ $(systemctl --no-pager list-unit-files firewalld) =~ 'enabled' ]]; then
|
||||
if type -p systemctl && [[ $(systemctl --no-pager list-unit-files firewalld) =~ 'enabled' ]]; then
|
||||
systemctl disable firewalld
|
||||
fi
|
||||
;;
|
||||
|
@ -14,7 +14,7 @@ esac
|
||||
|
||||
case "${DISTRO_NAME}" in
|
||||
fedora | centos | rhel | rhel7)
|
||||
if which service; then
|
||||
if type -p service; then
|
||||
service ip6tables save
|
||||
chkconfig ip6tables off
|
||||
fi
|
||||
|
@ -14,7 +14,7 @@ esac
|
||||
|
||||
case "${DISTRO_NAME}" in
|
||||
fedora | centos | rhel | rhel7)
|
||||
if which service; then
|
||||
if type -p service; then
|
||||
service iptables save
|
||||
chkconfig iptables off
|
||||
fi
|
||||
|
@ -7,7 +7,7 @@ set -eu
|
||||
set -o pipefail
|
||||
|
||||
function _get_version_package {
|
||||
if which pbr > /dev/null; then
|
||||
if type -p pbr > /dev/null; then
|
||||
local version=$(pbr info $1 | awk '{print $2}')
|
||||
echo "${version}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user