I have written the startup script below so that all services are started. Now of course it is nice if this also happens when booting the server. First the start script.
#!/bin/sh
#
tmpfile="/tmp/$$.startax0.pts"
#
kissnetd -p 2 > "$tmpfile" &
#
sleep 2
#
attachthem () {
read PTS1 PTS2
echo "Starting PTS gekloot voor poort AX0 :)"
kissattach -l $PTS1 ax0 192.168.1.113
ifconfig ax0 netmask 255.255.255.0
sleep 1
sed -i "s,attach sdev3 kiss 3 1 115200 /dev/.*$,attach sdev3 kiss 3 1 115200 $PTS2," /usr/local/xnet/AUTOBOOT.NET
}
tail -n 1 $tmpfile | attachthem
rm $tmpfile
#
tmpfile="/tmp/$$.startax1.pts"
#
kissnetd -p 2 > "$tmpfile" &
#
sleep 2
attachthem () {
read PTS1 PTS2
echo "Starting PTS gekloot voor poort AX1 :)"
kissattach -l $PTS1 ax1 192.168.1.113
ifconfig ax1 netmask 255.255.255.0
sleep 1
sed -i "s,attach sdev4 kiss 4 1 115200 /dev/.*$,attach sdev4 kiss 4 1 115200 $PTS2," /usr/local/xnet/AUTOBOOT.NET
}
tail -n 1 $tmpfile | attachthem
rm $tmpfile
################## Klote slip link ###################################
XNET_DIR=/usr/local/xnet
LINIP=192.168.1.200 # LINUX-IP address
XNET=192.168.1.201 # XNET address
#
cd /usr/local/xnet
./dev &
#
sleep 2
#
attachthem () {
read PTS1 PTS2
echo "Starting PTS gekloot voor de slip link :)"
slattach -s 38400 -p slip $PTS1 &
sleep 1
ifconfig sl0 $LINIP netmask 255.255.255.255 pointopoint $XNET mtu 236 up
sleep 1
sed -i "s,attach sdev6 slip 38400 /dev/.*$,attach sdev6 slip 38400 $PTS2," /usr/local/xnet/AUTOBOOT.NET
}
tail -n 1 /tmp/slip | attachthem
rm /tmp/slip
cd /usr/local/sbin
./ppconversd &
sleep 3
#
cd /usr/local/xnet
./rstatrxd /var/www/cgi-bin/postat/ &
sleep 2
#
/sbin/modprobe netrom
/usr/local/sbin/nrattach -i 192.168.1.113 -m 512 netrom
/usr/local/sbin/nrattach -i 192.168.1.113 -m 512 netcon
/usr/local/sbin/nrattach -i 192.168.1.113 -m 512 netbbs
# Init Netrom
/usr/local/sbin/netromd -i -l -t 30
# Enable External Logons
/usr/local/sbin/ax25d &
/bin/sleep 2
# Start Mheard daemon
/usr/local/sbin/mheardd
# start fbb
/usr/local/sbin/fbb &
# Nu dan eindelijk Xnet
./linuxnet < /dev/tty2 > /dev/tty2 2>&1 &
Now I have created the following file in /etc/init.d with the name xnet.
#!/bin/sh
### BEGIN INIT INFO
# Provides: xnet
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Run /usr/local/xnet/xnet if it exist
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin
. /lib/init/vars.sh
. /lib/lsb/init-functions
do_start() {
if [ -x /usr/local/xnet/xnet ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running pi1lap)"
/usr/local/xnet/xnet
ES=$?
[ "$VERBOSE" != no ] && log_end_msg $ES
return $ES
fi
}
case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
Now it has to be added.
update-rc.d xnet defaults
update-rc.d xnet enable
Well, reboot and see if everything is alright.
