aboutsummaryrefslogtreecommitdiffstats
path: root/sysvinitfiles
blob: 166dbdc3476ceee4b7f3ccc1717fae1a632c38f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
Writing System V init scripts for Red Hat Linux
===============================================

All System V init scripts are named /etc/rc.d/init.d/<servicename>
where <servicename> is the name of the service.  There must be no
".init" suffix.

This path will very likely be moved to /etc/init.d in the future.
Once Red Hat Linux 7.0 is installed, you can access scripts as
/etc/init.d/<servicename>, via symlinks.

Sample Script
=============

#!/bin/bash
#
#	/etc/rc.d/init.d/<servicename>
#
#	<description of the *service*>
#	<any general comments about this init script>
#
# <tags -- see below for tag definitions.  *Every line* from the top
#  of the file to the end of the tags section must begin with a #
#  character.  After the tags section, there should be a blank line.
#  This keeps normal comments in the rest of the file from being
#  mistaken for tags, should they happen to fit the pattern.>

# Source function library.
. /etc/init.d/functions

<define any local shell functions used by the code that follows>

start() {
	echo -n "Starting <servicename>: "
	<start daemons, perhaps with the daemon function>
	touch /var/lock/subsys/<servicename>
	return <return code of starting daemon>
}	

stop() {
	echo -n "Shutting down <servicename>: "
	<stop daemons, perhaps with the killproc function>
	rm -f /var/lock/subsys/<servicename>
	return <return code of stopping daemon>
}

case "$1" in
    start)
	start
	;;
    stop)
	stop
	;;
    status)
	<report the status of the daemons in free-form format,
	perhaps with the status function>
	;;
    restart)
    	stop
	start
	;;
    reload)
	<cause the service configuration to be reread, either with
	kill -HUP or by restarting the daemons, in a manner similar
	to restart above>
	;;
    condrestart)
    	<Restarts the servce if it is already running. For example:>
	[ -f /var/lock/subsys/<service> ] && restart || :
    probe)
	<optional.  If it exists, then it should determine whether
	or not the service needs to be restarted or reloaded (or
	whatever) in order to activate any changes in the configuration
	scripts.  It should print out a list of commands to give to
	$0; see the description under the probe tag below.>
	;;
    *)
	echo "Usage: <servicename> {start|stop|status|reload|restart[|probe]"
	exit 1
	;;
esac
exit $?

Notes: 

- The restart and reload functions may be (and commonly are)
  combined into one test, vis:
    restart|reload)
- You are not prohibited from adding other commands; list all commands
  which you intend to be used interactively to the usage message.
- Notice the change in that stop() and start() are now shell functions.
  This means that restart can be implemented as
     stop
     start
  instead of
     $0 stop
     $0 start
  This saves a few shell invocations.

Functions in /etc/init.d/functions
=======================================

daemon  [ --check <name> ] [ --user <username>] 
	[+/-nicelevel] program [arguments] [&]

	Starts a daemon, if it is not already running.  Does
	other useful things like keeping the daemon from dumping
	core if it terminates unexpectedly.
	
	--check <name>:
	   Check that <name> is running, as opposed to simply the
	   first argument passed to daemon().
	--user <username>:
	   Run command as user <username>

killproc program [signal]

	Sends a signal to the program; by default it sends a SIGTERM,
	and if the process doesn't die, it sends a SIGKILL a few
	seconds later.

	It also tries to remove the pidfile, if it finds one.

pidofproc program

	Tries to find the pid of a program; checking likely pidfiles,
	and using the pidof program.  Used mainly from within other
	functions in this file, but also available to scripts.

status program

	Prints status information.  Assumes that the program name is
	the same as the servicename.


Tags
====

# chkconfig: <startlevellist> <startpriority> <endpriority>

	Required.  <startlevellist> is a list of levels in which
	the service should be started by default.  <startpriority>
	and <endpriority> are priority numbers.  For example:
	# chkconfig: 2345 20 80
	Read 'man chkconfig' for more information.

	Unless there is a VERY GOOD, EXPLICIT reason to the
	contrary, the <endpriority> should be equal to
	100 - <startpriority>
	
# description: <multi-line description of service>

	Required.  Several lines of description, continued with '\'
	characters.  The initial comment and following whitespace
	on the following lines is ignored.

# description[ln]: <multi-line description of service in the language \
#                  ln, whatever that is>

	Optional.  Should be the description translated into the
	specified language.

# processname:

	Optional, multiple entries allowed.  For each process name
	started by the script, there should be a processname entry.
	For example, the samba service starts two daemons:
	# processname: smdb
	# processname: nmdb

# config:

	Optional, multiple entries allowed.  For each static config
	file used by the daemon, use a single entry.  For example:
	# config: /etc/httpd/conf/httpd.conf
	# config: /etc/httpd/conf/srm.conf

	Optionally, if the server will automatically reload the config
	file if it is changed, you can append the word "autoreload" to
	the line:
	# config: /etc/foobar.conf autoreload

# pidfile:

	Optional, multiple entries allowed.  Use just like the config
	entry, except that it points at pidfiles.  It is assumed that
	the pidfiles are only updated at process creation time, and
	not later.  The first line of this file should be the ASCII
	representation of the PID; a terminating newline is optional.
	Any lines other than the first line are not examined.

# probe: true

	Optional, used IN PLACE of processname, config, and pidfile.
	If it exists, then a proper reload-if-necessary cycle may be
	acheived by running these commands:

	command=$(/etc/rc.d/init.d/SCRIPT probe)
	[ -n "$command" ] && /etc/rc.d/init.d/SCRIPT $command

	where SCRIPT is the name of the service's sysv init script.

	Scripts that need to do complex processing could, as an
	example, return "run /var/tmp/<servicename.probe.$$"
	and implement a "run" command which would execute the
	named script and then remove it.

	Note that the probe command should simply "exit 0" if nothing
	needs to be done to bring the service into sync with its
	configuration files.

Copyright (c) 2000 Red Hat Software, Inc.
gid "Highest IP Address:"
msgstr "Adresse IP la plus haute :"
-#: ../dhcp_wizard/Dhcp.pm:67 ../dhcp_wizard/Dhcp.pm:110
+#: ../dhcp_wizard/Dhcp.pm:72 ../dhcp_wizard/Dhcp.pm:115
+#, fuzzy
+msgid "Gateway IP Address:"
+msgstr "Adresse IP passerelle :"
+
+#: ../dhcp_wizard/Dhcp.pm:73 ../dhcp_wizard/Dhcp.pm:117
msgid "Enable PXE:"
msgstr ""
-#: ../dhcp_wizard/Dhcp.pm:72
+#: ../dhcp_wizard/Dhcp.pm:78
msgid "Interface the dhcp server must listen to"
msgstr "Interface sur laquelle le serveur dhcp doit écouter"
-#: ../dhcp_wizard/Dhcp.pm:87
+#: ../dhcp_wizard/Dhcp.pm:93
msgid "The IP range specified is not correct."
msgstr "La plage d'adresses IP spécifiée est incorrecte"
-#: ../dhcp_wizard/Dhcp.pm:92
+#: ../dhcp_wizard/Dhcp.pm:98
msgid "The IP range specified is not in server address range."
msgstr "La plage d'adresses IP spécifiée n'est pas dans celle du serveur."
-#: ../dhcp_wizard/Dhcp.pm:97
+#: ../dhcp_wizard/Dhcp.pm:103
msgid "The IP of the server must not be in range."
msgstr "L'adresse IP du serveur ne doit pas être dans la plage."
-#: ../dhcp_wizard/Dhcp.pm:102
+#: ../dhcp_wizard/Dhcp.pm:108
msgid "Configuring the DHCP Server"
msgstr "Configuration du serveur DHCP"
-#: ../dhcp_wizard/Dhcp.pm:102
+#: ../dhcp_wizard/Dhcp.pm:108
msgid ""
"The wizard collected the following parameters needed to configure your DHCP "
"service:"
@@ -259,7 +264,7 @@ msgstr ""
"votre service DHCP :"
# desactivé
-#: ../dhcp_wizard/Dhcp.pm:104 ../ftp_wizard/Proftpd.pm:129
+#: ../dhcp_wizard/Dhcp.pm:110 ../ftp_wizard/Proftpd.pm:129
#: ../ftp_wizard/Proftpd.pm:130 ../ftp_wizard/Proftpd.pm:131
#: ../ftp_wizard/Proftpd.pm:132 ../ftp_wizard/Proftpd.pm:133
#: ../ftp_wizard/Proftpd.pm:134 ../installsrv_wizard/Installsrv.pm:85
@@ -269,7 +274,7 @@ msgstr ""
msgid "disabled"
msgstr "désactivé"
-#: ../dhcp_wizard/Dhcp.pm:104 ../ftp_wizard/Proftpd.pm:129
+#: ../dhcp_wizard/Dhcp.pm:110 ../ftp_wizard/Proftpd.pm:129
#: ../ftp_wizard/Proftpd.pm:130 ../ftp_wizard/Proftpd.pm:131
#: ../ftp_wizard/Proftpd.pm:132 ../ftp_wizard/Proftpd.pm:133
#: ../ftp_wizard/Proftpd.pm:134 ../installsrv_wizard/Installsrv.pm:85
@@ -279,20 +284,20 @@ msgstr "désactivé"
msgid "enabled"
msgstr "activé"
-#: ../dhcp_wizard/Dhcp.pm:109
+#: ../dhcp_wizard/Dhcp.pm:116
msgid "Interface:"
msgstr "Interface :"
-#: ../dhcp_wizard/Dhcp.pm:116
+#: ../dhcp_wizard/Dhcp.pm:123
msgid "The wizard successfully configured the DHCP services of your server."
msgstr ""
"L'assistant a configuré avec succès les services DHCP de votre serveur."
-#: ../dns_wizard/Bind.pm:72
+#: ../dns_wizard/Bind.pm:74
msgid "You need to readjust your hostname."
msgstr "SVP reajuster votre nom d'ordinateur."
-#: ../dns_wizard/Bind.pm:75 ../pxe_wizard/Pxe.pm:72
+#: ../dns_wizard/Bind.pm:77 ../pxe_wizard/Pxe.pm:72
msgid ""
"You need to readjust your domainname. For a DNS server you need a correct "
"domainname, not equal to localdomain or none. Launch drakconnect to adjust "
@@ -301,24 +306,24 @@ msgstr ""
"Réajustez le nom de votre domaine. Pour configurer un serveur DNS vous avez "
"besoin d'un nom de domaine correct. Lancez drakconnect pour l'ajuster"
-#: ../dns_wizard/Bind.pm:82 ../dns_wizard/Bind.pm:679
+#: ../dns_wizard/Bind.pm:84 ../dns_wizard/Bind.pm:681
msgid "Master DNS server"
msgstr "Serveur DNS maître"
-#: ../dns_wizard/Bind.pm:83 ../dns_wizard/Bind.pm:141
-#: ../dns_wizard/Bind.pm:692
+#: ../dns_wizard/Bind.pm:85 ../dns_wizard/Bind.pm:143
+#: ../dns_wizard/Bind.pm:694
msgid "Slave DNS server"
msgstr "Serveur DNS secondaire"
-#: ../dns_wizard/Bind.pm:84
+#: ../dns_wizard/Bind.pm:86
msgid "Add host in DNS"
msgstr "Ajouter un hôte au DNS"
-#: ../dns_wizard/Bind.pm:85
+#: ../dns_wizard/Bind.pm:87
msgid "Remove host in DNS"
msgstr "Enlever un hôte du DNS"
-#: ../dns_wizard/Bind.pm:104
+#: ../dns_wizard/Bind.pm:106
msgid ""
"DNS (Domain Name Server) is the service that maps an IP address of a machine "
"with an internet host name."
@@ -326,11 +331,11 @@ msgstr ""
"le DNS (Serveur de Noms de Domaine) est le service qui met en correspondance "
"les adresses reseau (IP) et les noms d'hotes"
-#: ../dns_wizard/Bind.pm:104
+#: ../dns_wizard/Bind.pm:106
msgid "DNS Master configuration wizard"
msgstr "Assistant de configuration du DNS maître"
-#: ../dns_wizard/Bind.pm:104
+#: ../dns_wizard/Bind.pm:106
msgid ""
"This wizard will help you configuring the DNS services of your server. This "
"configuration will provide a local DNS service for local computers names, "
@@ -340,28 +345,28 @@ msgstr ""
"fournira un service local de DNS pour les noms d'ordinateurs locaux, avec "
"renvoi des requêtes autres que locales vers un DNS externe."
-#: ../dns_wizard/Bind.pm:119 ../postfix_wizard/Postfix.pm:76
+#: ../dns_wizard/Bind.pm:121 ../postfix_wizard/Postfix.pm:76
#: ../pxe_wizard/Pxe.pm:121
msgid "What do you want to do:"
msgstr "Que voulez faire ?"
-#: ../dns_wizard/Bind.pm:133
+#: ../dns_wizard/Bind.pm:135
msgid "Choose the host you want to remove in the following list."
msgstr "Choisissez l'ordinateur que vous voulez retirer."
-#: ../dns_wizard/Bind.pm:133
+#: ../dns_wizard/Bind.pm:135
msgid "Remove a host in existing dns configuration."
msgstr "Enleve un ordinateur de la configuration DNS."
-#: ../dns_wizard/Bind.pm:133
+#: ../dns_wizard/Bind.pm:135
msgid "Remove host:"
msgstr "Enlever un hôte :"
-#: ../dns_wizard/Bind.pm:135
+#: ../dns_wizard/Bind.pm:137
msgid "Computer Name:"
msgstr "Nom de la machine :"
-#: ../dns_wizard/Bind.pm:141
+#: ../dns_wizard/Bind.pm:143
msgid ""
"A slave name server will take some of the burden away from your primary name "
"server, and will also function as a backup server, in case your master "
@@ -370,11 +375,11 @@ msgstr ""
"Un serveur DNS esclave sert de server de backup a un serveur DNSprimaire, au "
"cas ou votre server princiapl n'est pas joignable."
-#: ../dns_wizard/Bind.pm:143 ../dns_wizard/Bind.pm:208
+#: ../dns_wizard/Bind.pm:145 ../dns_wizard/Bind.pm:210
msgid "IP Address of the master DNS server:"
msgstr "Adresse IP du serveur DNS maître :"
-#: ../dns_wizard/Bind.pm:150
+#: ../dns_wizard/Bind.pm:152
msgid ""
"Forwarding occurs on only those queries for which the server is not "
"authoritative and does not have the answer in its cache."
@@ -382,12 +387,12 @@ msgstr ""
"Le transfert est utilisé que pour les requêtes pour lequel notre servern'est "
"pas authoritaire et, si celui-ci qui ne possede pas la reponse dans soncache."
-#: ../dns_wizard/Bind.pm:150
+#: ../dns_wizard/Bind.pm:152
#, fuzzy
msgid "IP of your forwarder"
msgstr "Serveur DNS externe"
-#: ../dns_wizard/Bind.pm:150
+#: ../dns_wizard/Bind.pm:152
msgid ""
"So if you need it and know your ip forwarder enter IP address of it, if you "
"dont know leave it blank"
@@ -395,21 +400,21 @@ msgstr ""
"Si vous ne connaissez pas de server externe, ou si vous ne savez pas ceque "
"c'est, ne mettez rien."
-#: ../dns_wizard/Bind.pm:152 ../dns_wizard/Bind.pm:235
+#: ../dns_wizard/Bind.pm:154 ../dns_wizard/Bind.pm:237
msgid "External DNS:"
msgstr "DNS externe :"
-#: ../dns_wizard/Bind.pm:158
+#: ../dns_wizard/Bind.pm:160
msgid "Add search domain"
msgstr "Ajouter un domaine de recherche"
-#: ../dns_wizard/Bind.pm:158
+#: ../dns_wizard/Bind.pm:160
msgid ""
"Domainname of this server is automatically added, and you dont need to add "
"it here."
msgstr ""
-#: ../dns_wizard/Bind.pm:158
+#: ../dns_wizard/Bind.pm:160
msgid ""
"Search list for host-name lookup. The search list is normally determined "
"from the local domain name; by default, it contains only the local domain "
@@ -417,43 +422,43 @@ msgid ""
"following the search keyword"
msgstr ""
-#: ../dns_wizard/Bind.pm:161 ../dns_wizard/Bind.pm:236
+#: ../dns_wizard/Bind.pm:163 ../dns_wizard/Bind.pm:238
msgid "Default domain name to search:"
msgstr "Domaine de recherche par défaut :"
-#: ../dns_wizard/Bind.pm:166
+#: ../dns_wizard/Bind.pm:168
#, fuzzy
msgid ""
"This is not a valid IP address for your forwarder... press next to continue"
msgstr "Cette adresse IP est incorrecte... Appuyez sur Suivant pour continuer"
-#: ../dns_wizard/Bind.pm:171
+#: ../dns_wizard/Bind.pm:173
msgid "This is not a valid Master DNS IP address... press next to continue"
msgstr ""
"Cette adresse IP n'est pas valable pour le serveur maître DNS... Appuyez sur "
"Suivant pour continuer"
-#: ../dns_wizard/Bind.pm:176
+#: ../dns_wizard/Bind.pm:178
msgid "This is not a valid IP address... press next to continue"
msgstr "Cette adresse IP est incorrecte... Appuyez sur Suivant pour continuer"
-#: ../dns_wizard/Bind.pm:186
+#: ../dns_wizard/Bind.pm:188
msgid ""
"It seems that host is already in your DNS configuration... press next to "
"continue"
msgstr ""
-#: ../dns_wizard/Bind.pm:191
+#: ../dns_wizard/Bind.pm:193
msgid "Error:"
msgstr "Erreur :"
-#: ../dns_wizard/Bind.pm:191
+#: ../dns_wizard/Bind.pm:193
msgid ""
"It seems that this is not present in your DNS configuration... press next to "
"continue"
msgstr ""
-#: ../dns_wizard/Bind.pm:196
+#: ../dns_wizard/Bind.pm:198
msgid ""
"It seems that no DNS server has been set through wizard. Please run DNS "
"wizard: Master DNS server."
@@ -461,7 +466,7 @@ msgstr ""
"Aucune configuration DNS n'a été mise en place au travers du Wizard DNS."
"Lancez le wizard DNS en choisissant: Serveur DNS maitre."
-#: ../dns_wizard/Bind.pm:201
+#: ../dns_wizard/Bind.pm:203
msgid ""
"It seems that your are not a master DNS server, but just a slave one. So i "
"can't add/remove host."
@@ -469,61 +474,61 @@ msgstr ""
"Il semble que vous ne soyez pas un serveur DNS primaire. Il est donc "
"impossible d'ajouter/retirer des ordinateurs."
-#: ../dns_wizard/Bind.pm:206
+#: ../dns_wizard/Bind.pm:208
msgid "Ok Now building your DNS slave configuration"
msgstr "Configuration d'un serveur DNS esclave en cours"
-#: ../dns_wizard/Bind.pm:206 ../ldap_wizard/ldap.pm:150
+#: ../dns_wizard/Bind.pm:208 ../ldap_wizard/ldap.pm:150
msgid "with this configuration:"
msgstr "avec cette configuration :"
-#: ../dns_wizard/Bind.pm:214
+#: ../dns_wizard/Bind.pm:216
msgid "Client with this identification will be added to your DNS"
msgstr ""
-#: ../dns_wizard/Bind.pm:216 ../dns_wizard/Bind.pm:225
+#: ../dns_wizard/Bind.pm:218 ../dns_wizard/Bind.pm:227
msgid "Computer name:"
msgstr "Nom de la machine :"
-#: ../dns_wizard/Bind.pm:217
+#: ../dns_wizard/Bind.pm:219
msgid "Computer IP address:"
msgstr "Adresse IP du serveur :"
-#: ../dns_wizard/Bind.pm:223
+#: ../dns_wizard/Bind.pm:225
msgid "Client with this identification will be removed to your DNS"
msgstr "Cet ordinateur va etre retirer."
-#: ../dns_wizard/Bind.pm:231
+#: ../dns_wizard/Bind.pm:233
msgid ""
"The DNS server is about to be configured with the following configuration"
msgstr "Le serveur DNS va etre configuré comme suit"
-#: ../dns_wizard/Bind.pm:233
+#: ../dns_wizard/Bind.pm:235
msgid "Server Hostname:"
msgstr "Nom du serveur :"
-#: ../dns_wizard/Bind.pm:234
+#: ../dns_wizard/Bind.pm:236
msgid "Domainname:"
msgstr "Nom du domaine :"
-#: ../dns_wizard/Bind.pm:243
+#: ../dns_wizard/Bind.pm:245
msgid "The wizard successfully add host in your DNS."
msgstr "L'assistant a ajouté avec succès le client au DNS."
-#: ../dns_wizard/Bind.pm:253
+#: ../dns_wizard/Bind.pm:255
#, fuzzy
msgid "The wizard successfully removed the host from your DNS."
msgstr "L'assistant a ajouté avec succès le client au DNS."
-#: ../dns_wizard/Bind.pm:260
+#: ../dns_wizard/Bind.pm:262
msgid "The wizard successfully configured the DNS service of your server."
msgstr "L'assistant a configuré avec succès le service DNS de votre serveur."
-#: ../dns_wizard/Bind.pm:679
+#: ../dns_wizard/Bind.pm:681
msgid "Configuring your system as Master DNS server ..."
msgstr "Configurer votre système en tant que serveur DNS maître ..."
-#: ../dns_wizard/Bind.pm:692
+#: ../dns_wizard/Bind.pm:694
msgid "Configuring your system as Slave DNS server ..."
msgstr "Configurer votre système en tant que serveur DNS secondaire ..."
@@ -3005,9 +3010,6 @@ msgstr ""
#~ msgid "Configuring your network"
#~ msgstr "Configuration de votre réseau"
-#~ msgid "Gateway IP:"
-#~ msgstr "Adresse IP passerelle :"
-
#~ msgid ""
#~ "This page computes the default server address; it should be invisible."
#~ msgstr ""