Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 1998 00:39:41 +0200
From:      Julian Stacey <jhs@FreeBSD.ORG>
To:        "Hellmuth Michaelis" <hm@kts.org>
Cc:        freebsd-isdn@FreeBSD.ORG
Subject:   i4b-00.62-alpha-120698/src/i4b/isdnd/rc_scan.l.diff
Message-ID:  <199806142239.AAA01203@jhs.muc.de>

next in thread | raw e-mail | index | archive | help
Hi Hellmuth,
cc list

Ref your README
	.. support incoming-only ...

I was delighted to see this had been added, 
but to avoid /var/log/isdnd.log0:14.06.98 23:22:59 \
ERR configuration error: syntax error at line 247, token "direction"

*** i4b-00.62-alpha-120698/src/i4b/isdnd/rc_scan.l	Mon May  4 11:21:28 1998
--- new/src/i4b/isdnd/rc_scan.l	Sun Jun 14 23:34:56 1998
***************
*** 104,109 ****
--- 104,110 ----
  dialout-type			{ return DIALOUTTYPE; }
  dialrandincr			{ return DIALRANDINCR; }
  dialretries			{ return DIALRETRIES; }
+ direction			{ return DIRECTION; }
  downtries			{ return DOWNTRIES; }
  downtime			{ return DOWNTIME; }
  earlyhangup			{ return EARLYHANGUP; }


I also wrote this below, as a temporary horrible cludge ;-)

---
#!/bin/sh
# ISDN direction script		by Julian Stacey <jhs@freebsd.org>
# Linked names as isdn_in isdn_out isdn_inout

# This script changes the config of all interfaces to one of in only,
# out only, or both.  After use, tell isdnd to reread the config file.
#
# I will leave isdnd running 24/7 (to report audio phone numbers etc,
# as I have no isdn phone with lcd display), but I don't want to trust
# my named & mailer etc configs not to dial out & run up a bill.
# So this alternates all interfaces between incoming only, most of the time,
# & inout the minority of the time.

# It'd be nicer to have a global isdnd interactive menu Comand (5)
# to integrate this global on/off, but for now this works OK.

cd /etc/isdn || exit 1
case `basename $0` in
	isdn_inout)
		to=inout
		;;
	isdn_in)
		to=in	
		;;
	isdn_out)
		to=out	
		;;
	*)
		echo "Invalid name calling $0"
		exit 1
		;;
	esac

dir="direction		= "
# Cludge!  Tabs & space above must Exactly match your isdnd.rc file !

# Ensure we do not expand to inoutout etc by using 4 * sed.
sed -e s/"${dir}inout"/"${dir}xxx"/ < isdnd.rc	| \
 sed -e s/"${dir}in"/"${dir}xxx"/	| \
 sed -e s/"${dir}out"/"${dir}xxx"/	| \
 sed -e s/"${dir}xxx"/"${dir}$to"/ > isdnd.rc.sed_tmp 

if [ -s isdnd.rc.sed_tmp ]; then # -s to avoid zapping with a zero size file.
	cat isdnd.rc.sed_tmp > isdnd.rc # not mv in case of a symbolic link.
fi

echo "Please tell isdnd to re-read config file, that now uses"
echo "`grep \"${dir}\" isdnd.rc | head -1`"
---

Julian
Julian H. Stacey  <jhs@freebsd.org>  http://www.freebsd.org/~jhs/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806142239.AAA01203>