Commit 7dd30006 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Check whether init.d script is executable.

Reviewed-by: schreiberal
parent 113b8d89
......@@ -611,10 +611,10 @@ class LUInitCluster(LogicalUnit):
if not os.path.exists(constants.NODE_INITD_SCRIPT):
raise errors.OpPrereqError("Missing init.d script '%s'. Please reinstall"
" or install the script manually." %
if not (os.path.isfile(constants.NODE_INITD_SCRIPT) and
os.access(constants.NODE_INITD_SCRIPT, os.X_OK)):
raise errors.OpPrereqError("Init.d script '%s' missing or not "
"executable." % constants.NODE_INITD_SCRIPT)
def Exec(self, feedback_fn):
"""Initialize the cluster.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment