#! /bin/sh
# /etc/init.d/a11y
# copyright (c) 2000, 2008 SuSE Linux Product gmbh, Nuernberg
# Author: Marco Skambraks <marco@suse.de>
### BEGIN INIT INFO
# Provides: a11y
# Required-Start: $remote_fs brld
# Required-Stop: $remote_fs 
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: enables a11y support on livecd
### END INIT INFO


. /etc/rc.status
. /etc/a11y.conf
return=$rc_done
case "$1" in
    start)
      echo "Starting a11y check"
      
      if [ "$CHECK_GRUB_F9" == "yes" ]
      then
        if [ ! -z `grep -o "braille=1" /proc/cmdline` ]
        then
          /usr/bin/a11y livecd
        fi
        
      fi
      rc_status -v
    ;;
    stop)
     echo -n "Shutting a11y"
     # nothing to do - because it's a livecd
     rc_status -v
    ;;
    restart)
    exit 0
    ;;
    status)
    exit 0
     rc_status -v
    ;;
    *)
     echo "Usage: $0 {start|stop|status|restart}"
     exit 1
esac

rc_exit
