#!/bin/sh
########################################################################
# Begin gdm
#
# Description : GDM Boot Script
#
# Authors     : Armin K. <krejzi@email.com>
#               DJ Lucas <dj@linuxfromscratch.org>
#
# Version     : BLFS SVN
#
########################################################################

### BEGIN INIT INFO
# Provides:            gdm
# Required-Start:      $local_fs
# Should-Start:        $remote_fs $last
# Required-Stop:       $local_fs
# Should-Stop:         $remote_fs
# Default-Start:       5
# Default-Stop:        0 1 2 3 4 6
# Short-Description:   GNOME Display Manager
# X-LFS-Provided-By:   BLFS
### END INIT INFO

. /lib/lsb/init-functions

GDM_BINARY=/usr/sbin/gdm

case "${1}" in
   start)
      log_info_msg "Starting GNOME Display Manager GDM"
      start_daemon ${GDM_BINARY}
      evaluate_retval
      ;;

   stop)
      log_info_msg "Stopping GNOME Display Manager GDM"
      killproc ${GDM_BINARY}
      evaluate_retval
      ;;

   restart)
      ${0} stop
      sleep 1
      ${0} start
      ;;

   status)
      statusproc ${GDM_BINARY}
      ;;

   *)
      echo "Usage: ${0} {start|stop|restart|status}"
      exit 1
      ;;
esac

exit 0

# End gdm
