![]() |
question about script
I made a script file called "rbt" which contains only 2 lines of code:
sudo gainroot reboot When I "sh rbt", it only executes the first line of code and stops with a "#". It does not run the second line. What's wrong? Help please. Thanks. |
Re: question about script
Hi,
The easiest way to see what's happening is to think in terms of PIDs. In the shell (PID 124, let's say) you run Code:
rbt Code:
sudo gainroot The rest of the rbt script is now blocked, waiting for PID 130 to exit. If your sudoers file is set up correctly (that is, you've given yourself permission to run all commands as root via sudo), then you can try running Code:
sudo reboot Dave. |
Re: question about script
Code:
#!/bin/sh EDIT: It may just be easier to use this; which can be run as user: Code:
dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.req_reboot |
All times are GMT. The time now is 07:19. |
vBulletin® Version 3.8.8