blob: 2635768e4e9a03fffa7c6e5100e710d79a1f1eba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
$NetBSD: patch-ag,v 1.2 2002/08/12 12:06:36 dmcmahill Exp $
--- install.sh.orig Sat Jan 27 16:55:57 2001
+++ install.sh
@@ -28,7 +28,7 @@
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,38 +56,30 @@
;;
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.*;TTY $TTY;" x10config > $FOUND
fi
echo "X10 configuration file at $FOUND will be used."
-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 [ -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
|