3

I've CM12.1 on my Galaxy S3. I'm trying to set up SSHD. At the moment everything is working fine, except the last step: start the sshd demon at start-up.

The problem is that the script

/data/local/userinit.sh

will be executed, but the call in it not anymore.

Here is the script:

#!/system/bin/sh
if [ -e /data/local/userinit.d/99sshd ]
then
 log -p i -t userinit "Launching /data/local/userinit.d/99sshd--before"
 /system/bin/sh /data/local/userinit.d/99sshd
 log -p i -t userinit "Launching /data/local/userinit.d/99sshd--after"
fi

The script 99sshd is very simple, just for debugging:

#!/system/bin/sh
log -p i -t userinit "Executing /data/local/userinit.d/99sshd"

And here is the result from logcat:

userinit - Launching /data/local/userinit.d/99sshd--before

userinit - Launching /data/local/userinit.d/99sshd--after

Missing is the message:

userinit - Executing /data/local/userinit.d/99sshd

How could it happen?!

asked May 7, 2015 at 12:06
6
  • Can you run it manually as a test? Commented May 7, 2015 at 13:30
  • Yes, from the terminal no problem. Commented May 7, 2015 at 14:50
  • ok folks, I found, that the file system isn't ready somehow: the scipt isn't there at the moment of execution. Any help from sy who knows very well the android boot process is very appreciated. Commented May 27, 2015 at 21:12
  • this may be related. Commented Dec 22, 2015 at 3:55
  • Just a guess here, as I've no G3 to test with. This line: "/system/bin/sh /data/local/userinit.d/99sshd", wouldn't that execute 99sshd in a subshell? Perhaps that accounts for what's missing., i.e. the same way the '$x' is lost here: echo -e "x=yes\necho \$x\n" > foo ; bash foo ; echo :$x:. Commented Apr 3, 2016 at 16:08

1 Answer 1

1

init.d and userinit.d support removed from CM12 and CM13

answered Aug 22, 2016 at 22:22
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.