#!/bin/sh
#
# This runs the rpc.cmsd background process needed by CDE.
#
# To enable this service automatically at boot, make this file
# executable: chmod 755 /etc/rc.d/rc.cmsd
#

cmsd_start() {
  /usr/dt/bin/rpc.cmsd &
}

cmsd_stop() {
  killall rpc.cmsd
}

cmsd_restart() {
  cmsd_stop
  sleep 2
  cmsd_start
}

case "$1" in
'start')
  cmsd_start
  ;;
'stop')
  cmsd_stop
  ;;
'restart')
  cmsd_restart
  ;;
*)
  # Default is "start", for backwards compatibility with previous
  # Slackware versions. This may change to a 'usage' error someday.
  cmsd_start
esac
