diff options
Diffstat (limited to 'recipes/nslu2-binary-only/unslung-rootfs/rc.optware-start')
-rwxr-xr-x | recipes/nslu2-binary-only/unslung-rootfs/rc.optware-start | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/recipes/nslu2-binary-only/unslung-rootfs/rc.optware-start b/recipes/nslu2-binary-only/unslung-rootfs/rc.optware-start new file mode 100755 index 0000000000..53fe7e8262 --- /dev/null +++ b/recipes/nslu2-binary-only/unslung-rootfs/rc.optware-start @@ -0,0 +1,27 @@ +#!/bin/sh + +if ( [ -f /unslung/rc.optware-start ] && . /unslung/rc.optware-start ) ; then return 0 ; fi + +# Start all init scripts in /opt/etc/init.d +# executing them in numerical order. +# +for i in /opt/etc/init.d/S??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set start + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i start + ;; + esac +done |