-
Notifications
You must be signed in to change notification settings - Fork 100
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
rhel init script uses sudo - cannot be run without a tty #99
Comments
Hello, I would argue that you could use puppet/cfengine/etc to manager your sudoers and allow a tty for the particular user that was running it; but using a daemon function is likely a better solution. Did you want to make a patch? Have a good day. -Shawn |
Having to configure sudoers to allow root to sudo without a tty seems a bit icky. I'll provide an updated init script soon if nobody else gets to it sooner. |
The first problem I've found using the daemon() function is graphios.py isn't actually a daemon. Not being familiar enough with python, I don't know how much work would be involved to make this happen. In the short term, I'm going to pursue a command like this: nohup su ${GRAPHIOS_USER} -s /bin/sh -c "${prog} ${OPTIONS}" >/dev/null 2>&1 & |
- Source /etc/sysconfig/graphios, if it exists - Support an $OPTIONS variable to pass additional options to the program - Use nohup+su to start and fork graphios.py instead of relying on sudo which requires a tty in its default configuration - should fix Issue shawn-sterling#99 - Start the program via /usr/bin/graphios.py, not /usr/bin/graphios. Fixes Issue shawn-sterling#100 - Other cleanup, including text formatting, spaces, etc
- Source /etc/sysconfig/graphios, if it exists - Support an $OPTIONS variable to pass additional options to the program - Use nohup+su to start and fork graphios.py instead of relying on sudo which requires a tty in its default configuration - should fix Issue shawn-sterling#99 - Start the program via /usr/bin/graphios.py, not /usr/bin/graphios. Fixes Issue shawn-sterling#100 - Other cleanup, including text formatting, spaces, etc
Using a config management tool like puppet, cfengine, etc doesn't work when using the provided init script:
sudo: sorry, you must have a tty to run sudo
I suggest using the daemon function provided by /etc/init.d/functions instead, as it will handle redirecting stdout as well.
The text was updated successfully, but these errors were encountered: