Permalink
Browse files

[testudo] change gpib driver installation location

Comply with local package guide lines for Ubuntu 9.10.  Every thing
is now installed in /usr/local.  Ensure library cachech is updated and
add a check to masure Gpib.py is accessible.

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
1 parent e74786e commit 1a56c75247e53b0ba06ab694862eec1a258c3c3e @hxw hxw committed Jan 25, 2010
Showing with 14 additions and 2 deletions.
  1. +1 −1 testudo/init-scripts/gpib
  2. +13 −1 testudo/scripts/BuildGPIB.sh
@@ -1,7 +1,7 @@
#! /bin/sh -e
# configure the GPIB driver
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
+PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin
gpib_start()
{
@@ -12,14 +12,17 @@ main()
fi
[ -e Makefile ] && make clean
autoreconf --verbose --install --symlink
- ./configure --disable-tcl-binding --disable-php-binding --disable-perl-binding --disable-guile-binding --prefix=/usr
+ ./configure --disable-tcl-binding --disable-php-binding --disable-perl-binding --disable-guile-binding
make clean
make
make -C language/python
modprobe -v -r tnt4882
make install
make -C language/python install
+ # update library cache
+ ldconfig -v
+
echo loading the updated driver
modprobe -v tnt4882
@@ -55,6 +58,15 @@ main()
echo 'Now run: sudo visudo'
echo ' or: sudo EDITOR=jove visudo'
echo and paste the above text into file
+
+ # check that the gpib module is usable
+ if ! python -m Gpib
+ then
+ echo '** ERROR:'
+ echo '** The python GPIB.py module is not accessible'
+ echo '** Maybe there are multiple versions of python'
+ echo '** and the wrong one was selected by this install script'
+ fi
}

0 comments on commit 1a56c75

Please sign in to comment.