ggtab, the counterpart to fstab for ggatec (like gg.exports to exports)

From: Emanuel Strobl <Emanuel.strobl_at_gmx.net>
Date: Tue, 9 Aug 2005 19:52:10 +0200
Dear Pawel,

currently I'm trying to make some rcNG compatible startup scripts to 
include ggated and ggatec in the boot process.
My idea was to extend rc.conf with these variables:

--- /etc/defaults/rc.conf       Tue Jul 19 03:01:17 2005
+++ rc.conf.new Tue Aug  9 19:42:52 2005
_at__at_ -223,6 +223,12 _at__at_
 keyserv_enable="NO"            # Run the SecureRPC keyserver (or NO).
 keyserv_flags=""               # Flags to keyserv (if enabled).

+### Network Devices (ggate)
+ggated_enable="NO"             # Provide raw devices via network according 
to /etc/gg.exports
+ggated_flags=""                        # Example: -S 4194304 -R 4194304
+ggatec_enable="NO"             # Create ggate devices at startup accoring 
to /etc/ggtab
+ggatec_flags=""                        # Example: -S 4194304 -R 4194304
+
 ### Network Time Services options: ###
 timed_enable="NO"              # Run the time daemon (or NO).
 timed_flags=""                 # Flags to timed (if enabled).


Now I, the big non-coder, have to write a parser for ggtab, which would be 
a shell script inside /etc/rc.d/ggateclient.
Now I'd like to ask you if you plan to implement something like fstab 
(ggtab) for ggatec, like ggated has with gg.exports. If so, it's nonsense 
that I do the same with a shell script.

Here's the skeleton I planed for /etc/rc.d/ggateclient

#

# PROVIDE: ggateclient
# REQUIRE: NETWORKING root mountcritlocal cleanvar ggatedaemon
# KEYWORD: nojail

. /etc/rc.subr

name="ggateclient"
stop_cmd=":"
start_cmd="ggateclient_start"

ggateclient_start()
{
        # Create ggate devices
        #
        echo -n 'Creating GEOM_GATE devices:'
        ggatec create ${ggate_flags} ${gg.addr} ${gg.dev}
        echo '.

Any hints for implementing ggtab the way I perhaps can do are welcome; 
Actually what's a sensible way to read /etc/ggtab and check/assign values 
for gg.addr and gg.dev?

Best regards,

-Harry

Received on Tue Aug 09 2005 - 15:52:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:41 UTC