All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shane Deering <vk3bvp@qsl.net>
To: linux-hams@vger.kernel.org
Subject: Re: shutdown script
Date: Thu, 9 Jan 2003 11:57:35 +1100	[thread overview]
Message-ID: <200301091157.35104.vk3bvp@qsl.net> (raw)
In-Reply-To: <NCBBKBAJDJIPKFIAFBKLOEFBEHAC.vze2b869@verizon.net>

On Thu, 9 Jan 2003 07:06, Wilson G. Hein wrote:
> I'm wondering if someone has a script to close ax25 and netrom, etc
> interfaces. I would presume it would have something to look at the pid's
> and then kill the process. I wnat to plug it into
> /etc/sysconfig/network-scripts to automate startup and close through the
> normal init scripts.
>
> TIA,
>
> Regards,
>
> Willie, WJ3G

This isn't elegant, but it is simple and it works.
dip is used to set up pipes between the kernel and JNOS.
The other ports are all hardware kiss ports.
One day (maybe) I'll write something better.
 
#!/bin/sh
# Shut down all our ax25 stuff
# save our netrom routes and nodes first
/usr/sbin/nodesave /etc/ax25/nodes
# Now start shutting down stuff.
fbb stop
pkill ax25d
ifconfig ax0 down
ifconfig ax1 down
ifconfig ax2 down
ifconfig ax3 down
ifconfig ax4 down
ifconfig ax5 down
ifconfig nr0 down
ifconfig nr1 down
ifconfig nr2 down
ifconfig nr3 down
ifconfig nr4 down
ifconfig sl0 down
pkill dip
pkill kissattach
pkill mheardd
pkill netromd
rm /var/lock/LCK.pty* 2>/dev/null
rm /var/lock/LCK.tty* 2>/dev/null
#It should be OK to shut down now.


-- 
Shane Deering   vk3bvp@qsl.net 	vk3bvp@vk3bvp.#sev.vic.aus.oc
http://www.qsl.net/vk3bvp/		Up 51 minutes 
Sent with KMail v1.4.1 on Thu Jan  9 11:33:44 EST 2003


  reply	other threads:[~2003-01-09  0:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-08 20:06 shutdown script Wilson G. Hein
2003-01-09  0:57 ` Shane Deering [this message]
2003-01-09  6:16 ` pa3gcu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301091157.35104.vk3bvp@qsl.net \
    --to=vk3bvp@qsl.net \
    --cc=linux-hams@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.