#!/bin/sh CHKCONFIG=/sbin/chkconfig INITDIR=/etc/rc.d/init.d . /usr/share/alterator/build/backend3.sh on_message() { case "$in_action" in list) shift; service="$1" [ "$service" != "/" ] || service="*" echo '( ' #find -L "$INITDIR" -mindepth 1 -maxdepth 1 -type f -perm +0111 -name "$service" -printf '("%f") ' | sort -r find -L "$INITDIR" -mindepth 1 -maxdepth 1 -type f -perm +0111 ! -name '*.rpm*' ! -name '*~' -printf '("%f") ' | sort -r echo ')' ;; write) echo "param=$in_param" > ~/tmp/backend-out echo "command=$in_command" >> ~/tmp/backend-out echo "()" ;; esac } message_loop