Autostart on OpenWrt? init.d?

I would strongly recommend against selecting a different login shell via /etc/passwd, doing so will blow up with the next sysupgrade (conffiles are kept, including /etc/passwd, while user-installed binaries (/bin/bash) that are not part of the default image are dropped - leaving you without a valid login shell for root --> inaccessible/ semi-bricked device).

If you like bash and assuming your device has enough flash/ RAM/ CPU cycles left, there's no real reason not to use it, by calling it manually - but configuring a non-default login shell is a bad idea.

3 Likes

Thanks :pray: @bobafetthotmail

VERY BAD IDEA. OpenWrt isn't like a normal Linux distro.

This will break on sysupgrade when you will not have Bash anymore.

I think that adding bash at the last line of /etc/profile should work and be fail-safe.

/etc/profile is kept on upgrade, and if "bash" command fails you should still land in busybox shell.

But someone should test this first.

3 posts were split to a new topic: Autostart openvpn

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.