Skip to content

Commit

Permalink
Added OR statement for cases of ID = rhel in RHEL 7+
Browse files Browse the repository at this point in the history
Signed-off-by: Hartnell Foster <hartnell.foster@bbc.co.uk>
  • Loading branch information
hartnellfoster authored and stgraber committed May 11, 2016
1 parent e1a2c96 commit 563148e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions templates/lxc-centos.in
Expand Up @@ -137,8 +137,9 @@ if [ "${CPE_NAME}" != "" -a "${ID}" = "centos" -a "${VERSION_ID}" != "" ]
then
centos_host_ver=${VERSION_ID}
is_centos=true
elif [ "${CPE_NAME}" != "" -a "${ID}" = "redhat" -a "${VERSION_ID}" != "" ]
elif [ "${CPE_NAME}" != "" -a "${ID}" = "redhat" -o "${ID}" = "rhel" -a "${VERSION_ID}" != "" ]
then
# RHEL 7+ /etc/os-release ID = 'rhel', which doesn't enter this elif without the added OR statement
redhat_host_ver=${VERSION_ID}
is_redhat=true
elif [ -e /etc/centos-release ]
Expand Down Expand Up @@ -394,7 +395,7 @@ configure_centos_init()
# power-status-changed - shutdown on SIGPWR
#
start on power-status-changed
exec /sbin/shutdown -h now "SIGPWR received"
EOF
fi
Expand Down

0 comments on commit 563148e

Please sign in to comment.