78 lines
2.1 KiB
Text
78 lines
2.1 KiB
Text
$NetBSD: patch-ag,v 1.6 2009/12/11 00:11:11 abs Exp $
|
|
|
|
--- install.sh.orig 2003-12-16 16:54:55.000000000 +0000
|
|
+++ install.sh
|
|
@@ -17,7 +17,7 @@ fi
|
|
# Files: x10config x10sched.conf
|
|
FOUND=
|
|
for FL in $X10CONFIG $HOME/.x10config /etc/x10.conf ; do
|
|
-if [ -e $FL ] ; then
|
|
+if [ -f $FL -o -h $FL ] ; then
|
|
FOUND=$FL
|
|
echo "An X10 Configuration file was found at $FL"
|
|
break
|
|
@@ -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=${DESTDIR}${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
|
|
+ WHERE=$DEFAULT_SERIAL_DEVICE
|
|
TTY=$WHERE
|
|
break
|
|
- fi
|
|
- echo "I could not find the device you specified. Please try again."
|
|
- fi
|
|
done
|
|
sed "s;^TTY.*;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
|
|
+if [ -c $TTY -o -h $TTY ]; then
|
|
+ eval `sed -n "s/^TTY[ ]*/TTY=/p" $FOUND`
|
|
|
|
-#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 [ "$1" != crwxrwxrwx ] ; then
|
|
- if [ "$ME" != root ] ; then
|
|
+ #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
|
|
- chmod 777 $TTY
|
|
- fi
|
|
-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`
|