$NetBSD: patch-ag,v 1.3 2003/11/11 10:17:39 wiz Exp $ --- install.sh.orig Tue Sep 4 05:11:45 2001 +++ install.sh @@ -28,7 +28,7 @@ if [ "$FOUND" = "" ] ; then while : ; do echo "Where would you like the sample X10 configuration installed?" echo "The default is $HOME/.x10config" - read WHERE + WHERE=${PREFIX}/share/examples/heyu/x10config if [ "$WHERE" = "" ] ; then FOUND=$HOME/.x10config break @@ -56,14 +56,9 @@ if [ ! -f $FOUND ] ; then ;; esac echo "To which port is the CM11 attached?" - read WHERE - if [ "$WHERE" != "" ] ; then - if [ -e $WHERE ] ; then - TTY=$WHERE - break - fi - echo "I could not find the device you specified. Please try again." - fi + WHERE=$DEFAULT_SERIAL_DEVICE + TTY=$WHERE + break done sed "s;^TTY.*;OPTION TTY $TTY;" x10config > $FOUND @@ -71,29 +66,22 @@ fi echo "X10 configuration file at $FOUND will be used." -eval `sed -n "s/^TTY[ ]*/TTY=/p" $FOUND ` -if [ "$TTY" = "" ] ; then - eval `sed -n "s/^OPTION[ ]*TTY[ ]*/TTY=/p" $FOUND ` -fi - -#Check TTY permisions -set `ls -l $TTY` none -if [ $1 = "none" ] ; then - echo "fatal error: The TTY device $TTY can not be located" - exit -fi +if [ -e $TTY ]; then + eval `sed -n "s/^TTY[ ]*/TTY=/p" $FOUND` -if [ "$1" != crwxrwxrwx ] ; then - if [ "$ME" != root ] ; then - echo "If you want users other than root to be able to run HEYU, " - echo "you'll have to log in as root and run the command \"chmod 777 $TTY\"" - else - chmod 777 $TTY - fi -else - echo "The TTY permissions were OK." + #Check TTY permisions + set `ls -l $TTY` none + if [ $1 = "none" ] ; then + echo "WARNING: The TTY device $TTY can not be located" + else + if [ "$1" != crwxrwxrwx ] ; then + echo "If you want users other than root to be able to run HEYU, " + echo "you'll have to log in as root and run the command \"chmod 777 $TTY\"" + else + echo "The TTY permissions were OK." + fi + fi fi - # Directories: spool and lock # get the lockdir and spooldir compile options by using the hidden option 'list' eval `./heyu list`