LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-09-2012, 08:44 AM   #1
charging-ibis
Member
 
Registered: Dec 2011
Location: Columbus, OH
Distribution: Slackware 13.37
Posts: 36

Rep: Reputation: 0
Question init script type


I have a question about the init script type for slackware 13.37, What type is the init scripts in slackware 13.37?

Part of it looks like BSD and another part looks like System V.

I also noticed that the parameters to run a init script is:

Code:
{start | stop | restart | graceful | graceful-stop}
But there is no 'status' parameter and what dose 'graceful' and 'graceful-stop' mean as perameters?

Last edited by charging-ibis; 10-09-2012 at 09:06 AM.
 
Old 10-09-2012, 09:02 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,867

Rep: Reputation: 700Reputation: 700Reputation: 700Reputation: 700Reputation: 700Reputation: 700Reputation: 700
Are you talking about the scripts in /etc/init.d?

If so, there're
Code:
fubar-trona-/etc/rc.d/init.d: file *
README.functions: ASCII English text
collectl:         POSIX shell script, ASCII text executable
collectl-debian:  POSIX shell script, ASCII text executable
collectl-generic: POSIX shell script, ASCII text executable
collectl-suse:    POSIX shell script, ASCII text executable
functions:        ASCII English text
and the README.functions states:
Code:
fubar-trona-/etc/rc.d/init.d: cat README.functions

If you're reading this in /etc/init.d/, Slackware's real init directory is
/etc/rc.d/.  Maybe you already knew this, but it never hurts to say.  :-)

This script was taken from Fedora (and is presumably licensed under the GPL).
While I don't see Slackware init scripts making much use of it (but use it
if you wish), some third party init scripts (such as for commercial software
designed to run on Red Hat based systems) expect this script and use it in
their own init scripts, so it's a good idea to make it available here.

These functions are provided solely for commercial (or other) software that
expects to find "Red Hat-isms".  I wouldn't use them to write new init
scripts (personally), but if you've had experience with them in the past
and like them, by all means feel free.

It's planned to continue support for them.
Hope this helps some.
 
1 members found this post helpful.
Old 10-09-2012, 09:14 AM   #3
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Slackware's approach to init-scripts is pretty much a hybrid between the bsd and sysv styles (IMO taking the best parts of both)
 
Old 10-09-2012, 09:44 AM   #4
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,666

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Quote:
Originally Posted by charging-ibis View Post
I have a question about the init script type for slackware 13.37, What type is the init scripts in slackware 13.37?

Part of it looks like BSD and another part looks like System V.

I also noticed that the parameters to run a init script is:

Code:
{start | stop | restart | graceful | graceful-stop}
But there is no 'status' parameter and what dose 'graceful' and 'graceful-stop' mean as parameters?
I suppose you are speaking about the files in /etc/rc.d

To answer your first question, which seems me to be rather rhetorical, they are of Slackware type

If you look at some you will see that the main ones (those which end in one digit or letter after the dot) are the "real" init scripts, whose purpose is to change the state of the system (its run level) as a whole. Others are scripts used to start or stop a particular service or set of services and can be run in the course of a change in the run level or independently.

As fot the parameters, they are not the same in every script. To understand why, just look at some of them at random.

Last edited by Didier Spaier; 10-09-2012 at 09:46 AM.
 
Old 10-09-2012, 03:22 PM   #5
charging-ibis
Member
 
Registered: Dec 2011
Location: Columbus, OH
Distribution: Slackware 13.37
Posts: 36

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tronayne View Post
Are you talking about the scripts in /etc/init.d?

If so, there're
Code:
fubar-trona-/etc/rc.d/init.d: file *
README.functions: ASCII English text
collectl:         POSIX shell script, ASCII text executable
collectl-debian:  POSIX shell script, ASCII text executable
collectl-generic: POSIX shell script, ASCII text executable
collectl-suse:    POSIX shell script, ASCII text executable
functions:        ASCII English text
and the README.functions states:
Code:
fubar-trona-/etc/rc.d/init.d: cat README.functions

If you're reading this in /etc/init.d/, Slackware's real init directory is
/etc/rc.d/.  Maybe you already knew this, but it never hurts to say.  :-)

This script was taken from Fedora (and is presumably licensed under the GPL).
While I don't see Slackware init scripts making much use of it (but use it
if you wish), some third party init scripts (such as for commercial software
designed to run on Red Hat based systems) expect this script and use it in
their own init scripts, so it's a good idea to make it available here.

These functions are provided solely for commercial (or other) software that
expects to find "Red Hat-isms".  I wouldn't use them to write new init
scripts (personally), but if you've had experience with them in the past
and like them, by all means feel free.

It's planned to continue support for them.
Hope this helps some.
-> Hey thanks for the tip.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What type of connection is between files in /etc/init.d and /etc/rc.d/init.d? Rodnower Linux - General 2 08-07-2010 03:32 AM
Init script in /etc/init.d does not start at boot tdnnash25 Linux - Server 4 12-18-2009 04:40 PM
script init.d anna611 Linux - Newbie 9 11-28-2007 12:22 PM
need help with init script batymahn Linux - Server 1 08-23-2007 11:12 AM
could use some help with my init.d script.... BrianK Linux - General 3 10-31-2002 07:21 PM


All times are GMT -5. The time now is 07:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration