base_dir is /etc/rc.d for archlinux /etc/init.d otherwise

This commit is contained in:
Daniel Roth 2011-10-03 18:35:45 +02:00
parent 342cbca533
commit 2147480fcd

View file

@ -28,11 +28,13 @@ fi
if [ -f "$__object/parameter/base_dir" ]; then
base_dir=$(cat "$__object/parameter/base_dir")
else
base_dir="/etc/init.d"
os="$(cat "$__global/explorer/os")"
case "$os" in
archlinux) base_dir="/etc/rc.d" ;;
*) base_dir="/etc/init.d"
esac
fi
mode=$(cat "$__object/parameter/mode")
echo "${base_dir}/${script} ${mode}"