#---------------------------------------------------------------------------- # /etc/rc.d/rc495.lcd4linux - configuration of your lcd-devices __FLI4LVER__ # # # Creation: 09.09.2005 Christian Brueggemann # Update: $Id$ #---------------------------------------------------------------------------- if [ "$OPT_LCD4LINUX" = "yes" ] then begin_script LCD4Linux "starting LCD4Linux..." if [ -f /usr/bin/logger ] then msgcmd="/usr/bin/logger -t lcd4linux -p local0" msgcmdfail="$msgcmd.error " msgcmdinfo="$msgcmd.info " else msgcmd="echo " msgcmdfail="echo " msgcmdinfo="echo " fi [ -e /etc/rc.d/lcd4linux-setup.parport ] && . /etc/rc.d/lcd4linux-setup.parport if [ "$LCD4LINUX_EXPERT_MODE" = "no" ] then ( echo "Display 'configured'" echo "Display configured {" # setup driver specifiy sections . /etc/rc.d/lcd4linux.driver echo " Icons '$LCD4LINUX_ICONS'" echo " Size '$LCD4LINUX_DISPLAY_SIZE'" echo "}" echo "" echo "Layout 'L$LCD4LINUX_DISPLAY_SIZE'" echo "Layout L$LCD4LINUX_DISPLAY_SIZE {" [ 0$LCD4LINUX_LAYOUT_N -eq 0 ] || for i in `seq 1 $LCD4LINUX_LAYOUT_N` do eval layout='$LCD4LINUX_LAYOUT_'$i layoutrow=`echo $layout | sed s/:/\'/g` echo " $layoutrow" done echo "}" echo "" ) > /etc/lcd4linux.conf cat /tmp/lcd4linux.conf.tmpl >> /etc/lcd4linux.conf sed -i "s/LCD4LINUX_DSL_SPEED_IN/$LCD4LINUX_DSL_SPEED_IN/" /etc/lcd4linux.conf sed -i "s/LCD4LINUX_DSL_SPEED_OUT/$LCD4LINUX_DSL_SPEED_OUT/" /etc/lcd4linux.conf rm /tmp/lcd4linux.conf.tmpl chmod 0600 /etc/lcd4linux.conf else cp /etc/lcd4linux/lcd4linux.conf /etc/lcd4linux.conf fi if [ "$LCD4LINUX_TEST" != "no" ] then $msgcmdinfo "LCD4Linux in TestMode!" $msgcmdinfo "Start LCD4Linux with 'lcd4linux -f /etc/lcd4linux.conf -Fvv' " else $msgcmdinfo "starting lcd4linux-daemon on $HOSTNAME ..." log_info "starting lcd4linux-daemon on $HOSTNAME ..." service-restart.sh 5 /usr/bin/lcd4linux -F -f /etc/lcd4linux.conf -q >/dev/null 2>&1 & if [ "$?" != "0" ] then $msgcmdfail "*** ERROR: cannot start lcd4linux! ***" $msgcmdfail "*** ERROR: check OPT_LCD4LINUX and your lcd4linux.conf! ***" fi fi end_script fi