Restart Linux System
Michael Bentley
michael at jedimindworks.com
Tue May 22 12:55:17 EDT 2007
On May 22, 2007, at 11:15 AM, Michael L Torrie wrote:
>> I’m looking to restart a Linux system from my python application.
>> What’s the best way to achieve this, is there something in the OS
>> module?
>
> Probably not. You need to just spawn the "reboot" command, or run
> "init
> 6." This requires root, though. Without root there's no way to
> reboot
> a linux system.
...unless you run shutdown(8) or reboot(8) setuid root (reboot is
kinda harsh though, btw).
Regards,
Michael
---
Asking a person who he *is* ... is not Pythonic! --Anton Vredegoor
More information about the Python-list
mailing list