Hi!

> Does any one know how to intergrate the ax25 network configuration into a RedHat 
>setup scripts.
> (current version 5.2)

I have just done the following at a friends computer. You could perhaps use
this to get started. It uses a DRSI-card so if you use a TNC you have to remove
that part of the script. The script should be located in /etc/rc.d/init.d 
and have to be linked from /etc/rc.d/rc3.d and /etc/rc.d/rc5.d as S98ax25
or something like that (to be started late in the sequence.) You also have
to add it to /etc/rc.d/rc0.d and /etc/rc.d/rc6.d as K10ax25 (to be stopped
early in the sequence.)  The script could be done better and I will try to
make it better when I have more time. If anyone have any ideas, please let
me know.

If you use a DRSI-card and stops ax25 (with "/etc/rc.d/init.d/ax25 stop")
and then restarts ax25 you will get a fault message as the DRSI-card is
already initialized.

One may involve ax25 even further into the scripts, for instance using
the files in /etc/sysconfig but I have not looked that much into that.

73 de Lars, sm6rpz

Ok, here it comes:
----
#!/bin/bash

# Ax25 setup

# source function library
. /etc/rc.d/init.d/functions

case "$1" in
  start)
        echo -n "Starting ax25: "
        sccinit
        echo -n "sccinit "
        sleep 4
        ifconfig scc0 44.140.192.5 hw ax25 sm6kst-1 up
        ifconfig nr0 44.140.192.5 hw netrom sm6kst-5 up
        route add -host 44.140.192.45 scc0
        route add -net 44.0.0.0 gw 44.140.192.45 scc0
        axparms -assoc sm6kst sm6kst
        axparms -assoc sm6rpz sm6rpz
        ax25d -l
        echo -n "ax25d "
        netromd -i -l -t 30
        echo -n "netromd "
        mheardd -l
        echo -n "mheardd "
        echo
        ;;
  stop)
        echo -n "Shutting down ax25: "
        killall ax25d
        echo -n "ax25d "
        killall netromd
        echo -n "netromd "
        killall mheardd
        echo -n "mheardd "
        ifconfig scc0 down
        ifconfig nr0 down
        echo
        ;;
  *)
        echo "Usage: ax25 {start|stop}"
        exit 1
esac

exit 0
----

-- 
Lars E Pettersson        |  Chalmers University of Technology
[EMAIL PROTECTED]  |  Gothenburg, SWEDEN

Reply via email to