Originally Posted by mycoolwater
su -l user && (/bin/sh svc_cmd.sh &)
But the command doesn't run at all... any better idea than above?
A few ideas. What's that -l option on the su command? According to the man page (on Slackware 13) there's no such option. Secondly, how will /bin/sh find svc_cmd.sh? It would have to be in the current directory for it to work and what is the current directory when the boot scripts are running? /? You could try giving the full path to svc_cmd.sh. Finally the su command will complete and if it completes successfully, after it has exited, the command line will run /bin/sh svc_cmd.sh &
as root. Maybe this is closer to doing what you want to do:
(su - user -c /bin/sh <full path to>/svc_cmd.sh )&
Is there any particular reason for using /bin/sh rather than /bin/bash?
EDIT: as the command is going to be backgrounded and is a single command, the suggested command is pointlessly complex and can more simply be
su - user -c /bin/sh <full path to>/svc_cmd.sh &