#! /bin/sh # Copyright (c) 1995-2003 SuSE Linux AG, Nuernberg, Germany. # All rights reserved. # ### BEGIN INIT INFO # Provides: create_xconf # Required-Start: $local_fs # Required-Stop: # Default-Start: 5 # Default-Stop: # Description: Call sax ### END INIT INFO # First reset status of this service . /etc/rc.status rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - insufficient privilege # 5 - program is not installed # 6 - program is not configured # 7 - program is not running case "$1" in start) echo -n "Creating X Config" if [ ! -f /etc/X11/xorg.conf ] ; then /usr/sbin/sax2 -c 0 -a -i > /dev/null ; /usr/sbin/sax2 ; killall -9 X ; lspci | grep VGA > /etc/X11/video_card_ID ; /usr/sbin/entranced else if [ "`lspci | grep VGA`" != "`cat /etc/X11/video_card_ID`" ] ; then sax2 ; lspci | grep VGA > /etc/X11/video_card_ID fi if [ "`chkconfig -l | grep -w entrance_livecd | grep -v grep | grep on `" != "" ] ; then killall -9 entranced killall -9 entrance killall -9 X /usr/sbin/entranced fi fi rc_status -v ;; stop) ;; try-restart) rc_status ;; restart) rc_status ;; try-restart-iburst) rc_status ;; force-reload) # Does not support signalling to reload $0 try-restart rc_status ;; reload) rc_status -v ;; status) rc_status -v ;; probe) rc_failed 3 ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|try-restart-iburst|force-reload|reload|probe|ntptimeset}" exit 1 ;; esac rc_exit