Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printf() isn't builtin by POSIX sh(1p) #2

Open
sighook opened this issue Apr 25, 2023 · 0 comments
Open

printf() isn't builtin by POSIX sh(1p) #2

sighook opened this issue Apr 25, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sighook
Copy link
Contributor

sighook commented Apr 25, 2023

printf (as function, not a binary) is not builtin by POSIX sh(1p) but we're using it.

We have the following printf() references:

$ grep -n printf rc*
rc.multi:16:    printf "starting services:"
rc.multi:18:            printf " %s" $SYSLOG
rc.multi:20:                    printf "%s" "[ERROR]"
rc.multi:23:            printf " %s" "$service"
rc.multi:25:                    printf "%s" "[ERROR]"

An alternative like echo -n is not POSIX too. 😄
If we're trying to refer to the printf as binary (/usr/bin/printf) we're breaking separate /usr boot, since the network setup is one of the service. 😄

By the time, dash(1) that we are using as sh(1) have printf builtin and seems like in the present situation, it is the least of the evils.

Figure out what can be done.

@sighook sighook added bug Something isn't working help wanted Extra attention is needed labels Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Development

No branches or pull requests

1 participant