I dont know if it will still be using /bin/sh, because the script says so (#!/bin/sh)
I just tried this and the error remains so it seems it still use /bin/sh no matter the changes.
This is a test script that I used.
#!/opt/bin/bash
case "$1" in
test)
echo "test working"
;;
*)
echo "Usage: `basename $0` {case parameter failed}"
;;
esac
Running this script manually a few times in a row gives me the following result.
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
test working
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root# /opt/etc/init.d/test test
Usage: test {case parameter failed}
root@RT-N66U:/tmp/home/root#
Quite bad odds of getting a script to fully execute.