Date: 04 Apr 2001 05:51:03 +0200 From: Cyrille Lefevre <clefevre-lists@noos.fr> To: "David O'Brien" <arch@FreeBSD.ORG> Cc: Cy Schubert - ITSD Open Systems Group <Cy.Schubert@uumail.gov.bc.ca>, Jack Rusher <jar@integratus.com>, Neil Blakey-Milner <nbm@mithrandr.moria.org>, Michael Lucas <mwlucas@blackhelicopters.org>, "litos2001@libero.it" <litos2001@libero.it> Subject: Re: Startup scripts a la NetBSD Message-ID: <ofuds4pk.fsf@gits.dyndns.org> In-Reply-To: <20010330115252.A93566@dragon.nuxi.com> References: <3AC4B808.9EB5806B@integratus.com> <200103301810.f2UIAGK06787@cwsys.cwsent.com> <20010330115252.A93566@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
> On Fri, Mar 30, 2001 at 10:09:39AM -0800, Cy Schubert - ITSD Open Systems Group wrote:
> > Becoming more SYSV-like is not something most people in FreeBSD are
> > enamoured with. Hence I don't think it would be possible to implement
> > all the changes I would like to see.
>
> Correct. Make that HELL NO WE WON'T GO SVR4!!!
>
> The BSD init + NetBSD granular rc files is a nice compromise. And thus
> why I am pushing a move in that direction.
some times ago, I've setup a NetBSD box and they init files are not yet
perfect. as I remember me, you couldn't do something like
/etc/rc.d/nfs.server start (or whatever) while nfs.server depends on
something else. you only could do /etc/rc which start all things.
also, I don't remember if they are checking if the service is already
started as HP-UX does.
in the same time (`ls -ld /etc/init.d` = Nov 23 :), I've began
something like in attachement which allow us to start/stop all
dependencies as I remember me. at least the nfs stack is working since
I use it when I need it. of course, this was an experiment and need to
be enhanced/reworked.
the basic idea was it have a generic wrapper which source its
configuration file a la HP-UX. the configuration file would be
something like this (from nfs.server) :
service_class=
service_instance=nfs_server
service_enable=YES
service_proc=nfsd
service_path=/sbin
service_program=$service_path/$service_proc
service_flags=
nfsd_pre_start () {
case ${nfs_reserved_port_only} in
[Yy][Ee][Ss])
echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
;;
esac
}
nfsd_post_start () {
if [ -n "${nfs_bufpackets}" ]; then
sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} >/dev/null
fi
}
service_pre_start=nfsd_pre_start
service_pre_start_depend="portmap mountd"
service_post_start=nfsd_post_start
service_post_start_depend="lockd statd"
service_pre_stop=
service_pre_stop_depend=$service_post_start_depend
service_force_stop=true
service_post_stop=
service_post_stop_depend=mountd
and the wrapper is all the rest. this isn't currently done in the
attached samples.
[-- Attachment #2 --]
C:][o+`5m$ )P(NGYK0MXq.Y.bǎ;ؖ3qɕ9<$L[pXN.5@צs'_(f!Im|-ɳ#'ώFx mڭ?N/&Rd-O@p:nvqUSՆxCN6f.DQ/=$!qKo*
a6K8HTB.?+#? M
͕)ܭ?"6f;"AQ0y, M("c=7?g`PlE: BNj*U8Weˢ(u<5gz[Q=vwJ1jWX5NXiK_+\.۠:%|%L?κoCFra=zS[~]tBE/ ""CdE#2c;H?s%X
ޠ%\uk#fXQ\S651Rub̼qWjd4Z5k*T+>tmY*u/ԒZK!ZMl֕^&|eRL&DMz~)MQUп4~/^
kƹܠV_zVkg}K'$uĕaC8i늏:~T{PKn 7{ae~@.ˉkU'ZULhO
FKG/CGWnrCYǥcaf'S!sCάk`!o^RAh#7*1Փj鵋*,in雫9֤Q#EUEvQD6CMsy.sݺNeĬI\ݪٙ(jK*r\ 8b.gmdpГ<?0<tw{z(+25kp#-hs߈ez+
eôqIsM?D3M%Q
m.rZy: `J0a,Y1K1
l3}L'SLێB{D~P9SEaA
)R HY0*</}2[`?_zԿuY|KυMR(ϧ<|)ϧ<of r*TgNwut/TEw+D96än+
M&"oB\-^tQ4CxUD4ynPeOҫ篆Lh_RR0 A!B
"(DPx2r>ř-Gxۿ~+__*O
NPqNU&%b
bǔ}VQ5P09"E@-Z7u0{X,bF3>-qJuUd#Ԕ4(?N@VعFYm
+!O.Yk%
}|±N|l-ַ(ШK(abvزH.k^}VEc;5*{ eIl;ty~K[%5I s\zL.[?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