#!/bin/sh # # chkconfig: 345 55 45 # description: adsm startup # # # Source function library. . /etc/rc.d/init.d/functions PATH=${PATH}:/usr/adsm:/usr/local/sbin export PATH DSM_DIR=/usr/adsm/ DSM_CONFIG=/usr/adsm/dsm.opt DSM_LOG=/var/log/log export DSM_DIR DSM_CONFIG DSM_LOG # See how we were called. case "$1" in start) echo -n "Starting adsm: " dsmc sch -RunAsService > /dev/null 2>&1 & echo ;; stop) echo -n "Stopping adsm: " pid=`/bin/ps ax | /bin/grep dsmc | /bin/egrep -v grep | /usr/bin/cut -d' ' -f1` if test "$pid" then kill $pid echo fi ;; restart) $0 stop $0 start ;; status) status dsmc ;; *) echo "Usage: adsm.init {start|stop|restart|status}" exit 1 esac exit 0 --tThc/1wpZn/ma/RB-- =========================================================================