public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] sysvinit scripts
@ 2006-07-13  1:52 Egon Kocjan
  2006-07-13  2:15 ` Richard Fish
  0 siblings, 1 reply; 2+ messages in thread
From: Egon Kocjan @ 2006-07-13  1:52 UTC (permalink / raw
  To: gentoo-user

Hello,

I have developed a cross-platform installer which places service startup
script in /etc/init.d and symlink in /etc/rcX.d (there are some other
possible places like /etc/rc.d and /etc/rc.d/rcX.d). This approach works
almost "everywhere" (redhat, suse, debian/ubuntu, mandriva,
slackware, ...).

After reading Gentoo documentation, it seems I will have to recode the
startup script specifically for Gentoo, because functions start() and
stop() are expected instead of start and stop script arguments.

Is there another option like installing some sort of rcX.d
compatibility?

Thanks,
Egon

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-user] sysvinit scripts
  2006-07-13  1:52 [gentoo-user] sysvinit scripts Egon Kocjan
@ 2006-07-13  2:15 ` Richard Fish
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Fish @ 2006-07-13  2:15 UTC (permalink / raw
  To: gentoo-user

On 7/12/06, Egon Kocjan <egon.kocjan@xlab.si> wrote:
> Is there another option like installing some sort of rcX.d
> compatibility?

The best option for your Gentoo users would be to install your init
script as /etc/$mypkg/init.d/$myinit, and have an additional
Gentoo/runscript compatible script that installs to /etc/init.d/ but
mainly just call the /etc/$mypkg/init.d/$myinit script.  That would
allow us to continue to use our standard tools (rc-update) for
managing the init process, make sure you are compatible with parallel
startups, and so forth.

This should be fairly simple to create.  Something like:

depend() {
        need localmount
        use logger net
}
start() {
        test -x /etc/$mypkg/init.d/$myinit || \
                eend 1 "myinit script not found.  Aborting" || return 1
        /etc/$mypkg/init.d/$myinit start
        return $?
}
stop() {
        /etc/$mypkg/init.d/$myinit stop
        return $?
}

If your init script generates a bunch of output, you could optionally
add a function to process the output and make it look more like
Gentoo's standards.  The current vmware init script may be a good
example of this.

Regards,
-Richard
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-13  2:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-13  1:52 [gentoo-user] sysvinit scripts Egon Kocjan
2006-07-13  2:15 ` Richard Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox