Skip to main content
Topic: does openrc use the system shell? (Read 383 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

does openrc use the system shell?

Currently learning openrc.
It looks like it uses openrc-run and only the posix subset of shell.
I'm not an expert in the C programming language. Forgive me for my ignorance.

But does openrc use the system shell under the hood?
If /bin/sh is symlinked to Dash (the debian almquist shell) instead of bash, does openrc now use dash instead?
Dash is 4x faster than bash and Zsh.

Re: does openrc use the system shell?

Reply #1
Yes, OpenRC does use /bin/sh:
Quote
Service scripts are shell scripts. OpenRC aims at using only the standardized POSIX sh subset for portability reasons. The default interpreter (build-time toggle) is /bin/sh, so using for example mksh is not a problem.
And yes, linking /bin/sh to dash speeds up boot/shutdown! I actually ran a benchmark of different init systems a while ago, including parallel startup and using dash for OpenRC (dash alone speeds up boot by about 2.5 seconds)

Re: does openrc use the system shell?

Reply #2
what is a system shell?