#!/bin/sh

if [ -d /etc/rc0.d ]; then
   # First execute the Kill scripts
   for f in /etc/rc0.d/K*
   do
      if [ -x $f ]; then
         $f stop
      fi
   done

   # Now, execute the Start scripts
   for f in /etc/rc0.d/S*
   do
      if [ -x $f ]; then
         $f start
      fi
   done
fi

if [ x"$1"x = x"shutdown"x ]; then
   /sbin/shutdown -h now
elif [ x"$1"x = x"reboot"x ]; then
   /sbin/reboot
fi
