FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 07-31-2008, 12:05 PM
Christoph Höger
 
Default howto: write a init script

Hi,

is there some documentation out there about how to write a init script
for fedora9 for a given binary?
Maybe even a "insert your binary here"-tempate?

regards

christoph
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 12:19 PM
Chris G
 
Default howto: write a init script

On Thu, Jul 31, 2008 at 02:05:39PM +0200, Christoph Höger wrote:
> Hi,
>
> is there some documentation out there about how to write a init script
> for fedora9 for a given binary?
> Maybe even a "insert your binary here"-tempate?
>
Most "binaries" (if by that you mean executable programs) don't really
need an "init script", they just run. Enter the executable name on
the command line and the program springs into life.

Or am I musinderstanding you completely? :-)

--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 12:30 PM
"Marcelo M. Garcia"
 
Default howto: write a init script

Hi

Why don't you start with one in /etc/init.d and modify to you needs?

Marcelo

Christoph Höger wrote:

Hi,

is there some documentation out there about how to write a init script
for fedora9 for a given binary?
Maybe even a "insert your binary here"-tempate?

regards

christoph



--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 12:31 PM
Christoph Höger
 
Default howto: write a init script

Am Donnerstag, den 31.07.2008, 13:19 +0100 schrieb Chris G:
> On Thu, Jul 31, 2008 at 02:05:39PM +0200, Christoph Höger wrote:
> > Hi,
> >
> > is there some documentation out there about how to write a init script
> > for fedora9 for a given binary?
> > Maybe even a "insert your binary here"-tempate?
> >
> Most "binaries" (if by that you mean executable programs) don't really
> need an "init script", they just run. Enter the executable name on
> the command line and the program springs into life.
>
> Or am I musinderstanding you completely? :-)
>
> --
> Chris Green
>

Yes, you do , I need the binary to start when the machine boots up.
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 12:32 PM
Christoph Höger
 
Default howto: write a init script

Am Donnerstag, den 31.07.2008, 13:30 +0100 schrieb Marcelo M. Garcia:
> Hi
>
> Why don't you start with one in /etc/init.d and modify to you needs?
>
> Marcelo
>
> Christoph Höger wrote:
> > Hi,
> >
> > is there some documentation out there about how to write a init script
> > for fedora9 for a given binary?
> > Maybe even a "insert your binary here"-tempate?
> >
> > regards
> >
> > christoph
> >
>

That has some bad taste. I _could_ do that but I would always feel like
missing something important.
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 12:56 PM
Chris G
 
Default howto: write a init script

On Thu, Jul 31, 2008 at 02:31:06PM +0200, Christoph Höger wrote:
> Am Donnerstag, den 31.07.2008, 13:19 +0100 schrieb Chris G:
> > On Thu, Jul 31, 2008 at 02:05:39PM +0200, Christoph Höger wrote:
> > > Hi,
> > >
> > > is there some documentation out there about how to write a init script
> > > for fedora9 for a given binary?
> > > Maybe even a "insert your binary here"-tempate?
> > >
> > Most "binaries" (if by that you mean executable programs) don't really
> > need an "init script", they just run. Enter the executable name on
> > the command line and the program springs into life.
> >
> > Or am I musinderstanding you completely? :-)
> >
> > --
> > Chris Green
> >
>
> Yes, you do , I need the binary to start when the machine boots up.

In that case you just add the line to run it (i.e. the name of the
executable, possibly with its full path) to /etc/rc.d/rc.local.
That's exactly what rc.local is for.

If you want the whole 'start x' 'stop x' thing then just copy one of
the existing init scripts (as suggested by someone else).

--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 12:58 PM
inode0
 
Default howto: write a init script

2008/7/31 Christoph Höger <choeger@cs.tu-berlin.de>:
> Hi,
>
> is there some documentation out there about how to write a init script
> for fedora9 for a given binary?
> Maybe even a "insert your binary here"-tempate?

Take a look in /usr/share/doc/initscripts-*/sysvinitfiles

John

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 12:58 PM
gerrynix
 
Default howto: write a init script

> > Hi
> >
> > Why don't you start with one in /etc/init.d and
> modify to you needs?
> >
> > Marcelo
> >
> > Christoph Höger wrote:
> > > Hi,
> > >
> > > is there some documentation out there about how
> to write a init script
> > > for fedora9 for a given binary?
> > > Maybe even a "insert your binary
> here"-tempate?
> > >
> > > regards
> > >
> > > christoph
> > >
> >
>
> That has some bad taste. I _could_ do that but I would
> always feel like
> missing something important.
> --
You don't say if you have shell programming experience. Those who do, have an easier time with it. Simply 'study' the existing init scripts and jump in with your own, or modify an existing one (surely nothing illegal here . Also check out the man page for chkconfig, to see how that works in Linux init scripts. Also try this... go to Google and search on "tutorial init script for Linux"... for which a wealth of info was returned.
--
Nix

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 01:56 PM
"Tom Horsley"
 
Default howto: write a init script

> Why don't you start with one in /etc/init.d and modify to you needs?

I've done that myself a couple of times, and I can never seem to
get it to act exactly like the script I started with. It always
seems to echo an extra blank line or the [status] doesn't come out
at the end of the line or with the right color or something else
looks screwy and non-compatible with the output it generates.

I'd be very curious to see some documentation for init script
conventions to follow to get all these nit-picky details to
come out right.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-31-2008, 02:01 PM
Michael Schwendt
 
Default howto: write a init script

On Thu, 31 Jul 2008 14:05:39 +0200, Christoph Höger wrote:

> Hi,
>
> is there some documentation out there about how to write a init script
> for fedora9 for a given binary?
> Maybe even a "insert your binary here"-tempate?

/usr/share/rpmdevtools/template.init

and probably a few hints in the Fedora Wiki (Packaging pages).

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 12:36 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org