#!/bin/bash

RUNLEVEL=3
NEEDS="+local_fs"
RECOMMENDED=yes

. /etc/init.d/smgl_init

case $1 in
  start)  if [ -r /etc/sysconfig/bootmisc ] ; then
            echo "Running /etc/sysconfig/bootmisc..."
            if [ -x /etc/sysconfig/bootmisc ] ; then
              . /etc/sysconfig/bootmisc
              evaluate_retval
            else
              echo "Skipping /etc/sysconfig/bootmisc as nonexecutable..."
              evaluate_retval
            fi
          fi
          ;;

  stop)   if [ -r /etc/sysconfig/haltmisc ] ; then
            echo "Running /etc/sysconfig/haltmisc..."
            if [ -x /etc/sysconfig/haltmisc ] ; then
              . /etc/sysconfig/haltmisc
              evaluate_retval
            else
              echo "Skipping /etc/sysconfig/haltmisc as nonexecutable..."
              evaluate_retval
            fi
          fi
          ;;

  *)      echo "Usage: $0 {start|stop}"
          echo "start runs /etc/sysconfig/bootmisc, stop runs /etc/sysconfig/haltmisc."
          exit 1
          ;;
esac
