View Single Post
Posts: 539 | Thanked: 165 times | Joined on Feb 2010 @ Berlin, Germany
#292
Originally Posted by Jinux View Post
Why not just put "sudo gainroot" at the top of the script before all the commands? No need to pipe it then...
Because it won't work. You need to execute the script itself as root. Putting sudo gainroot in first line will break the script.