-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if Presto is not running before erasing RPM #67
Conversation
Copy of prestodb/presto#11128 |
@@ -83,6 +83,7 @@ | |||
<architecture>x86_64</architecture> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update commit message to:
Check if Presto is not running before erasing RPM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build failure seems unrelated.
@@ -0,0 +1,6 @@ | |||
# Pre erase script | |||
|
|||
if ! /etc/init.d/presto status | grep -q 'Not running'; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to grep for a message? Per the LSB standard, can we simply check for status 3?
http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I check for non zero. In case of such status (see exit status of 1, 2)it would be nice to give a user a chance to cleanup.
According to: http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html when service is correctly stopped it returns 3.
5892cbc
to
d13fbf9
Compare
Check if Presto is running before erasing RPM