I have a script file in sbin called dojnos. In my etc/rc.d/rc.local I have
dojnos on a line so it will start when linux boots up. Below is the script.
You'd have to replace my ip and call with yours. Hope it helps.
--------------------------------------------------------------------
#! /bin/sh
# Script to invoke the Linux Jnos. Usage: dojnos [optional_args]
# User should edit definitions for jnosroot and autoexec, and edit the
# $local and $remote addresses and $mtu value in the DIP script below:
jnosroot=/jnos
autoexec=autoexec.nos
if [ $TERM = xterm ]; then
TERM=xterm-color # xterms is another possibility
fi
tset 2> /dev/null
cd $jnosroot
rm spool/mqueue/*.lck 2>/dev/null
QRZDRV=/cdrom
export QRZDRV
MSGUSER=n0yii
USER=n0yii
export QRZDRV MSGUSER USER
# See if we already have a DIP process running for ptye
DODIP=1
ps ax|grep -e "-dip (" > /tmp/dip.$$
if [ -s /tmp/dip.$$ ]; then
grep -q " pe " /tmp/dip.$$
DODIP=$? # 0 => dip already running
fi
# Establish a slip link from Linux via pseudo-tty "e" to a Jnos task
# (use 'dip -k' to kill dip daemon)
if [ $DODIP -ne 0 ]; then
dip -t << \=EOF=
port ptype
# Linux address:
get $local linux.n0yii.ampr.org
# Jnos/Tnos address:
get $remote n0yii.ampr.org
get $netmask 255.255.255.0
get $mtu 1500
mode slip
#proxyarp
exit
=EOF=
fi
rm /tmp/dip.$$
# It seems that the proxyarp DIP cmd is failing...so we do it ourselves.
# We want the Linux ip stack to respond to ARPs for the Jnos IP addr,
# for those packets received via eth0 (ethernet).
#arp -Ds n0yii.ampr.org eth0 pub
# Corresponding to the above slip setup, are matching Jnos attachments:
# in autoexec.nos file:
# attach asy ttype 0 slip linux 3000 1500 9600
# asyconfig linux txq 10
# asyconfig linux rxq 10
# Rename any existing core file so we can use GDB later to debug it
if [ -f core ]; then
mv core core.`date "+%y%m%d-%T"`
fi
# Starts jnos in tty7:
exec ./jnos -d/jnos -g2 </dev/tty7 > /dev/tty7 2>& 1 &
echo "exec of jnos returned error code $?"
# End of dojnos.
------------------------------------------------------
----- Original Message -----
From: "Marco Calistri" <[EMAIL PROTECTED]>
Newsgroups: fa.linux.hams
To: <[EMAIL PROTECTED]>
Sent: Friday, March 17, 2000 1:12 AM
Subject: Script for JNOS
> Hello,this is the third message I try to deliver,but until now nobody
answer
> to me.
> I could suppose that it is also because my question it is not totally
> "Linux-oriented",
> and involves another argument on which a specific mailing list exists
> ([EMAIL PROTECTED]),
> but I wonder try once more to ask if somebody could suggest me a way to
> realize a script
> that can make start jnos by a GNOME icon from the desktop.
> To use my jnos I have to click on the terminal icon,then issue the
following
> commands:
>
> " cd / "
> " cd jnos "
> " exec ./jnos -g2 -fnos.cfg "
>
> Any suggestions ??
>
> Many thanks!
> Marco ik5bcu <ik5bcu.ampr.org 44.134.210.32>
>
>