Skip to content

Commit

Permalink
862441 - correcting error message for upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Oct 3, 2012
1 parent 809aa18 commit b44a09b
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions katello-configure/bin/katello-upgrade
Expand Up @@ -23,7 +23,8 @@ BACKEND_SERVICES = ['katello', 'katello-jobs', 'tomcat6', 'pulp-server', 'thumbs
STDOUT_NAME = "stdout"

# Terminate script with error code from ERROR_CODES hash
def exit_with(code = :unknown)
def exit_with(code = :unknown, message = nil)
$stderr.puts message unless message.nil?
code = ERROR_CODES[code.to_sym] || ERROR_CODES[:unknown]
exit code
end
Expand Down Expand Up @@ -296,7 +297,7 @@ class UpgradeProcess
puts "disable services automatically."
puts "You may always use `katello-service stop` to stop all the services"
puts ""
exit_service_stop
exit_with :general_error
end
end
end
Expand All @@ -321,7 +322,7 @@ class UpgradeProcess
exit_with :general_error
end
else
exit_service_stop
exit_with :general_error, "Exiting. Please stop your services and try again"
end
end

Expand All @@ -334,20 +335,10 @@ class UpgradeProcess
exit_with :general_error
end
else
exit_service_start
puts "Exiting. Your Katello installation is upgraded, but please manually start your services"
end
end

def exit_service_stop
puts "Exiting. Please stop your services and try again"
exit_with :general_error
end

def exit_service_stop
puts "Exiting. Your Katello installation is upgraded, but please manually start your services"
exit_with :general_error
end

def print_line(char="=", repeats=LINE_LEN)
puts char*repeats
end
Expand Down

0 comments on commit b44a09b

Please sign in to comment.