faxGID=`$GREP "^$PROTOGID:" $GROUP | cut -d: -f3`
if [ -z "$faxGID" ]; then faxGID=$defPROTOGID; fi
-while [ -z "$TTY" ] || [ ! -c /dev/$TTY ]; do
- test "$TTY" != "" && echo "/dev/$TTY is not a terminal device."
+DEVPATH="/dev/"
+if [ -n "`echo $TTY | grep "^/"`" ]; then
+ DEVPATH=""
+fi
+
+while [ -z "$TTY" ] || [ ! -c $DEVPATH$TTY ]; do
+ test "$TTY" != "" && echo "$DEVPATH$TTY is not a terminal device."
prompt "Serial port that modem is connected to [$TTY]?"; read TTY
done
{
case "$ModemFlowControl" in
xonxoff|XONXOFF)
- if [ "$TTY" = ttyf${PORT} ] && [ -c /dev/ttym${PORT} ]; then
+ if [ "$TTY" = ttyf${PORT} ] && [ -c $DEVPATH\ttym${PORT} ]; then
echo ""
echo "Warning, the modem is setup to use software flow control,"
echo "but the \"$TTY\" device is used with hardware flow control"
fi
;;
rtscts|RTSCTS)
- if [ "$TTY" = ttym${PORT} ] && [ -c /dev/ttyf${PORT} ]; then
+ if [ "$TTY" = ttym${PORT} ] && [ -c $DEVPATH\ttyf${PORT} ]; then
echo ""
echo "Warning, the modem is setup to use hardware flow control,"
echo "but the \"$TTY\" device does not honor the RTS/CTS signals."
}
ttyAliases()
{
- echo /dev/$1
+ if [ -z "`echo $1 | grep "^/"`" ]; then printf "/dev/"; fi
+ echo $1
}
ttyDev()
{
- echo /dev/$1
+ if [ -z "`echo $1 | grep "^/"`" ]; then printf "/dev/"; fi
+ echo $1
}
checkPort()
{
}
ttyAliases()
{
- echo /dev/$1
+ if [ -z "`echo $1 | grep "^/"`" ]; then printf "/dev/"; fi
+ echo $1
}
ttyDev()
{
- echo /dev/$1
+ if [ -z "`echo $1 | grep "^/"`" ]; then printf "/dev/"; fi
+ echo $1
}
checkPort()
{
}
ttyAliases()
{
- echo /dev/$1
+ if [ -z "`echo $1 | grep "^/"`" ]; then printf "/dev/"; fi
+ echo $1
}
ttyDev()
{
- echo /dev/$1
+ if [ -z "`echo $1 | grep "^/"`" ]; then printf "/dev/"; fi
+ echo $1
}
checkPort()
{
SBIN=@SBIN@
ATCMD=
-NOFUSER=
+DOFUSER=no
SPEED=
while [ x"$1" != x"" ] ; do
case $1 in
-c) ATCMD=$2; shift;;
- -f) NOFUSER=yes;;
+ -f) DOFUSER=yes;;
-os) OS=$2; shift;;
-s) SPEED=$2; shift;;
-*) echo "Usage: $0 [-f] [-c AT_COMMAND] [-os OS] [-s SPEED] [ttyname]"; exit 1;;
ONDELAY=$LIBEXEC/ondelay # prgm to open devices blocking on carrier
CAT="$CAT -u" # something to do unbuffered reads and writes
-while [ -z "$TTY" ] || [ ! -c /dev/$TTY ]; do
+DEVPATH="/dev/"
+if [ -n "`echo $TTY | grep "^/"`" ]; then
+ DEVPATH=""
+fi
+
+while [ -z "$TTY" ] || [ ! -c $DEVPATH$TTY ]; do
if [ "$TTY" != "" ]; then
- echo "/dev/$TTY is not a terminal device."
+ echo "$DEVPATH$TTY is not a terminal device."
fi
prompt "Serial port that modem is connected to [$TTY]?"; read TTY
done
done
# zap any gettys or other users
-if [ x"$NOFUSER" != x"yes" ]; then
+if [ x"$DOFUSER" != x"no" ]; then
if ! [ -f $FUSER ]; then
cat<<EOF
Hmm, there does not appear to be an fuser command on your machine.
u_int l;
while ((l = dev.next(0, '_')) < dev.length())
dev[l] = '/';
+ if (dev[0] == '/') return (dev); // path + device
return (_PATH_DEV | dev);
}