AX25 in /etc/init.d
I installed AX.25 on a system a couple of days ago and when I copied my usual ax25 script into /etc/init.d/ I received a message saying that the script did not have a proper header. The script worked without any problem, but it started me thinking. Most Ax.25 Howto Docs make little of the bootup process. Some even suggest that the kissattach and other config commands be placed in the rc.local file.
AX.25 is becoming a major work in Linux systems. It deserves to have it's own boot script. I have been using the same script for years and I recently added the the requested header. I would like to suggest that AX.25 How to docs include the use of such a script and have attached my script as an example.
73
<<Charley>>
k4gbb
#! /bin/bash
# Provided by Charles S Schuman ( K4GBB )
# 04/29/09
### BEGIN INIT INFO
# Provides: ax25
# Required-Start: /etc/ax25/ax25-up
# Required-Stop: /etc/ax25/ax25-down
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Ax.25 initialization
# Description: This script provides the control for the ax.25 packet radio service.
# The fine tuneing is accomplished via /etc/ax25/ax25-up and /etc/ax25/ax25-down.
#
### END INIT INFO
StartAx25="yes"
# /etc/init.d/ax25
#
# Kernel-Parameter "ax25=yes|no" ?
if [ "`grep -e [Aa][Xx]25=[Nn][Oo] /proc/cmdline`" != "" ] ; then
echo -e "ax25: Aborting startup on user request (kernel boot
parameter)."
exit 1
ficase "$1" in
start|-start)
echo "/etc/init.d/ax25: Starting AX25..."
/etc/ax25/ax25-up
;;
stop|-stop)
echo "Stopping AX25..."
/etc/ax25/ax25-down
;;
restart|-restart)
echo "AX25 Restart"
/etc/ax25/ax25-down
sleep 1
/etc/ax25/ax25-up
;;
status|-status)
if [ ! -d /proc/sys/net/ax25 ] ; then
echo "ax25 is down"
else
echo "$(ls /proc/sys/net/ax25)" > /tmp/ax25-config.tmp
read Select < /tmp/ax25-config.tmp
i=0
while [ "$Select" != "" ]
do
let i=i+1
awk ' NR == '$i' { print $1 }' /tmp/ax25-config.tmp >
/tmp/ax25-config-tmp
read Select < /tmp/ax25-config-tmp
if [ "$Select" != "" ]; then
/sbin/ifconfig "$Select"
fi
done
if [ -z "$(uname -r | grep kjd)" ] ;then
netstat --ax25
else
/sbin/ifconfig ipax0
cat /proc/net/ax25
fi fi
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit 0
Quoted 22 lines · C Schuman
I installed AX.25 on a system a couple of days ago and when I copied my usual ax25 script into
/etc/init.d/I received a message saying that the script did not have a proper header. The script worked without any problem, but it started me thinking. Most Ax.25 Howto Docs make little of the bootup process. Some even suggest that the kissattach and other config commands be placed in the rc.local file.AX.25 is becoming a major work in Linux systems. It deserves to have it's own boot script. I have been using the same script for years and I recently added the the requested header. I would like to suggest that AX.25 How to docs include the use of such a script and have attached my script as an example.
73
<<Charley>>
k4gbb#!
/bin/bash
# Provided by Charles S Schuman ( K4GBB )
# 04/29/09
Quoted 14 lines
### BEGIN INIT INFO
# Provides: ax25
# Required-Start:/etc/ax25/ax25-up
# Required-Stop:/etc/ax25/ax25-down
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Ax.25 initialization
# Description: This script provides the control for the ax.25 packet radio service.
# The fine tuneing is accomplished via/etc/ax25/ax25-upand/etc/ax25/ax25-down.
#
### END INIT INFO
I assume the lines between "BEGIN INIT INFO" and "END INIT INFO" are the header lines you are referring to. If so, please understand that not all Linux distributions use the same startup process and so do not necessarily use or require those headers.
FWIW, Debian includes a startup script in the ax25-tools package. It sets up the mheardd, ax25d, and netromd.
73,
Pat
Signature · 5 lines
Patrick Ouellette [email protected] ne4po (at) arrl (dot) net Amateur Radio: NE4PO "Crank the amp to 11, this needs more cowbell - and a llama wouldn't hurt either" "Your arguments are an odd mix of overly optimistic on one side and overly pessimistic on the other"
Quoted 32 lines · Patrick Ouellette
Quoted 12 lines · C Schuman
I installed AX.25 on a system a couple of days ago and when I copied my usual ax25 script into
/etc/init.d/I received a message saying that the script did not have a proper header. The script worked without any problem, but it started me thinking. Most Ax.25 Howto Docs make little of the bootup process. Some even suggest that the kissattach and other config commands be placed in the rc.local file.AX.25 is becoming a major work in Linux systems. It deserves to have it's own boot script. I have been using the same script for years and I recently added the the requested header. I would like to suggest that AX.25 How to docs include the use of such a script and have attached my script as an example.
73
<<Charley>>
k4gbb#!
/bin/bash
# Provided by Charles S Schuman ( K4GBB )
# 04/29/09Quoted 13 lines
### BEGIN INIT INFO
# Provides: ax25
# Required-Start:/etc/ax25/ax25-up
# Required-Stop:/etc/ax25/ax25-down
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Ax.25 initialization
# Description: This script provides the control for the ax.25 packet radio service.
# The fine tuneing is accomplished via/etc/ax25/ax25-upand/etc/ax25/ax25-down.
#
### END INIT INFOI assume the lines between "BEGIN INIT INFO" and "END INIT INFO" are the header lines you are referring to. If so, please understand that not all Linux distributions use the same startup process and so do not necessarily
use or require those headers.
Quoted 7 lines
FWIW, Debian includes a startup script in the ax25-tools package. It sets up the mheardd, ax25d, and netromd.
73,
Pat
Thanks Pat,
Yes, your assumption is correct.
I use Ubuntu and Debian. I have never seen any of the Debian Startup scripts for AX.25.
The problem with with most of the supplied or example start scripts is that they never do what you want them to do. The Linux HAM Radio community are an assorted lot. I have approx 14 Packet Radio servers and no two are the same. I have been Elmering a number of individuals who are attempting their first installion of Linux. Some just want a RMS Gate. Others want a BBS, Node and an assortment of other apps.
My point was not really "We need to add Header Info", but more toward the "We need a more versatile script"
By pointing our start up script at /etc/ax25/ax25-up & down we can use a common script to transition to an uncommon system initialization.
73
<<Charley>>
k4gbb
Quoted 22 lines · C Schuman
Quoted 8 lines
FWIW, Debian includes a startup script in the ax25-tools package. It sets up the mheardd, ax25d, and netromd.
73,
Pat
Thanks Pat,
Yes, your assumption is correct.I use Ubuntu and Debian. I have never seen any of the Debian Startup scripts for AX.25.
The problem with with most of the supplied or example start scripts is that they never do what you want them to do.
The Linux HAM Radio community are an assorted lot. I have approx 14 Packet Radio servers and no two are the same.
I have been Elmering a number of individuals who are attempting their first installion of Linux. Some just want a RMS Gate. Others want a BBS, Node and an assortment of other apps.
Quoted 5 lines
My point was not really "We need to add Header Info", but more toward the "We need a more versatile script"
By pointing our start up script at/etc/ax25/ax25-up& down we can use a common script to transition to an uncommon system initialization.
Well, I just checked, and the most recent ax25-tools does not install the startup script. There used to be one in the debian source package.
Anyway, I agree in principle that ax25 should have startup scripts - BUT as you point out, each system is different. Several (> 7) years ago I looked at creating comprehensive set up scripts for Debian's ax25 packages and decided there were just too many variables and not enough interest to make it worth the time. It was easier and faster to set up the boxes individually.
The upstream ax25 package has *almost* not changed for a very long time. Either it is completely debugged, there is not a bug that hits anyone's "button," or there are not enough users to push for lots of activity there. (I'm not saying it is unmaintained, but that there has been little change in both the ax25 apps/tools and the kernel ax25 code for quite some time.)
There is a wiki at www.linux-ax25.org and a few other efforts around.
73,
Pat
Signature · 5 lines
Patrick Ouellette [email protected] ne4po (at) arrl (dot) net Amateur Radio: NE4PO "Crank the amp to 11, this needs more cowbell - and a llama wouldn't hurt either" "Your arguments are an odd mix of overly optimistic on one side and overly pessimistic on the other"
Quoted 40 lines · Patrick Ouellette
Quoted 13 lines · C Schuman
Quoted 8 lines
FWIW, Debian includes a startup script in the ax25-tools package. It sets up the mheardd, ax25d, and netromd.
73,
Pat
Thanks Pat,
Yes, your assumption is correct.I use Ubuntu and Debian. I have never seen any of the Debian Startup scripts for AX.25.
Quoted 9 lines
The problem with with most of the supplied or example start scripts is that they never do what you want them to do. The Linux HAM Radio community are an assorted lot. I have approx 14 Packet Radio servers and no two are the same. I have been Elmering a number of individuals who are attempting their first installion of Linux. Some just want a RMS Gate. Others want a BBS, Node and an assortment of other apps.
My point was not really "We need to add Header Info", but more toward the "We need a more versatile script"
By pointing our start up script at/etc/ax25/ax25-up& down we can use a common script to transition to an uncommon system initialization.Well, I just checked, and the most recent ax25-tools does not install the startup script. There used to be one in the debian source package.
Anyway, I agree in principle that ax25 should have startup scripts - BUT as you point out, each system is different. Several (> 7) years ago I looked at creating comprehensive set up scripts for Debian's ax25 packages and decided there were just too many variables and not enough interest to make it worth the time. It was easier and faster to set up the boxes individually.
The upstream ax25 package has *almost* not changed for a very long time. Either it is completely debugged, there is not a bug that hits anyone's "button," or there are not enough users to push for lots of activity there. (I'm not saying it is unmaintained, but that there has been little change in both the ax25 apps/tools and the kernel ax25 code for quite some time.)
Quoted 6 lines
There is a wiki at www.linux-ax25.org and a few other efforts around.
73,
Pat
I understand that fpac cannot be simply stopped and restarted, it needs a reboot. If that is correct, is there any point in an ax25 script for stations who use fpac?
Ray vk2tv
Quoted 39 lines · Ray Wells
Quoted 38 lines · Patrick Ouellette
Quoted 10 lines · C Schuman
Quoted 7 lines
FWIW, Debian includes a startup script in the ax25-tools package. It sets up the mheardd, ax25d, and netromd.
73,
Pat
Thanks Pat,
Yes, your assumption is correct.Quoted 10 lines
I use Ubuntu and Debian. I have never seen any of the Debian Startup scripts for AX.25.
The problem with with most of the supplied or example start scripts is that they never do what you want them to do. The Linux HAM Radio community are an assorted lot. I have approx 14 Packet Radio servers and no two are the same. I have been Elmering a number of individuals who are attempting their first installion of Linux. Some just want a RMS Gate. Others want a BBS, Node and an assortment of other apps.My point was not really "We need to add Header Info", but more toward the "We need a more versatile script"
By pointing our start up script at/etc/ax25/ax25-up& down we can use a common script to transition to an uncommon system initialization.Well, I just checked, and the most recent ax25-tools does not install the startup script. There used to be one in the debian source package.
Anyway, I agree in principle that ax25 should have startup scripts - BUT as you point out, each system is different. Several (> 7) years ago I looked at creating comprehensive set up scripts for Debian's ax25 packages and decided there were just too many variables and not enough interest to make it worth the time. It was easier and faster to set up the boxes individually.
The upstream ax25 package has *almost* not changed for a very long time. Either it is completely debugged, there is not a bug that hits anyone's "button," or there are not enough users to push for lots of activity there. (I'm not saying it is unmaintained, but that there has been little change in both the ax25 apps/tools and the kernel ax25 code for quite some time.)
Quoted 9 lines
Quoted 5 lines
There is a wiki at www.linux-ax25.org and a few other efforts around.
73, Pat
I understand that fpac cannot be simply stopped and restarted, it needs a reboot. If that is correct, is there any point in an ax25 script for stations who use fpac?
Ray vk2tv
Ray,
AX25, FPAC & FBB can all be restarted w/o rebooting.
It's all in the way you construct your stop shut process.
I'll send you a copy of my fpac.sh and my ax25-down.
I have a couple of systems that have uptimes of over 60 days even though I have made changes to the configuration and restarted the service. Once in awhile ROSE will cause a kernel panic on the Stopping and the system will reboot on panic. This occurs mainly on the systems with a co located BBS.
73
<<Charley>>
k4gbb
Quoted 40 lines · Patrick Ouellette
Quoted 13 lines · C Schuman
Quoted 8 lines
FWIW, Debian includes a startup script in the ax25-tools package. It sets up the mheardd, ax25d, and netromd.
73,
Pat
Thanks Pat,
Yes, your assumption is correct.I use Ubuntu and Debian. I have never seen any of the Debian Startup scripts for AX.25.
Quoted 9 lines
The problem with with most of the supplied or example start scripts is that they never do what you want them to do. The Linux HAM Radio community are an assorted lot. I have approx 14 Packet Radio servers and no two are the same. I have been Elmering a number of individuals who are attempting their first installion of Linux. Some just want a RMS Gate. Others want a BBS, Node and an assortment of other apps.
My point was not really "We need to add Header Info", but more toward the "We need a more versatile script"
By pointing our start up script at/etc/ax25/ax25-up& down we can use a common script to transition to an uncommon system initialization.Well, I just checked, and the most recent ax25-tools does not install the startup script. There used to be one in the debian source package.
Anyway, I agree in principle that ax25 should have startup scripts - BUT as you point out, each system is different. Several (> 7) years ago I looked at creating comprehensive set up scripts for Debian's ax25 packages and decided there were just too many variables and not enough interest to make it worth the time. It was easier and faster to set up the boxes individually.
The upstream ax25 package has *almost* not changed for a very long time. Either it is completely debugged, there is not a bug that hits anyone's "button," or there are not enough users to push for lots of activity there. (I'm not saying it is unmaintained, but that there has been little change in both the ax25 apps/tools and the kernel ax25 code for quite some time.)
Quoted 6 lines
There is a wiki at www.linux-ax25.org and a few other efforts around.
73,
Pat
Pat,
I setup, on the average of two Packet Radio Servers a month. Like you I started fiddling with the Startup script back in the days of Knoppix AR 4.? The script I use evolved from the script generated by ax25config. I couldn't use ax25config for the setup of my servers, but it served as a model. It is prob as close as you can get to a one size fits all solution.
I have been working as a Beta Tester for some of Bernard Pidoux's (F6BVP) work on FBB BBS and FPAC.
He has also made contributions to the Kernel's source. As you say it has become "close enough for comfort". That may change shortly. We are on the cusp of change between devfs and udev. It has been in the wind for four or five years. Ubuntu 9.04 dropped the devfs from the compiled kernel. If you can't function with udev you have to recompile.
I've been pushing Linux for the HAM Radio population for almost ten years and I am beginning to see some progress. Packet Radio is beginning to come back and Windows support is too painful to setup. It's like building a skyscraper to house your dog.
73
<<Charley>>
k4gbb