Re: Announcing supermount-0.6 for 2.0.32 (fwd)

1997-12-03 Thread Kenneth MacDonald
Paul Seelig <[EMAIL PROTECTED]> writes:

> 
> Hi all!
> 
> Passing on an announcement i've long been waiting for! :-)
> 
> This kernel patch would be a very nice user friendly addon for Debian. 
> How about applying this patch to the distribution kernel?
> 
> I'm currently compiling it in and will be playing around with it for a
> while. I think it would be a good idea if people here could heavily
> test the supermount patch.
>   Thank you, P. *8^)

I've been using Stephen's supermount patches since before their
official release (he wrote them while we were working at a linux based
Internet cafe a few years ago).  The only shortcomings I have come
across are...

 o Doesn't work well with modularised device drivers or filesystems.
 o Cannot NFS export the supermount mount point.
 
The first is the one which may sting us, but I presume the floppy and
IDE drivers are compiled into the boot disc kernel, along with at
least ext2fs and at least some form of dosfs.

This patch would, above all, simplify the floppy installation code.

Kenny.

> -- Forwarded message --
> Date: Mon, 24 Nov 1997 22:56:31 GMT
> From: "Stephen C. Tweedie" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: Stephen Tweedie <[EMAIL PROTECTED]>
> Subject: Announcing supermount-0.6 for 2.0.32
> 
>   Announcing supermount-0.6 for 2.0.32 kernels
>   
> 
> The latest release of supermount, supermount-0.6, is now available at
> 
> ftp://linux.dcs.ed.ac.uk/pub/linux/supermount/supermount-0.6.diff.gz
> 
> (to appear at)
> ftp://sunsite.unc.edu/pub/Linux/system/filesystems/supermount-0.6.diff.gz
> 


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .



Re: ppp's ip-{up,down} and possible utilization of 'run-parts'

1997-12-16 Thread Kenneth MacDonald
"Adam P. Harris" <[EMAIL PROTECTED]> writes:

> 
> 
> Maybe I should submit this as a wishlist to the bug system, but I was
> interested in getting some comments first.
> 
> I think that /etc/ppp/ip-up and /etc/ppp/ip-down should use
> 'run-parts' against, say, the directories /etc/ppp/ip-{up,down}.d/.
> 
> This would allow, for instance, MTA packages to ship little scripts to
> flush the mail queue when the link comes up, pop-deamons to start up,
> bind to reload, clock sync daemons to re-sync, firewall and
> masquerading rules to run, and dynamic PPP hosts to update some file
> on some server indicating their current IP.

Well, the recent discussion of using run-parts in ip-up and ip-down
finally convinced me to doing a little cleaning up of my hacked
together system.  I've basically implemented what Adam Harris was
asking for, together with a HTML form, so that my wife can control our
expensive (UK) modem link from her Windows 95 box.

I'll launch straight into the scripts and describe as I go along.

Here's my ip-up script...

 /etc/ppp/ip-up ===
#!/bin/sh
#
# This script is run by the pppd after the link is established.
# It should be used to add routes, set IP address, run the mailq
# etc.
#
# This script is called with the following arguments:
#Arg  Name   Example
#$1   Interface name ppp0
#$2   The ttyttyS1
#$3   The link speed 38400
#$4   Local IP number12.34.56.78
#$5   Peer  IP number12.34.56.99
#$6   Something passed with the 'ipparam' option for pppd

# Save the options for possible later use
INTERFACE=$1
TTY=$2
SPEED=$3
LOCAL_IP=$4
PEER_IP=$5

# Set up the runtime flag directory
RUNDIR=/var/run/ppp

# Set defaults
FLASH=/bin/false

# Parse the flags
# Note that $6 is not protected in quotes here, so to break it up into
# fields again.
set $6
while [ "$1" != "" ]
do
case "$1" in
flash)  FLASH=/bin/true ;;
"get-mail") touch $RUNDIR/get-mail ;;
"send-mail")touch $RUNDIR/send-mail ;;
"get-news") touch $RUNDIR/get-news ;;
"get-www")  touch $RUNDIR/get-www ;;
esac
shift
done

# Do all the things we want to when we're connected
/bin/run-parts /etc/ppp/ip-up.d

# If it's a flash session, wait until all done, then kill link.
if $FLASH
then
while [ "`/bin/ls $RUNDIR`" != "" ]
do
sleep 5
done
killall -TERM pppd
fi

exit 0

# End of file.
 EOF /etc/ppp/ip-up 

It is important that pppd is called in a statement in the form

pppd ipparam "flash get-news get-mail"

Notice the quoting around the argument.  It is there since only one
argument gets passed to the ip-up script, not the rest of the command
line.

Each of the lines in the case statement correspond to a script in the
/etc/ppp/ip-up.d/ directory, apart from the FLASH check.  I've
borrowed the 'flash session' name from AOL (hope it's not
trademarked!)  The flags to `pppd ipparam [flags]` pass on the
information as to which services to run in this ppp session.  Each
required service results in a flag file being touched in /var/run/ppp,
and the scripts check for this flag.

There are two types of script in ip-up.d. These which we always want
to run (bind, masq, etc) and those we only want to run on choice.

When a script is done, it removes the corresponding flag file.  The
ip-up script, if it's been called as a flash session loops until there
are no flag files left, and then brings the ppp link down.  Otherwise,
it exits gracefully, and awaits the user/admin to close the link when
they wish to.

Here's my getnews script...

 /etc/ppp/ip-up.d/50getnews 
#!/bin/sh

# This script will exchange news with the outside world

FLAG=/var/run/ppp/get-news

if [ -f $FLAG ]
then
  if [ -x /usr/sbin/get-news ] ; then
( \
  if [ -x /usr/bin/logger ] ; then \
/usr/bin/logger -t get-news -p news.info "Starting to get news..."; \
  fi ; \
  /usr/sbin/get-news ; \
  /bin/rm -f $FLAG ; \
  if [ -x /usr/bin/logger ] ; then \
/usr/bin/logger -t get-news -p news.info "Finished getting news."; \
  fi ; \
) &
  else
/bin/rm -f $FLAG
  fi
fi

exit 0

=== EOF /etc/ppp/ip-up.d/50getnews ==

So, it basically checks for the flag file set in ip-up script and runs
only if it's there.  There's a similar sequence of scripts in
ip-down.d which clean up the flags if any are left (modem lines do
die), and remove masquerading, reset bind for offline mode, etc.

Here's the whole tree of scripts.  Feel free to criticise, alter,
and use freely.

begin 644 etc.ppp.tar.gz
M'XL(`.T)ES0``^U;6V_;[EMAIL PROTECTED])[EMAIL PROTECTED]:N8-/[EMAIL 
PROTECTED];!\<'+1%
M2HE+B3!%,MQE%/_[SBPONE&B;4ARTW`,6!)W=W;(G6]F=G;(Q'APM/ZZC&IH7-U