-
Notifications
You must be signed in to change notification settings - Fork 217
Fix example in documentation of openqa-setup-db #6665
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Ioannis Bonatakis <[email protected]>
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
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.
What are you fixing here? sudo sudo …
is supposed to work just fine.
@@ -408,7 +408,7 @@ specify the user and database name and run it as user `postgres`: | |||
|
|||
[source,sh] | |||
---- | |||
sudo sudo -u postgres openqa-setup-db your_username openqa-local` | |||
sudo su -u postgres openqa-setup-db your_username openqa-local |
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.
sudo su -u postgres openqa-setup-db your_username openqa-local | |
sudo -u postgres openqa-setup-db your_username openqa-local |
or (if really needed)
sudo su -u postgres openqa-setup-db your_username openqa-local | |
sudo su - postgres openqa-setup-db your_username openqa-local |
su
does not have -u
option
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.
personally I use sudo -u postgres
and I would have remove the su but it is another reference which give the command as sudo su -u postgres
. https://github.com/os-autoinst/openQA/pull/6665/files#diff-4d6d1050121df87969e32770abd50500a1fbda9f136db4fbb374fe05a236f2c2R393
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.
the reference you are mentioning gives sudo su - postgres
, the missing u
is not a typo 😉
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.
why not just using the sudo -u postgres?
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.
The sudo sudo -u postgres
command is useful if you're not already root. If you just run sudo -u postgres
as your normal user you might be prompted for the password of the postgres user (depending on the sudo configuration) which you probably wouldn't know.
ok. I didnt try it. As I said in another comment I personally use |
No description provided.