Skip to content

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

@sighook

Description

@sighook

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions