Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,956 Members 42,565 Now Online
XDA Developers Android and Mobile Development Forum

[Q] bash breaks init.d

Tip us?
 
Vincent F.
Old
#1  
Junior Member - OP
Thanks Meter 1
Posts: 3
Join Date: May 2014
Default [Q] bash breaks init.d

Hi,

I wanted to have bash as standardshell, so I replaced /system/bin/sh with a symlink to bash. That worked pretty well except it didnīt load the configuration file. So i replaced it with this script:
Code:
#!/system/bin/bash
exec /system/bin/bash --rcfile /etc/profile
this works correctly, but it seems to break init.d support. At least it no longer mounts my second sdcard partition (for link2sd).
does anybody no how to fix this?

cheers,
Vincent
 
Lgrootnoob
Old
#2  
Account currently disabled
Thanks Meter 108
Posts: 485
Join Date: Oct 2012
Location: Dallas

 
DONATE TO ME
Quote:
Originally Posted by Vincent F. View Post
Hi,

I wanted to have bash as standardshell, so I replaced /system/bin/sh with a symlink to bash. That worked pretty well except it didnīt load the configuration file. So i replaced it with this script:
Code:
#!/system/bin/bash
exec /system/bin/bash --rcfile /etc/profile
this works correctly, but it seems to break init.d support. At least it no longer mounts my second sdcard partition (for link2sd).
does anybody no how to fix this?

cheers,
Vincent
i think its because you replaced a binary with a script and init.d fed code straight to the binary. whereas the script you replaced it with has no entry point for the init.d code.
 
Vincent F.
Old
#3  
Junior Member - OP
Thanks Meter 1
Posts: 3
Join Date: May 2014
Quote:
Originally Posted by Lgrootnoob View Post
i think its because you replaced a binary with a script and init.d fed code straight to the binary. whereas the script you replaced it with has no entry point for the init.d code.
Thanks, that solved it. for all with the same problem heres the code:
Code:
#!/system/bin/bash
exec /system/bin/bash --rcfile /etc/profile $*
cheers,
Vincent
The Following User Says Thank You to Vincent F. For This Useful Post: [ Click to Expand ]
 
Lgrootnoob
Old
#4  
Account currently disabled
Thanks Meter 108
Posts: 485
Join Date: Oct 2012
Location: Dallas

 
DONATE TO ME
Quote:
Originally Posted by Vincent F. View Post
Thanks, that solved it. for all with the same problem heres the code:
Code:
#!/system/bin/bash
exec /system/bin/bash --rcfile /etc/profile $*
cheers,
Vincent
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes