`Shared object not found` only when service run at boot

Hello all,

I have a service, reduced to the following:

Code:
#!/bin/sh
#
# PROVIDE: test

. /etc/rc.subr

name="test"
rcvar="test_enable"

load_rc_config ${name}

command="/usr/sbin/daemon"
command_args="-f -o /var/log/test/test.log -u operator bash -c 'echo hi'"
run_rc_command "$1"

however it is behaving strangely. I have /test_enable="YES" in my /etc/rc.conf, and every boot it logs the following to the log file: /ld-elf.so.1: Shared object "libintl.so.8" not found, required by "bash".

I am unable to figure out why this happens, mostly due to the fact that when I run this service after boot it works as intended, logging /hi.

Does anyone have an idea why this may be the case? The specific program I try to execute does not matter much, python, bash, fish, all fail with similar errors. Help would be appreciated.

P.S.

This is in a jail, but I guessed that this should be irrelevant for this issue
 
The million dollar question: did you or someone else make bash the default system shell or alias bash as sh? Based on attached snippet above it shouldn't be calling bash at all, but it is...and since bash is running in a restricted environment it can't find a needed library.

For the record, don't make bash the shell for root. That's sooo linuxish.
 
Back
Top