LinHES Forums
http://forums.linhes.org/

iMON VFD script
http://forums.linhes.org/viewtopic.php?f=2&t=16174
Page 1 of 1

Author:  slowtolearn [ Sun Aug 19, 2007 4:36 pm ]
Post subject:  iMON VFD script

Seems my original post was lost during one of the recent forum outages, so I want to re-post my iMON VFD script here. This script was working as of R5F1 (should be good for R5D1 and R5E50 as well):
Code:
#!/bin/bash
[ -n "`lsusb | grep iMON`" ] && {
   echo -e "Do you wish to configure the iMON VFD? \c"
   read ans
   [ "$ans" = "y" -o "$ans" = "Y" ] && {
      cp -p /etc/modules /etc/modules.b4vfd
      cp -p /etc/LCDd.conf /etc/LCDd.conf.b4vfd
      echo "lirc_imon" >>/etc/modules
      [ ! -f /dev/lcd0 ] && {
         mknod /dev/lcd0 c 180 144
         chmod 666 /dev/lcd0
      }
# Problem with DriverPath= not having a trailing slash...
      [ -z "`grep DriverPath=\/usr\/lib\/lcdproc\/ /etc/LCDd.conf`" ] && {
         sed 's~DriverPath=\/usr\/lib\/lcdproc~DriverPath=\/usr\/lib\/lcdproc\/~' /etc/LCDd.conf >/tmp/LCDd.conf
      } || {
         cp -p /etc/LCDd.conf /tmp
      }
      modprobe lirc_imon
#Set the driver to imon...
      sed 's/Driver=curses/Driver=imon/' /tmp/LCDd.conf >/etc/LCDd.conf
      update-rc.d LCDd defaults
      /etc/init.d/LCDd start
   }
}


Please let me know if you experience any problems with it...

Author:  cecil [ Mon Aug 20, 2007 8:48 pm ]
Post subject: 

Thanks!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/