![]() |
2012-04-03
, 11:06
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#2
|
opensh -c "cp /home/user/MyDocs/file.ko /lib/***" devel-su -c "cp /home/user/MyDocs/file.ko /lib/***"
gainroot.sh
Having the next command (that calls copy.sh) on the same line as the opensh call like that is the trick.
copy.sh
Obviously these examples are to copy CreamyGoodness's Overclock kernel modules to where they can be used, and are set to how my own MyDocs folder is arranged, you'll most likely have to do a little adjusting for your own use, directory wise.
If you don't know how to run scripts I don't know why you're here, but this post has been awfully noob friendly so far so heres a wee pointer, google something like "helloworld script", there's no shortage of material on how to write and execute scripts. All you people asking for scripts for those modules, well I just laid the groundwork for you, now do it yourself!
Here's my source(forum not code) if you'd like to figure out how to use devel-su within a script, for distribution to people without opensh/Inception etc.
Shell scripts: gain root access - how?
I may edit this post to include a tutorial of that later down the road.
Last edited by HanzBlix; 2012-04-03 at 06:51.