maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   Terminal Reboot Command for N9? (https://talk.maemo.org/showthread.php?t=81184)

abyzthomas 2013-02-05 22:56

Re: Terminal Reboot Command for N9?
 
Quote:

Originally Posted by tonyhuynh (Post 1321020)
Pls show me what is reboot code to use in custom action of Profilematic?

echo <your-devel-su-password> | devel-su -c "/sbin/reboot"

tonyhuynh 2013-02-06 00:30

I try with ''/sbin/reboot'' but it not work in Profilematic. I mean in Profilematic i/o terminal. Tks.

Eztran 2013-02-06 00:49

Re: Terminal Reboot Command for N9?
 
Quote:

Originally Posted by tonyhuynh (Post 1321038)
I try with ''/sbin/reboot'' but it not work in Profilematic. I mean in Profilematic i/o terminal. Tks.

Use the entire command abyzthomas posted (developer mode must be enabled for it to work). Note that this does mean leaving your devel-su password in plaintext in ProfileMatic, so I hope you're not paranoid.

Also, must stress this: be careful. If attached to the wrong condition, this command could give a device which reboots every time it connects to WiFi, or something similar.

coderus 2013-02-06 05:42

Re: Terminal Reboot Command for N9?
 
profilematic have no root privileges to reboot. you should be tricky for rebooting your phone via profilematic. =)

tonyhuynh 2013-02-06 06:21

Re: Terminal Reboot Command for N9?
 
Quote:

Originally Posted by coderus (Post 1321061)
profilematic have no root privileges to reboot. you should be tricky for rebooting your phone via profilematic. =)

I cannot do as guided. tks anyway!

coderus 2013-02-06 06:32

Re: Terminal Reboot Command for N9?
 
you may install/incept opensh for using root privilegeswithout password, or tou can write echo script to automatic writing root password to devel-su:
Code:

echo rootme | devel-su -c /sbin/reboot

ajalkane 2013-02-06 23:04

Re: Terminal Reboot Command for N9?
 
Quote:

Originally Posted by coderus (Post 1321068)
you may install/incept opensh for using root privilegeswithout password, or tou can write echo script to automatic writing root password to devel-su:
Code:

echo rootme | devel-su -c /sbin/reboot

ProfileMatic does not run the custom action in shell at the moment. So if you want something that uses shell commands (redirection or filename expansion), you must run it in shell.

For example put into custom action:

Code:

sh -c "echo rootme | devel-su -c /sbin/reboot"
Or see this "recipe" in ProfileMatic thread to ease running scripts as root:
http://talk.maemo.org/showpost.php?p...&postcount=884


All times are GMT. The time now is 17:29.

vBulletin® Version 3.8.8