[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/init.d startup file for CFS



Attached is the /etc/init.d/cfsd I'm using -- I think
it's based on the one from the redhat distribution,
because (like you) I used that to get a working
cattach.

I don't know that this is perfect, but it works
reliably for me.  If you can't get it to work,
or if you find a way to improve it, please let
me know.

Damon Muller wrote:
> 
> Greets gang,
> 
> I've been playing around with CFS (the cryptographic file system, found
> in non-us in Debian). It's a little broken.
> 
> The cattach command doesn't work, but I've found a way around that one
> (snatched the binary out of a redhat rpm).
> 
> The other thing it's missing is an /etc/init.d file to start it up when
> the system boots.
> 
> I've tried putting a script in rc.boot, but that is executed before the
> rc2.d files, it seems, and it wont work until the nfs stuff is going. So
> it looks like I need to put it in rc2.d, after the NFS stuff.
> 
> What I was hoping is that someone already had one they could send me -
> seems a bit silly reinventing the wheel. I'm not too great at the shell
> scripting... If I didn't have to worry about the 'start' and 'stop'
> stuff, I could prolly use the one I already have...
> 
> Any suggestions greatly appreciated!
> 
> damon
> 
> --
> Damon Muller (damon@empire.net.au)
> Masters Candidate
> Department of Criminology
> University of Melbourne, Victoria, Australia
> 
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

-- 
David Coe          mailto:dcoe@overlord.com
R & D and Support  +1-410-489-9521
Overlord, Inc.     http://www.overlord.com
#!/bin/sh
# Start/stop the cfsd daemon.

test -f /usr/sbin/cfsd || exit 0

case "$1" in
start)	echo -n "Starting CFS: (mountd and) cfsd"
        start-stop-daemon --start --quiet --exec /usr/sbin/rpc.mountd
        start-stop-daemon --start --quiet --exec /usr/sbin/cfsd
        mount -o port=3049,intr localhost:/null /crypt
        echo "." 
	;;
stop)	echo -n "Stopping CFS: cfsd (and mountd)"
        umount /crypt
        start-stop-daemon --stop --quiet --exec /usr/sbin/cfsd
        start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/rpc.mountd
        echo "."
        ;;
restart) echo -n "Re-starting CFS: (mountd and) cfsd"
        umount /crypt
        start-stop-daemon --stop --quiet --exec /usr/sbin/cfsd
        start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/rpc.mountd
        start-stop-daemon --start --quiet --exec /usr/sbin/rpc.mountd
        start-stop-daemon --start --quiet --exec /usr/sbin/cfsd
        mount -o port=3049,intr localhost:/null /crypt
        echo "."
        ;;
reload|force-reload) echo -n "Re-loading configuration of mountd, for CFS"
	# cfsd doesn't have any configuration files
        umount /crypt
        start-stop-daemon --stop --quiet --oknodo --signal 1 --exec /usr/sbin/rpc.mountd
        mount -o port=3049,intr localhost:/null /crypt
        echo "."
        ;;
*)	echo "Usage: /etc/init.d/cfsd start|stop"; exit 1 
        ;;
esac
exit 0

Reply to: