Kiss/AX25 and rc.local (was Re: [Xastir] Re: Which distrro are you using)
Rodney Baker
rodney.baker at optusnet.com.au
Wed Feb 28 09:02:59 EST 2007
On Wednesday 28 February 2007, xastir-request at xastir.org wrote:
> > Do you have your /etc/rc.d/rc.local set up?
>
> don't have a rc.local
> do have rc0.1 thu rc6.d and rcS.d
That's because your system uses the SysV Init style instead of the BSD-style
init setup used by Debian and its various offshoots.
The equivalent file will be /etc/rc.d/rc5.d/S99local (which is usually a
symlink to /etc/rc.d/rc.local anyway). If you don't have the file, create it
and create a sym link in rc5.d.
This is slighly OT but it may help some less technical linux users understand
what is going on with the SysV init in Red Hat-based distros (and others
based on SysV init instead of BSD)...
The directories rc0.d through rc5.d relate to the various run levels that the
system can be running in:
Run Level 0 - System Halted
Run Level 1 - Single user mode
Run Level 2 - Single user with networking
Run Level 3 - Multi User mode, no graphical interface (i.e. command
line/terminal only)
Run Level 4 - not yet defined
Run Level 5 - Multi User graphical mode (running X).
Run Level 6 - Shutdown and reboot
The files in each corresponding directory are executed in name order during
the initialisation and shutdown phase of each run level (i.e. at system
startup, shutdown and when changing run levels without rebooting), starting
at S00 to S99 for startup and K00 to K99 for shutdown.
You can control where a process starts up or shuts down (or where a script
file is executed) by changing the order of the startup/kill files in rc0.d
through rc6.d (although you shouldn't do this unless you're sure you know
what you're doing). Note that all these files are usually symlinks to the
actual process control files that live in /etc/rc.d/init.d. Any changes made
to files in init.d will affect all run levels. /etc/init.d/rc.local is a
special case in that it is generally executed after all other startup scripts
but before the logon screen is presented (either text or graphical mode). On
a Sys V init based system it must have a symlink pointing to it in the
corresponding rc[0-6].d directory for the run level where you want it to
execute. In most cases for ax25 scripts you'll want them to run in run level
3 and 5 (and maybe 2) so you would set up /etc/init.d/rc.local to initialise
the kiss and ax25 interfaces and then create a symbolic link to rc.local
in /etc/rc.d/init.d/rc3.d and /etc/rc.d/init.d/rc5.d/ by doing (as root):
ln -s /etc/rc.d/init.d/rc.local /etc/rc.d/init.d/rc5.d/S99local (repeat for
rc3.d if needed). If you now do:
cd /etc/rc.d/init.d/rc5.d
ls -l
...you'll see an entry like:
lrwxrwxrwx 1 root root 11 Dec 31 22:11 S99local -> ../rc.local
>
> Before I run kissattach I need to run mkiss
> # /usr/sbin/mkiss -s 9600 /dev/ttyS1 /dev/ptyq0 /dev/ptyq1
> # /usr/sbin/kissattach /dev/ttyq0 port1 10.22.22.200
> kissattach: Error setting line discipline: TIOCSETD: Invalid argument
> Are you sure you have enabled MKISS support in the kernel
> or, if you made it a module, that the module is loaded?
> I think ax25 module in loaded is there a mkiss module too?
To find out do (as root):
lsmod | grep 'kiss'
If it isn't loaded and needs to be do:
modprobe mkiss
Sorry for the long and slightly OT reply if you already knew this stuff, but
hopefully it will help someone.
BTW, systems that use the BSD-style init like Debian handle all this
differently. YMMV.
Regards,
--
=============================================================
Rodney Baker VK5ZTV
rodney.baker at optusnet.com.au
=============================================================
More information about the Xastir
mailing list