View Single Post
Posts: 1,313 | Thanked: 2,978 times | Joined on Jun 2011 @ Finland
#1561
Originally Posted by peterleinchen View Post
@ajalkane
There is nothing wrong with the execroot script. So it really seems like copy or lf/cr mistakes.
Only one little thing:
the script takes only one parameter (the commmand itself). But what about having the need to give some parameters to that script?
Then you can use quotes, for example:

Code:
execroot.sh "/sbin/stop mce"
I have the approach using a template header activating root rights and then execute the shell script in lower part of the same file.
Thanks. That's an interesting alternative and I can definitely see the benefits. At least this approach would be easier for people to just copy-paste.

I'll add a link to this post in the recipe for running as root. Could be useful to modify the recipes to use this approach if the script is not a one-liner, but I'm feeling a bit lazy at the moment.
__________________
My N9/N950 projects:
 

The Following User Says Thank You to ajalkane For This Useful Post: