"su -s" in script, different behaviour between distros
I've just installed Slack 12, which now contains /etc/rc.d/init.d/functions, to be a little more compatible with scripts written for RH. However, the daemon function isn't working. The strange thing is, I can use exactly the same command in RH, and it does work.
I patched around both version, so that exactly the same command was issued in each environment, taken from a trace, from a script run by root:
+ su -s /bin/bash - eddie -c '/home/eddie/runfunc.sh /boot'
In RH, this works. But in Slack, it starts another bash shell, and I have to reply "exit" to get the script to continue, and it doesn't issue the command.
The shell used in both environments, for root, and eddie is the same, so I'm at a loss as to why one works, and the other doesn't.
Any ideas.
Cheers,
Eddie
|