blob: f87ca439eda952f8e67400305d600d6b4f06f99c (
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
70
71
72
73
74
75
|
$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`
|