]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Added OR statement for cases of ID = rhel in RHEL 7+ 1013/head
authorHartnell Foster <hartnell.foster@bbc.co.uk>
Mon, 9 May 2016 11:42:56 +0000 (12:42 +0100)
committerHartnell Foster <hartnell.foster@bbc.co.uk>
Mon, 9 May 2016 11:42:56 +0000 (12:42 +0100)
Signed-off-by: Hartnell Foster <hartnell.foster@bbc.co.uk>
templates/lxc-centos.in

index ef8061cf98de9a4a6b93ebed4c2c5da052509b3c..051faef96c158738f069d7ccb03b0e4c5ccd026c 100644 (file)
@@ -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 ]
@@ -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