aboutsummaryrefslogtreecommitdiff
path: root/documentation/content/es/articles/rc-scripting/_index.po
blob: ffdfef0f16e987b4a83bc31b26699d495368b49b (plain) (blame)
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR The FreeBSD Project
# This file is distributed under the same license as the FreeBSD Documentation package.
# Fernando  Apesteguía <fernando.apesteguia@gmail.com>, 2021, 2022.
msgid ""
msgstr ""
"Project-Id-Version: FreeBSD Documentation VERSION\n"
"POT-Creation-Date: 2022-07-07 23:23-0300\n"
"PO-Revision-Date: 2022-12-29 18:47+0000\n"
"Last-Translator: Fernando  Apesteguía <fernando.apesteguia@gmail.com>\n"
"Language-Team: Spanish <https://translate-dev.freebsd.org/projects/"
"documentation/articlesrc-scripting_index/es/>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.10.1\n"

#. type: YAML Front Matter: description
#: documentation/content/en/articles/rc-scripting/_index.adoc:1
#, no-wrap
msgid "A guide to writing new rc.d scripts and understanding those already written"
msgstr ""
"Una guía para escribir nuevos scripts rc.d y entender aquellos que ya están "
"escritos"

#. type: Title =
#: documentation/content/en/articles/rc-scripting/_index.adoc:1
#: documentation/content/en/articles/rc-scripting/_index.adoc:12
#, no-wrap
msgid "Practical rc.d scripting in BSD"
msgstr "Scripting práctico rc.d en BSD"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:45
msgid "Abstract"
msgstr "Resumen"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:49
msgid ""
"Beginners may find it difficult to relate the facts from the formal "
"documentation on the BSD [.filename]#rc.d# framework with the practical "
"tasks of [.filename]#rc.d# scripting.  In this article, we consider a few "
"typical cases of increasing complexity, show [.filename]#rc.d# features "
"suited for each case, and discuss how they work.  Such an examination should "
"provide reference points for further study of the design and efficient "
"application of [.filename]#rc.d#."
msgstr ""
"Los principiantes pueden tener dificultades para relacionar los hechos de la "
"documentación formal del framwork [.filename]#rc.d# de BSD con las tareas "
"prácticas de scripting de [.filename]#rc.d#. En este artículo, consideramos "
"algunos casos típicos de complejidad creciente, mostramos [.filename]#rc.d# "
"características adecuadas para cada caso y comentamos cómo funcionan. Dicho "
"examen debe proporcionar puntos de referencia para un estudio más detallado "
"del diseño y la aplicación eficiente de [.filename]#rc.d#."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:51
msgid "'''"
msgstr "'''"

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:55
#, no-wrap
msgid "Introduction"
msgstr "Introducción"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:61
msgid ""
"The historical BSD had a monolithic startup script, [.filename]#/etc/rc#.  "
"It was invoked by man:init[8] at system boot time and performed all userland "
"tasks required for multi-user operation: checking and mounting file systems, "
"setting up the network, starting daemons, and so on.  The precise list of "
"tasks was not the same in every system; admins needed to customize it.  With "
"few exceptions, [.filename]#/etc/rc# had to be modified, and true hackers "
"liked it."
msgstr ""
"El BSD histórico tenía un script de arranque monolítico, [.filename]#/etc/rc#"
". Era invocado por man:init[8] durante el arranque del sistema y realizaba "
"todas las tareas en modo usuario que se requerían para operar en modo multi-"
"usuario: comprobar y montar los sistemas de ficheros, configurar la red, "
"arrancar demonios y demás. La lista precisa de tareas no era la misma en "
"cada sistema; los administradores necesitaban personalizarla. Salvo en unas "
"pocas excepciones, se tenía que modificar [.filename]#/etc/rc#, y a los "
"verdaderos hackers les gustaba."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:67
msgid ""
"The real problem with the monolithic approach was that it provided no "
"control over the individual components started from [.filename]#/etc/rc#.  "
"For instance, [.filename]#/etc/rc# could not restart a single daemon.  The "
"system admin had to find the daemon process by hand, kill it, wait until it "
"actually exited, then browse through [.filename]#/etc/rc# for the flags, and "
"finally type the full command line to start the daemon again.  The task "
"would become even more difficult and prone to errors if the service to "
"restart consisted of more than one daemon or demanded additional actions.  "
"In a few words, the single script failed to fulfil what scripts are for: to "
"make the system admin's life easier."
msgstr ""
"El verdadero problema con el enfoque monolítico era que no proporcionaba "
"control sobre los componentes individuales a partir de [.filename]#/etc/rc#. "
"Por ejemplo, [.filename]#/etc/rc# no podía reiniciar un solo demonio. El "
"administrador del sistema tenía que encontrar el proceso del demonio a mano, "
"matarlo, esperar hasta que realmente terminara y luego examinar [.filename]#/"
"etc/rc# para los flags, y finalmente escribir la línea de comando completa "
"para iniciar el demonio nuevamente. La tarea se volvía aún más difícil y "
"propensa a errores si el servicio a reiniciar consistía en más de un demonio "
"o exigía acciones adicionales. En pocas palabras, el script único no cumplía "
"con el propósito de los scripts: facilitar la vida del administrador del "
"sistema."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:74
msgid ""
"Later there was an attempt to split out some parts of [.filename]#/etc/rc# "
"for the sake of starting the most important subsystems separately.  The "
"notorious example was [.filename]#/etc/netstart# to bring up networking.  It "
"did allow for accessing the network from single-user mode, but it did not "
"integrate well into the automatic startup process because parts of its code "
"needed to interleave with actions essentially unrelated to networking.  That "
"was why [.filename]#/etc/netstart# mutated into [.filename]#/etc/rc."
"network#.  The latter was no longer an ordinary script; it comprised of "
"large, tangled man:sh[1] functions called from [.filename]#/etc/rc# at "
"different stages of system startup.  However, as the startup tasks grew "
"diverse and sophisticated, the \"quasi-modular\" approach became even more "
"of a drag than the monolithic [.filename]#/etc/rc# had been."
msgstr ""
"Posteriormente hubo un intento de separar algunas partes de [.filename]#/etc/"
"rc# para poder arrancar los subsistemas más importantes de forma separada. "
"Un ejemplo importante era [.filename]#/etc/netstart# para levantar la red. "
"Permitía acceder a la red desde el modo de usuario único, pero no se "
"integraba bien con el proceso de arranque automático debido a que algunas "
"partes de su código necesitaban intercalarse con acciones que en esencia no "
"estaban relacionadas con la red. Por eso [.filename]#/etc/netstart# se "
"cambió a [.filename]#/etc/rc.network#. El segundo ya no era un script "
"ordinario; estaba compuesto de funciones man:sh[1] grandes y entrelazadas "
"que se llamaban desde [.filename]#/etc/rc# en diferentes fases del sistema "
"de arranque. Sin embargo, a medida que las tareas de arranque se hicieron "
"más diversas y sofisticadas, la aproximación \"casi modular\" se convirtió "
"en un lastre casi más de lo que había sido el [.filename]#/etc/rc# "
"monolítico."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:82
msgid ""
"Without a clean and well-designed framework, the startup scripts had to bend "
"over backwards to satisfy the needs of rapidly developing BSD-based "
"operating systems.  It became obvious at last that more steps are necessary "
"on the way to a fine-grained and extensible [.filename]#rc# system.  Thus "
"BSD [.filename]#rc.d# was born.  Its acknowledged fathers were Luke Mewburn "
"and the NetBSD community.  Later it was imported into FreeBSD.  Its name "
"refers to the location of system scripts for individual services, which is "
"in [.filename]#/etc/rc.d#.  Soon we will learn about more components of the "
"[.filename]#rc.d# system and see how the individual scripts are invoked."
msgstr ""
"Sin un framework limpio y bien diseñado, los scripts de inicio tuvieron que "
"hacer todo lo posible para satisfacer las necesidades de los sistemas "
"operativos basados en BSD en rápido desarrollo. Por fin se hizo evidente que "
"se necesitan más pasos en el camino hacia una sistema [.filename]#rc# "
"refinado y extensible. Así nació el [.filename]#rc.d# de BSD. Sus padres "
"reconocidos fueron Luke Mewburn y la comunidad NetBSD. Posteriormente se "
"importó a FreeBSD. Su nombre se refiere a la ubicación de los scripts del "
"sistema para servicios individuales, que se encuentra en [.filename]#/etc/rc."
"d#. Pronto conoceremos más componentes del sistema [.filename]#rc.d# y "
"veremos cómo se invocan los scripts individuales."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:93
msgid ""
"The basic ideas behind BSD [.filename]#rc.d# are _fine modularity_ and "
"__code reuse__.  _Fine modularity_ means that each basic \"service\" such as "
"a system daemon or primitive startup task gets its own man:sh[1] script able "
"to start the service, stop it, reload it, check its status.  A particular "
"action is chosen by the command-line argument to the script.  The [."
"filename]#/etc/rc# script still drives system startup, but now it merely "
"invokes the smaller scripts one by one with the `start` argument.  It is "
"easy to perform shutdown tasks as well by running the same set of scripts "
"with the `stop` argument, which is done by [.filename]#/etc/rc.shutdown#.  "
"Note how closely this follows the Unix way of having a set of small "
"specialized tools, each fulfilling its task as well as possible.  _Code "
"reuse_ means that common operations are implemented as man:sh[1] functions "
"and collected in [.filename]#/etc/rc.subr#.  Now a typical script can be "
"just a few lines' worth of man:sh[1] code.  Finally, an important part of "
"the [.filename]#rc.d# framework is man:rcorder[8], which helps [.filename]#/"
"etc/rc# to run the small scripts orderly with respect to dependencies "
"between them.  It can help [.filename]#/etc/rc.shutdown#, too, because the "
"proper order for the shutdown sequence is opposite to that of startup."
msgstr ""
"Las ideas básicas detrás del [.filename]#rc.d# de BSD son _modularidad fina_ "
"y __reutilización de código__. _Modularidad fina_ significa que cada "
"\"servicio\" básico tales como un demonio del sistema o una primitiva de "
"arranque tienen su propio script man:sh[1] capaz de arrancar el servicio, "
"pararlo, recargarlo y comprobar su estado. Se escoge una acción particular "
"mediante un argumento en la línea de comando del script. El script [."
"filename]#/etc/rc# todavía dirige el sistema de arranque, pero ahora "
"simplemente invoca scripts más pequeños uno a uno con el argumento `start`. "
"También es fácil realizar tareas de parado ejecutando el mismo conjunto de "
"scripts con el argumento `stop`, que es lo que hace [.filename]#/etc/rc."
"shutdown#. Date cuenta de cómo esto sigue de cerca la manera Unix de tener "
"un conjunto pequeño de herramientas especializadas, cada una realizando su "
"tarea lo mejor posible. _Reutilización de código_ significa que las "
"operaciones comunes están implementadas como funciones man:sh[1] y "
"compiladas en [.filename]#/etc/rc.subr#. Ahora un script típico puede tener "
"sólo unas pocas líneas de código man:sh[1]. Finalmente, una parte importante "
"del framework [.filename]#rc.d# es man:rcorder[8], que ayuda a [.filename]#/"
"etc/rc# a ejecutar los scripts pequeños de forma ordenada respecto a las "
"dependencias entre ellos. También puede ayudar a [.filename]#/etc/rc."
"shutdown#, porque el orden adecuado de apagado es el opuesto al de arranque."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:101
msgid ""
"The BSD [.filename]#rc.d# design is described in <<lukem, the original "
"article by Luke Mewburn>>, and the [.filename]#rc.d# components are "
"documented in great detail in <<manpages, the respective manual pages>>.  "
"However, it might not appear obvious to an [.filename]#rc.d# newbie how to "
"tie the numerous bits and pieces together in order to create a well-styled "
"script for a particular task.  Therefore this article will try a different "
"approach to describe [.filename]#rc.d#.  It will show which features should "
"be used in a number of typical cases, and why.  Note that this is not a how-"
"to document because our aim is not at giving ready-made recipes, but at "
"showing a few easy entrances into the [.filename]#rc.d# realm.  Neither is "
"this article a replacement for the relevant manual pages.  Do not hesitate "
"to refer to them for more formal and complete documentation while reading "
"this article."
msgstr ""
"El diseño del [.filename]#rc.d# de BSD se describe en <<lukem, el artículo "
"original de Luke Mewburn>>, y los componentes de [.filename]#rc.d# están "
"documentados con gran detalle en <<manpages, las respectivas páginas de "
"manual>>. Sin embargo, puede que no parezca obvio para un novato de [."
"filename]#rc.d# cómo unir las numerosas partes y piezas para crear un script "
"con estilo para una tarea en particular. Por lo tanto, este artículo "
"intentará un enfoque diferente para describir [.filename]#rc.d#. Mostrará "
"qué funciones deben usarse en varios casos típicos y por qué. Ten en cuenta "
"que este no es un documento de instrucciones porque nuestro objetivo no es "
"dar recetas listas para usar, sino mostrar algunas formas fáciles de "
"introducirse en el reino de [.filename]#rc.d#. Este artículo tampoco "
"sustituye a las páginas del manual correspondientes. No dudes en "
"consultarlas para obtener documentación más formal y completa mientras lees "
"este artículo."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:105
msgid ""
"There are prerequisites to understanding this article.  First of all, you "
"should be familiar with the man:sh[1] scripting language in order to master "
"[.filename]#rc.d#.  In addition, you should know how the system performs "
"userland startup and shutdown tasks, which is described in man:rc[8]."
msgstr ""
"Hay prerequisitos para entender este artículo. Antes de nada, para dominar [."
"filename]#rc.d# deberías estar familiarizado con el lenguaje de scripting de "
"man:sh[1]. Además deberías conocer cómo el sistema realiza las tareas de "
"arranque y parada en modo usuario, que está descrito en man:rc[8]."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:108
msgid ""
"This article focuses on the FreeBSD branch of [.filename]#rc.d#.  "
"Nevertheless, it may be useful to NetBSD developers, too, because the two "
"branches of BSD [.filename]#rc.d# not only share the same design but also "
"stay similar in their aspects visible to script authors."
msgstr ""
"Este artículo se centra en la rama FreeBSD de [.filename]#rc.d#. Sin "
"embargo, también puede ser útil para los desarrolladores de NetBSD, porque "
"las dos ramas de [.filename]#rc.d# de BSD no solo comparten el mismo diseño, "
"sino que también son similares en sus aspectos visibles para los creadores "
"de scripts."

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:110
#, no-wrap
msgid "Outlining the task"
msgstr "Delineando la tarea"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:114
msgid ""
"A little consideration before starting `$EDITOR` will not hurt.  In order to "
"write a well-tempered [.filename]#rc.d# script for a system service, we "
"should be able to answer the following questions first:"
msgstr ""
"Un poco de reflexión antes de arrancar `$EDITOR` no dolerá. Para escribir un "
"script [.filename]#rc.d# bien hecho para un servicio del sistema, deberíamos "
"poder responder las siguientes preguntas primero:"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:116
msgid "Is the service mandatory or optional?"
msgstr "¿El servicio es obligatorio u opcional?"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:117
msgid ""
"Will the script serve a single program, e.g., a daemon, or perform more "
"complex actions?"
msgstr ""
"¿El script servirá a un solo programa, por ejemplo, un demonio, o realizará "
"acciones más complejas?"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:118
msgid "Which other services will our service depend on, and vice versa?"
msgstr "¿De qué otros servicios dependerá nuestro servicio y viceversa?"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:120
msgid ""
"From the examples that follow we will see why it is important to know the "
"answers to these questions."
msgstr ""
"De los ejemplos que siguen veremos por qué es importante conocer las "
"respuestas a estas preguntas."

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:122
#, no-wrap
msgid "A dummy script"
msgstr "Un guión ficticio"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:125
msgid ""
"The following script just emits a message each time the system boots up:"
msgstr ""
"El siguiente script simplemente emite un mensaje cada vez que se inicia el "
"sistema:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:129
#, no-wrap
msgid "#!/bin/sh <.>\n"
msgstr "#!/bin/sh <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:131
#, no-wrap
msgid ". /etc/rc.subr <.>\n"
msgstr ". /etc/rc.subr <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:135
#, no-wrap
msgid ""
"name=\"dummy\" <.>\n"
"start_cmd=\"${name}_start\" <.>\n"
"stop_cmd=\":\" <.>\n"
msgstr ""
"name=\"dummy\" <.>\n"
"start_cmd=\"${name}_start\" <.>\n"
"stop_cmd=\":\" <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:140
#, no-wrap
msgid ""
"dummy_start() <.>\n"
"{\n"
"\techo \"Nothing started.\"\n"
"}\n"
msgstr ""
"dummy_start() <.>\n"
"{\n"
"\techo \"Nothing started.\"\n"
"}\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:143
#, no-wrap
msgid ""
"load_rc_config $name <.>\n"
"run_rc_command \"$1\" <.>\n"
msgstr ""
"load_rc_config $name <.>\n"
"run_rc_command \"$1\" <.>\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:146
msgid "Things to note are:"
msgstr "Las cosas a tener en cuenta son:"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:152
msgid ""
"&#10122; An interpreted script should begin with the magic \"shebang\" "
"line.  That line specifies the interpreter program for the script.  Due to "
"the shebang line, the script can be invoked exactly like a binary program "
"provided that it has the execute bit set.  (See man:chmod[1].)  For example, "
"a system admin can run our script manually, from the command line:"
msgstr ""
"&#10122; Un script interpretado debería empezar con la línea mágica \"shebang"
"\". Esa línea especifica el programa intérprete para el script. Gracias a la "
"línea shebang, el script se puede invocar exactamente igual que un programa "
"binario si se ha establecido el bit de ejecución. (Consulta man:chmod[1].) "
"Por ejemplo, un administrador puede ejecutar nuestro script de forma manual, "
"desde la línea de comando:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:156
#, no-wrap
msgid "# /etc/rc.d/dummy start\n"
msgstr "# /etc/rc.d/dummy start\n"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:162
msgid ""
"In order to be properly managed by the [.filename]#rc.d# framework, its "
"scripts need to be written in the man:sh[1] language.  If you have a service "
"or port that uses a binary control utility or a startup routine written in "
"another language, install that element in [.filename]#/usr/sbin# (for the "
"system) or [.filename]#/usr/local/sbin# (for ports) and call it from a man:"
"sh[1] script in the appropriate [.filename]#rc.d# directory."
msgstr ""
"Para que los scripts puedan ser gestionados por el framework [.filename]#rc."
"d# tienen que estar escritos en lenguaje man:sh[1]. Si tienes un servicio o "
"port que usa una utilidad de control binaria o una rutina de arranque "
"escrita en otro lenguaje, instala ese elemento en [.filename]#/usr/sbin# ("
"para el sistema) o [.filename]#/usr/local/sbin# (para ports) e invócalo "
"desde un script man:sh[1] en el directorio [.filename]#rc.d# apropiado."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:167
msgid ""
"If you would like to learn the details of why [.filename]#rc.d# scripts must "
"be written in the man:sh[1] language, see how [.filename]#/etc/rc# invokes "
"them by means of `run_rc_script`, then study the implementation of "
"`run_rc_script` in [.filename]#/etc/rc.subr#."
msgstr ""
"Si quieres conocer los detalles acerca de por qué los scripts de [."
"filename]#rc.d# se tienen que escribir en lenguaje man:sh[1], consulta cómo ["
".filename]#/etc/rc# los invoca mediante `run_rc_script`, luego estudia la "
"implementación de `run_rc_script` en [.filename]#/etc/rc.subr#."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:173
msgid ""
"&#10123; In [.filename]#/etc/rc.subr#, a number of man:sh[1] functions are "
"defined for an [.filename]#rc.d# script to use.  The functions are "
"documented in man:rc.subr[8].  While it is theoretically possible to write "
"an [.filename]#rc.d# script without ever using man:rc.subr[8], its functions "
"prove extremely handy and make the job an order of magnitude easier. So it "
"is no surprise that everybody resorts to man:rc.subr[8] in [.filename]#rc.d# "
"scripts.  We are not going to be an exception."
msgstr ""
"&#10123; En [.filename]#/etc/rc.subr#, se definen un número de funciones "
"man:sh[1] para que las use el script [.filename]#rc.d#. Las funciones están "
"documentadas en man:rc.subr[8]. Aunque es teóricamente posible escribir un "
"script [.filename]#rc.d# sin llegar a usar man:rc.subr[8], sus funciones han "
"demostrado ser extremadamente útiles y hacen el trabajo un orden de magnitud "
"más fácil. Así que no es una sorpresa que todo el mundo recurra a man:rc."
"subr[8] en los scripts de [.filename]#rc.d#. Nosotros no vamos a ser una "
"excepción."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:176
msgid ""
"An [.filename]#rc.d# script must \"source\"[.filename]#/etc/rc.subr# "
"(include it using \"`.`\") _before_ it calls man:rc.subr[8] functions so "
"that man:sh[1] has an opportunity to learn the functions.  The preferred "
"style is to source [.filename]#/etc/rc.subr# first of all."
msgstr ""
"Un script [.filename]#rc.d# debe incluir [.filename]#/etc/rc.subr# ("
"utilizando \"`.`\") _antes_ de llamar a funciones de man:rc.subr[8] de forma "
"que man:sh[1] tenga una oportunidad para saber acerca de las funciones. El "
"estilo preferido es hacer \"source\" de [.filename]#/etc/rc.subr# antes de "
"nada."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:180
msgid ""
"Some useful functions related to networking are provided by another include "
"file, [.filename]#/etc/network.subr#."
msgstr ""
"Algunas funciones útiles relacionadas con redes son proporcionadas por otro "
"archivo de inclusión, [.filename]#/etc/network.subr#."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:185
msgid ""
"&#10124; [[name-var]]The mandatory variable `name` specifies the name of our "
"script.  It is required by man:rc.subr[8].  That is, each [.filename]#rc.d# "
"script _must_ set `name` before it calls man:rc.subr[8] functions."
msgstr ""
"&#10124; [[name-var]] La variable obligatoria `name` especifica el nombre de "
"nuestro script. Es un requisito de man:rc.subr[8]. Es decir, cada script [."
"filename]#rc.d# _debe establecer_ `name` antes de llamar a las funciones de "
"man:rc.subr[8]."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:189
msgid ""
"Now it is the right time to choose a unique name for our script once and for "
"all.  We will use it in a number of places while developing the script.  For "
"a start, let us give the same name to the script file, too."
msgstr ""
"Ahora es el momento adecuado para elegir un nombre único para nuestro script "
"de una vez por todas. Lo usaremos en varios lugares mientras desarrollamos "
"el script. Para empezar, démosle también el mismo nombre al archivo del "
"script."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:196
msgid ""
"The current style of [.filename]#rc.d# scripting is to enclose values "
"assigned to variables in double quotes.  Keep in mind that it is just a "
"style issue that may not always be applicable.  You can safely omit quotes "
"from around simple words without man:sh[1] metacharacters in them, while in "
"certain cases you will need single quotes to prevent any interpretation of "
"the value by man:sh[1].  A programmer should be able to tell the language "
"syntax from style conventions and use both of them wisely."
msgstr ""
"El estilo actual de los scripts [.filename]#rc.d# es englobar los valores "
"asignados a variables entre comillas dobles. Ten en cuenta que esto es sólo "
"una cuestión de estilo y que podría no ser aplicable siempre. Puedes omitir "
"las comillas de forma segura alrededor de palabras sencillas que no "
"contengan metacaracteres de man:sh[1], mientras que en ciertos casos "
"necesitarás comillas simples para evitar cualquier interpretación del valor "
"por parte de man:sh[1]. Un programador debería ser capaz de distinguir la "
"sintaxis del lenguaje de las convenciones de estilo y aplicar ambas de forma "
"apropiada."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:202
msgid ""
"&#10125; The main idea behind man:rc.subr[8] is that an [.filename]#rc.d# "
"script provides handlers, or methods, for man:rc.subr[8] to invoke.  In "
"particular, `start`, `stop`, and other arguments to an [.filename]#rc.d# "
"script are handled this way.  A method is a man:sh[1] expression stored in a "
"variable named `argument_cmd`, where _argument_ corresponds to what can be "
"specified on the script's command line.  We will see later how man:rc."
"subr[8] provides default methods for the standard arguments."
msgstr ""
"&#10125; La idea principal detrás de man:rc.subr[8] es que un script [."
"filename]#rc.d# proporciona manejadores, o métodos, para que los invoque "
"man:rc.subr[8]. En particular, `start`, `stop`, y otros argumentos pasados a "
"un script [.filename]#rc.d# se manejan de esta forma. Un método es una "
"expresión man:sh[1] que se almacena en una variable llamada `argument_cmd`, "
"donde _argument_ corresponde a lo que se puede especificar en la línea de "
"comando del script. Luego veremos cómo man:rc.subr[8] proporciona métodos "
"por defecto para los argumentos estándar."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:207
msgid ""
"To make the code in [.filename]#rc.d# more uniform, it is common to use `"
"${name}` wherever appropriate.  Thus a number of lines can be just copied "
"from one script to another."
msgstr ""
"Para hacer el código en [.filename]#rc.d# más uniforme, es común usar "
"`${name}` donde sea apropiado. Por tanto, es posible simplemente copiar "
"varias líneas de un script a otro."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:211
msgid ""
"&#10126; We should keep in mind that man:rc.subr[8] provides default methods "
"for the standard arguments.  Consequently, we must override a standard "
"method with a no-op man:sh[1] expression if we want it to do nothing."
msgstr ""
"&#10126; Deberíamos tener en cuenta que man:rc.subr[8] proporciona métodos "
"por defecto para los argumentos estándar. Consecuentemente, debemos "
"sobrescribir un método con una expresión no-op de man:sh[1] si queremos que "
"no haga nada."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:214
msgid ""
"&#10127; The body of a sophisticated method can be implemented as a "
"function.  It is a good idea to make the function name meaningful."
msgstr ""
"&#10127; El cuerpo de un método sofisticado se puede implementar como una "
"función. Es una buena idea que el nombre de la función tenga un significado."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:218
msgid ""
"It is strongly recommended to add the prefix `${name}` to the names of all "
"functions defined in our script so they never clash with the functions from "
"man:rc.subr[8] or another common include file."
msgstr ""
"Se recomienda encarecidamente añadir el prefijo `${name}` a los nombres de "
"todas las funciones definidas en nuestro script de forma que nunca "
"colisionen con funciones de man:rc.subr[8] o cualquier otro fichero que se "
"incluya de forma habitual."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:222
msgid ""
"&#10128; This call to man:rc.subr[8] loads man:rc.conf[5] variables.  Our "
"script makes no use of them yet, but it still is recommended to load man:rc."
"conf[5] because there can be man:rc.conf[5] variables controlling man:rc."
"subr[8] itself."
msgstr ""
"&#10128; Esta llamada a man:rc.subr[8] carga las variables de man:rc.conf[5]"
". Nuestro script no las utiliza todavía, pero aún así se recomienda cargar "
"man:rc.conf[5] porque puede haber variables de man:rc.conf[5] controlando al "
"propio man:rc.subr[8]."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:225
msgid ""
"&#10129; Usually this is the last command in an [.filename]#rc.d# script.  "
"It invokes the man:rc.subr[8] machinery to perform the requested action "
"using the variables and methods our script has provided."
msgstr ""
"&#10129; Normalmente este es el último comando en un script [.filename]#rc.d#"
". Invoca la maquinaria de man:rc.subr[8] para realizar la acción solicitada "
"utilizando las variables y métodos que ha proporcionado nuestro script."

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:227
#, no-wrap
msgid "A configurable dummy script"
msgstr "Un script ficticio configurable"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:237
msgid ""
"Now let us add some controls to our dummy script.  As you may know, [."
"filename]#rc.d# scripts are controlled with man:rc.conf[5].  Fortunately, "
"man:rc.subr[8] hides all the complications from us.  The following script "
"uses man:rc.conf[5] via man:rc.subr[8] to see whether it is enabled in the "
"first place, and to fetch a message to show at boot time.  These two tasks "
"in fact are independent.  On the one hand, an [.filename]#rc.d# script can "
"just support enabling and disabling its service.  On the other hand, a "
"mandatory [.filename]#rc.d# script can have configuration variables.  We "
"will do both things in the same script though:"
msgstr ""
"Ahora añadamos algunos controles a nuestro script de prueba. Como sabes, los "
"scripts [.filename]#rc.d# están controlados por man:rc.conf[5]. "
"Afortunadamente, man:rc.subr[8] nos oculta todas las complicaciones. El "
"siguiente script usa man:rc.conf[5] mediante man:rc.subr[8] para ver en "
"primer lugar si está habilitado, y para obtener un mensaje que mostrar en el "
"momento del arranque. Estas dos tareas son de hecho independientes. En un "
"lado, un script [.filename]#rc.d# puede simplemente soportar la activación y "
"desactivación de su servicio. Por otro lado, un script [.filename]#rc.d# "
"obligatorio puede tener las variables de configuración. Sin embargo, "
"nosotros haremos ambas cosas en el mismo script:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:241
#: documentation/content/en/articles/rc-scripting/_index.adoc:332
#: documentation/content/en/articles/rc-scripting/_index.adoc:389
#: documentation/content/en/articles/rc-scripting/_index.adoc:621
#: documentation/content/en/articles/rc-scripting/_index.adoc:752
#, no-wrap
msgid "#!/bin/sh\n"
msgstr "#!/bin/sh\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:243
#: documentation/content/en/articles/rc-scripting/_index.adoc:334
#: documentation/content/en/articles/rc-scripting/_index.adoc:391
#: documentation/content/en/articles/rc-scripting/_index.adoc:628
#: documentation/content/en/articles/rc-scripting/_index.adoc:754
#, no-wrap
msgid ". /etc/rc.subr\n"
msgstr ". /etc/rc.subr\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:246
#, no-wrap
msgid ""
"name=dummy\n"
"rcvar=dummy_enable <.>\n"
msgstr ""
"name=dummy\n"
"rcvar=dummy_enable <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:249
#, no-wrap
msgid ""
"start_cmd=\"${name}_start\"\n"
"stop_cmd=\":\"\n"
msgstr ""
"start_cmd=\"${name}_start\"\n"
"stop_cmd=\":\"\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:253
#, no-wrap
msgid ""
"load_rc_config $name <.>\n"
": ${dummy_enable:=no} <.>\n"
": ${dummy_msg=\"Nothing started.\"} <.>\n"
msgstr ""
"load_rc_config $name <.>\n"
": ${dummy_enable:=no} <.>\n"
": ${dummy_msg=\"Nothing started.\"} <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:258
#, no-wrap
msgid ""
"dummy_start()\n"
"{\n"
"\techo \"$dummy_msg\" <.>\n"
"}\n"
msgstr ""
"dummy_start()\n"
"{\n"
"\techo \"$dummy_msg\" <.>\n"
"}\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:260
#, no-wrap
msgid "run_rc_command \"$1\"\n"
msgstr "run_rc_command \"$1\"\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:263
msgid "What changed in this example?"
msgstr "¿Qué cambió en este ejemplo?"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:265
msgid ""
"&#10122; The variable `rcvar` specifies the name of the ON/OFF knob variable."
msgstr ""
"&#10122; La variable `rcvar` especifica el nombre de la variable ON/OFF."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:267
msgid ""
"&#10123; Now `load_rc_config` is invoked earlier in the script, before any "
"man:rc.conf[5] variables are accessed."
msgstr ""
"&#10123; Ahora `load_rc_config` es invocado pronto en el script, antes de "
"que se acceda a alguna variable de man:rc.conf[5]."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:273
msgid ""
"While examining [.filename]#rc.d# scripts, keep in mind that man:sh[1] "
"defers the evaluation of expressions in a function until the latter is "
"called.  Therefore it is not an error to invoke `load_rc_config` as late as "
"just before `run_rc_command` and still access man:rc.conf[5] variables from "
"the method functions exported to `run_rc_command`.  This is because the "
"method functions are to be called by `run_rc_command`, which is invoked "
"_after_ `load_rc_config`."
msgstr ""
"Cuando examines scripts [.filename]#rc.d#, ten en cuenta que man:sh[1] "
"retrasa la evaluación de expresiones en una función hasta que ésta es "
"invocada. Por lo tanto, no es un error invocar `load_rc_config` tan tarde "
"como justo antes de `run_rc_command` y aún así acceder a variables de man:rc."
"conf[5] desde los métodos exportados a `run_rc_command`. Esto es porque los "
"métodos se llaman desde `run_rc_command`, que es invocado _después_ de "
"`load_rc_config`."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:279
msgid ""
"&#10124; A warning will be emitted by `run_rc_command` if `rcvar` itself is "
"set, but the indicated knob variable is unset.  If your [.filename]#rc.d# "
"script is for the base system, you should add a default setting for the knob "
"to [.filename]#/etc/defaults/rc.conf# and document it in man:rc.conf[5].  "
"Otherwise it is your script that should provide a default setting for the "
"knob.  The canonical approach to the latter case is shown in the example."
msgstr ""
"&#10124; Se emitirá un aviso desde `run_rc_command` si `rcvar` está "
"establecida, pero la variable en sí no lo está. Si tu script [.filename]#rc."
"d# es para el sistema base, deberías añadir un valor por defecto para la "
"variable en [.filename]#/etc/defaults/rc.conf# y documentarlo en man:rc."
"conf[5]. De lo contrario tu script debería proporcionar un valor por defecto "
"para la variable. La aproximación canónica para el último caso se muestra en "
"el ejemplo."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:286
msgid ""
"You can make man:rc.subr[8] act as though the knob is set to `ON`, "
"irrespective of its current setting, by prefixing the argument to the script "
"with `one` or `force`, as in `onestart` or `forcestop`.  Keep in mind though "
"that `force` has other dangerous effects we will touch upon below, while "
"`one` just overrides the ON/OFF knob.  E.g., assume that `dummy_enable` is "
"`OFF`.  The following command will run the `start` method in spite of the "
"setting:"
msgstr ""
"Puedes hacer que man:rc.subr[8] actúe como si la variable estuviera a `ON`, "
"independientemente de su estado actual, poniendo como prefijo del argumento "
"del script `one` o `force`, como en `onestart` o `forcestop`. Ten en cuenta "
"sin embargo que `force` tiene otros efectos peligrosos que mencionaremos "
"abajo, mientras que `one` simplemente tiene preferencia sobre la variable ON/"
"OFF. Por ejemplo, asume que `dummy_enable` es `OFF`. El siguiente comando "
"ejecutará el método `start` a pesar de esa configuración:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:290
#, no-wrap
msgid "# /etc/rc.d/dummy onestart\n"
msgstr "# /etc/rc.d/dummy onestart\n"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:297
msgid ""
"&#10125; Now the message to be shown at boot time is no longer hard-coded in "
"the script.  It is specified by an man:rc.conf[5] variable named "
"`dummy_msg`.  This is a trivial example of how man:rc.conf[5] variables can "
"control an [.filename]#rc.d# script."
msgstr ""
"&#10125; Ahora el mensaje que se mostrará en el arranque ya no está "
"inmutable en el script. Se especifica en una variable de man:rc.conf[5] "
"llamada `dummy_msg`. Este es un ejemplo trivial de cómo un script de [."
"filename]#rc.d# puede ser controlado por variables de man:rc.conf[5]."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:302
msgid ""
"The names of all man:rc.conf[5] variables used exclusively by our script "
"_must_ have the same prefix: `${name}_`.  For example: `dummy_mode`, "
"`dummy_state_file`, and so on."
msgstr ""
"Los nombres de todas las variables man:rc.conf[5] usadas en exclusiva por "
"nuestro script _deben tener_ el mismo prefijo: `${name}_`. Por ejemplo: "
"`dummy_mode`, `dummy_state_file`, y así sucesivamente."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:307
msgid ""
"While it is possible to use a shorter name internally, e.g., just `msg`, "
"adding the unique prefix `${name}_` to all global names introduced by our "
"script will save us from possible collisions with the man:rc.subr[8] "
"namespace."
msgstr ""
"Aunque es posible utilizar internamente un nombre más corto, por ejemplo "
"simplemente `msg`, añadir el prefijo único `${name}_` a todos los nombres "
"globales introducidos por nuestro script nos evitará posibles colisiones en "
"el espacio de nombres de man:rc.subr[8]."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:310
msgid ""
"As a rule, [.filename]#rc.d# scripts of the base system need not provide "
"defaults for their man:rc.conf[5] variables because the defaults should be "
"set in [.filename]#/etc/defaults/rc.conf# instead.  On the other hand, [."
"filename]#rc.d# scripts for ports should provide the defaults as shown in "
"the example."
msgstr ""
"Como norma, los scripts [.filename]#rc.d# del sistema base no necesitan "
"proporcionar valores por defecto para sus variables en man:rc.conf[5] porque "
"estos deberían establecerse en cambio en [.filename]#/etc/defaults/rc.conf#. "
"Por otro lado, los scripts [.filename]#rc.d# para ports deberían "
"proporcionar los valores por defecto como se muestra en el ejemplo."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:314
msgid ""
"&#10126; Here we use `dummy_msg` to actually control our script, i.e., to "
"emit a variable message.  Use of a shell function is overkill here, since it "
"only runs a single command; an equally valid alternative is:"
msgstr ""
"&#10126; Aquí utilizamos `dummy_msg` en realidad para controlar nuestro "
"script, es decir, para emitir un mensaje variable. Utilizar una función de "
"shell para esto es demasiado ya que sólo ejecuta un comando. Una alternativa "
"igualmente válida es:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:318
#, no-wrap
msgid "start_cmd=\"echo \\\"$dummy_msg\\\"\"\n"
msgstr "start_cmd=\"echo \\\"$dummy_msg\\\"\"\n"

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:321
#, no-wrap
msgid "Startup and shutdown of a simple daemon"
msgstr "Arranque y parada de un demonio simple"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:328
msgid ""
"We said earlier that man:rc.subr[8] could provide default methods.  "
"Obviously, such defaults cannot be too general.  They are suited for the "
"common case of starting and shutting down a simple daemon program.  Let us "
"assume now that we need to write an [.filename]#rc.d# script for such a "
"daemon called `mumbled`.  Here it is:"
msgstr ""
"Dijimos antes que man:rc.subr[8] podía proporcionar métodos por defecto. "
"Obviamente, estos no pueden ser muy generales. Se adaptan bien al caso común "
"de arrancar y parar un programa tipo demonio que sea sencillo. Asumamos "
"ahora que necesitamos escribir un script [.filename]#rc.d# para dicho "
"demonio llamado `mumbled`. Aquí está:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:337
#: documentation/content/en/articles/rc-scripting/_index.adoc:394
#: documentation/content/en/articles/rc-scripting/_index.adoc:631
#, no-wrap
msgid ""
"name=mumbled\n"
"rcvar=mumbled_enable\n"
msgstr ""
"name=mumbled\n"
"rcvar=mumbled_enable\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:339
#, no-wrap
msgid "command=\"/usr/sbin/${name}\" <.>\n"
msgstr "command=\"/usr/sbin/${name}\" <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:342
#: documentation/content/en/articles/rc-scripting/_index.adoc:440
#: documentation/content/en/articles/rc-scripting/_index.adoc:646
#, no-wrap
msgid ""
"load_rc_config $name\n"
"run_rc_command \"$1\"\n"
msgstr ""
"load_rc_config $name\n"
"run_rc_command \"$1\"\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:346
msgid ""
"Pleasingly simple, isn't it? Let us examine our little script.  The only new "
"thing to note is as follows:"
msgstr ""
"Agradablemente simple, ¿no? Examinemos nuestro pequeño script. Lo único "
"nuevo a tener en cuenta es lo siguiente:"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:350
msgid ""
"&#10122; The `command` variable is meaningful to man:rc.subr[8].  If it is "
"set, man:rc.subr[8] will act according to the scenario of serving a "
"conventional daemon.  In particular, the default methods will be provided "
"for such arguments: `start`, `stop`, `restart`, `poll`, and `status`."
msgstr ""
"&#10122; La variable `command` tiene sentido para man:rc.subr[8]. Si está "
"establecida, man:rc.subr[8] actuará en consecuencia con el escenario de "
"servir un demonio convencional. En particular, se proporcionarán los métodos "
"por defecto para los argumentos: `start`, `stop`, `restart`, `poll`, y "
"`status`."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:359
msgid ""
"The daemon will be started by running `$command` with command-line flags "
"specified by `$mumbled_flags`.  Thus all the input data for the default "
"`start` method are available in the variables set by our script.  Unlike "
"`start`, other methods may require additional information about the process "
"started.  For instance, `stop` must know the PID of the process to terminate "
"it.  In the present case, man:rc.subr[8] will scan through the list of all "
"processes, looking for a process with its name equal to `procname`.  The "
"latter is another variable of meaning to man:rc.subr[8], and its value "
"defaults to that of `command`.  In other words, when we set `command`, "
"`procname` is effectively set to the same value.  This enables our script to "
"kill the daemon and to check if it is running in the first place."
msgstr ""
"El demonio se arrancará ejecutando `$command` con los flags especificados "
"por `$mumbled_flags`. Por lo tanto todos los datos de entrada para el método "
"`start` por defecto están disponibles en las variables establecidas por "
"nuestro script. A diferencia de `start`, otros métodos podrían requerir "
"información adicional acerca del proceso arrancado. Por ejemplo, `stop` debe "
"saber el PID del proceso para poder terminarlo. En el caso actual, man:rc."
"subr[8] escaneará la lista de todos los procesos, buscando un proceso cuyo "
"nombre sea `procname`. Esto último es otra variable que tiene significado "
"para man:rc.subr[8] y su valor por defecto es el valor de `command`. En "
"otras palabras, cuando establecemos `command`, `procname` se establece al "
"mismo valor. Esto posibilita que nuestro script pueda matar el demonio y así "
"como comprobar en primer lugar si se está ejecutando."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:366
msgid ""
"Some programs are in fact executable scripts.  The system runs such a script "
"by starting its interpreter and passing the name of the script to it as a "
"command-line argument.  This is reflected in the list of processes, which "
"can confuse man:rc.subr[8].  You should additionally set "
"`command_interpreter` to let man:rc.subr[8] know the actual name of the "
"process if `$command` is a script."
msgstr ""
"Algunos programas son de hecho scripts ejecutables. El sistema ejecuta "
"dichos scripts iniciando su intérprete y pasándole el nombre del script como "
"un argumento en línea de comandos. Esto se refleja en la lista de procesos, "
"que puede confundir a man:rc.subr[8]. Deberías establecer además "
"`command_interpreter` para que man:rc.subr[8] sepa cuál es el verdadero "
"nombre del proceso si `$command` es un script."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:371
msgid ""
"For each [.filename]#rc.d# script, there is an optional man:rc.conf[5] "
"variable that takes precedence over `command`.  Its name is constructed as "
"follows: `${name}_program`, where `name` is the mandatory variable we "
"discussed <<name-var, earlier>>.  E.g., in this case it will be "
"`mumbled_program`.  It is man:rc.subr[8] that arranges `${name}_program` to "
"override `command`."
msgstr ""
"Para cada script [.filename]#rc.d#, hay una variable opcional en man:rc."
"conf[5] que tiene preferencia sobre `command`. Su nombre se construye de la "
"siguiente manera: `${name}_program`, donde `name` es la variable obligatoria "
"que discutimos <<name-var, anteriormente>>. Ejemplo, en este caso será "
"`mumbled_program`. Es man:rc.subr[8] quien hace que `${name}_program` tenga "
"más prioridad que `command`."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:375
msgid ""
"Of course, man:sh[1] will permit you to set `${name}_program` from man:rc."
"conf[5] or the script itself even if `command` is unset.  In that case, the "
"special properties of `${name}_program` are lost, and it becomes an ordinary "
"variable your script can use for its own purposes.  However, the sole use of "
"`${name}_program` is discouraged because using it together with `command` "
"became an idiom of [.filename]#rc.d# scripting."
msgstr ""
"Por supuesto, man:sh[1] te permitirá establecer `${name}_program` desde "
"man:rc.conf[5] o incluso desde el propio script si `command` no está "
"establecido. En ese caso, las propiedades especiales de `${name}_program` se "
"pierden y se convierte en una variable ordinaria que tu script puede usar "
"para sus propios fines. Sin embargo, el uso aislado de `${name}_program` "
"está desaconsejado porque usarlo junto con `command` se ha convertido en "
"algo idiomático en los scripts de [.filename]#rc.d#."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:378
msgid ""
"For more detailed information on default methods, refer to man:rc.subr[8]."
msgstr ""
"Para una información más detallada acerca de los métodos por defecto, "
"consulta man:rc.subr[8]."

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:380
#, no-wrap
msgid "Startup and shutdown of an advanced daemon"
msgstr "Arranque y parada de un demonio avanzado"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:385
msgid ""
"Let us add some meat onto the bones of the previous script and make it more "
"complex and featureful.  The default methods can do a good job for us, but "
"we may need some of their aspects tweaked.  Now we will learn how to tune "
"the default methods to our needs."
msgstr ""
"Agreguemos un poco de carne a los huesos del guión anterior y hagámoslo más "
"complejo y más rico en características. Los métodos predeterminados pueden "
"hacer un buen trabajo por nosotros, pero es posible que necesitemos ajustar "
"algunos de sus aspectos. Ahora aprenderemos cómo ajustar los métodos "
"predeterminados a nuestras necesidades."

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:397
#, no-wrap
msgid ""
"command=\"/usr/sbin/${name}\"\n"
"command_args=\"mock arguments > /dev/null 2>&1\" <.>\n"
msgstr ""
"command=\"/usr/sbin/${name}\"\n"
"command_args=\"mock arguments > /dev/null 2>&1\" <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:399
#, no-wrap
msgid "pidfile=\"/var/run/${name}.pid\" <.>\n"
msgstr "pidfile=\"/var/run/${name}.pid\" <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:401
#, no-wrap
msgid "required_files=\"/etc/${name}.conf /usr/share/misc/${name}.rules\" <.>\n"
msgstr ""
"required_files=\"/etc/${name}.conf /usr/share/misc/${name}.rules\" <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:403
#, no-wrap
msgid "sig_reload=\"USR1\" <.>\n"
msgstr "sig_reload=\"USR1\" <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:406
#, no-wrap
msgid ""
"start_precmd=\"${name}_prestart\" <.>\n"
"stop_postcmd=\"echo Bye-bye\" <.>\n"
msgstr ""
"start_precmd=\"${name}_prestart\" <.>\n"
"stop_postcmd=\"echo Bye-bye\" <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:408
#, no-wrap
msgid "extra_commands=\"reload plugh xyzzy\" <.>\n"
msgstr "extra_commands=\"reload plugh xyzzy\" <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:411
#, no-wrap
msgid ""
"plugh_cmd=\"mumbled_plugh\" <.>\n"
"xyzzy_cmd=\"echo 'Nothing happens.'\"\n"
msgstr ""
"plugh_cmd=\"mumbled_plugh\" <.>\n"
"xyzzy_cmd=\"echo 'Nothing happens.'\"\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:432
#, no-wrap
msgid ""
"mumbled_prestart()\n"
"{\n"
"\tif checkyesno mumbled_smart; then <.>\n"
"\t\trc_flags=\"-o smart ${rc_flags}\" <.>\n"
"\tfi\n"
"\tcase \"$mumbled_mode\" in\n"
"\tfoo)\n"
"\t\trc_flags=\"-frotz ${rc_flags}\"\n"
"\t\t;;\n"
"\tbar)\n"
"\t\trc_flags=\"-baz ${rc_flags}\"\n"
"\t\t;;\n"
"\t*)\n"
"\t\twarn \"Invalid value for mumbled_mode\" <.>\n"
"\t\treturn 1 <.>\n"
"\t\t;;\n"
"\tesac\n"
"\trun_rc_command xyzzy <.>\n"
"\treturn 0\n"
"}\n"
msgstr ""
"mumbled_prestart()\n"
"{\n"
"\tif checkyesno mumbled_smart; then <.>\n"
"\t\trc_flags=\"-o smart ${rc_flags}\" <.>\n"
"\tfi\n"
"\tcase \"$mumbled_mode\" in\n"
"\tfoo)\n"
"\t\trc_flags=\"-frotz ${rc_flags}\"\n"
"\t\t;;\n"
"\tbar)\n"
"\t\trc_flags=\"-baz ${rc_flags}\"\n"
"\t\t;;\n"
"\t*)\n"
"\t\twarn \"Invalid value for mumbled_mode\" <.>\n"
"\t\treturn 1 <.>\n"
"\t\t;;\n"
"\tesac\n"
"\trun_rc_command xyzzy <.>\n"
"\treturn 0\n"
"}\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:437
#, no-wrap
msgid ""
"mumbled_plugh() <.>\n"
"{\n"
"\techo 'A hollow voice says \"plugh\".'\n"
"}\n"
msgstr ""
"mumbled_plugh() <.>\n"
"{\n"
"\techo 'A hollow voice says \"plugh\".'\n"
"}\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:445
msgid ""
"&#10122; Additional arguments to `$command` can be passed in "
"`command_args`.  They will be added to the command line after `"
"$mumbled_flags`.  Since the final command line is passed to `eval` for its "
"actual execution, input and output redirections can be specified in "
"`command_args`."
msgstr ""
"&#10122; Se pueden pasar argumentos adicionales a `$command` mediante "
"`command_args`. Se añadirán a la línea de comando después de `$mumbled_flags`"
". Como la línea de comando final se pasa a `eval` para su ejecución, se "
"pueden especificar redirecciones de entrada y salida en `command_args`."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:452
msgid ""
"_Never_ include dashed options, like `-X` or `--foo`, in `command_args`.  "
"The contents of `command_args` will appear at the end of the final command "
"line, hence they are likely to follow arguments present in `${name}_flags`; "
"but most commands will not recognize dashed options after ordinary "
"arguments.  A better way of passing additional options to `$command` is to "
"add them to the beginning of `${name}_flags`.  Another way is to modify "
"`rc_flags` <<rc-flags, as shown later>>."
msgstr ""
"_Nunca_ incluyas opciones con guiones, como `-X` o `--foo`, en `command_args`"
". El contenido de `command_args` aparecerá al final de la línea de comando, "
"por lo tanto seguramente aparezcan después que los argumentos presentes en "
"`${name}_flags`; pero la mayoría de los comandos no reconocen opciones con "
"guiones que aparezcan después de los argumentos ordinarios. Una forma mejor "
"de pasar opciones adicionales a `$command` es añadirlas al principio de "
"`${name}_flags`. Otra forma es modificar `rc_flags` <<rc-flags, como se "
"muestra más adelante>>."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:456
msgid ""
"&#10123; A good-mannered daemon should create a _pidfile_ so that its "
"process can be found more easily and reliably.  The variable `pidfile`, if "
"set, tells man:rc.subr[8] where it can find the pidfile for its default "
"methods to use."
msgstr ""
"&#10123; Un demonio con buenos modales debería crear un _pidfile_ de forma "
"que su proceso se pueda encontrar de forma más fácil y segura. La variable "
"`pidfile`, si está establecida, le dice a man:rc.subr[8] dónde puede "
"encontrar el pidfile para que lo usen sus métodos por defecto."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:461
msgid ""
"In fact, man:rc.subr[8] will also use the pidfile to see if the daemon is "
"already running before starting it.  This check can be skipped by using the "
"`faststart` argument."
msgstr ""
"De hecho, man:rc.subr[8] también usará el pidfile para ver si el demonio "
"está corriendo antes de arrancarlo. Esta comprobación se puede omitir "
"utilizando el argumento `faststart`."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:466
msgid ""
"&#10124; If the daemon cannot run unless certain files exist, just list them "
"in `required_files`, and man:rc.subr[8] will check that those files do exist "
"before starting the daemon.  There also are `required_dirs` and "
"`required_vars` for directories and environment variables, respectively.  "
"They all are described in detail in man:rc.subr[8]."
msgstr ""
"&#10124; Si el demonio no puede ejecutarse a menos que exista cierto "
"fichero, tan solo inclúyelos en la lista `required_files`, y man:rc.subr[8] "
"comprobará que esos ficheros existen antes de arrancar el demonio. También "
"existen `required_dirs` y `required_vars` para directorios y variables de "
"entorno respectivamente. Todas ellas están descritas con detalle en man:rc."
"subr[8]."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:470
msgid ""
"The default method from man:rc.subr[8] can be forced to skip the "
"prerequisite checks by using `forcestart` as the argument to the script."
msgstr ""
"Se puede forzar el método por defecto de man:rc.subr[8] para que se salte "
"las comprobaciones de prerequisitos utilizando `forcestart` como argumento "
"del script."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:476
msgid ""
"&#10125; We can customize signals to send to the daemon in case they differ "
"from the well-known ones.  In particular, `sig_reload` specifies the signal "
"that makes the daemon reload its configuration; it is SIGHUP by default.  "
"Another signal is sent to stop the daemon process; the default is SIGTERM, "
"but this can be changed by setting `sig_stop` appropriately."
msgstr ""
"&#10125; Podemos personalizar qué señales enviar al demonio en caso de que "
"difieran de las que son bien conocidas. En particular, `sig_reload` "
"especifica la señal que hace que el demonio recargue su configuración; es "
"SIGHUP por defecto. Otra señal se envía para parar el proceso del demonio; "
"por defecto es SIGTERM, pero se puede cambiar estableciendo `sig_stop` de "
"forma apropiada."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:481
msgid ""
"The signal names should be specified to man:rc.subr[8] without the `SIG` "
"prefix, as it is shown in the example.  The FreeBSD version of man:kill[1] "
"can recognize the `SIG` prefix, but the versions from other OS types may not."
msgstr ""
"Los nombres de las señales se tienen que especificar a man:rc.subr[8] sin el "
"prefijo `SIG`, como se muestra en el ejemplo. La versión de man:kill[1] de "
"FreeBSD puede reconocer el prefijo `SIG`, pero versiones de otros tipos de "
"OS podrían no hacerlo."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:486
msgid ""
"&#10126;&#10127; Performing additional tasks before or after the default "
"methods is easy.  For each command-argument supported by our script, we can "
"define `argument_precmd` and `argument_postcmd`.  These man:sh[1] commands "
"are invoked before and after the respective method, as it is evident from "
"their names."
msgstr ""
"&#10126;&#10127; Realizar tareas adicionales antes o después de los métodos "
"por defecto es fácil. Para cada comando-argumento soportado por nuestro "
"script, podemos definir `argument_precmd` y `argument_postcmd`. Estos "
"comandos man:sh[1] se invocan antes y después del método respectivo, como es "
"evidente por sus nombres."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:492
msgid ""
"Overriding a default method with a custom `argument_cmd` still does not "
"prevent us from making use of `argument_precmd` or `argument_postcmd` if we "
"need to.  In particular, the former is good for checking custom, "
"sophisticated conditions that should be met before performing the command "
"itself.  Using `argument_precmd` along with `argument_cmd` lets us logically "
"separate the checks from the action."
msgstr ""
"Sobrescribir un método por defecto con un `argument_cmd` personalizado no "
"nos impide usar `argument_precmd` o `argument_postcmd` si lo necesitamos. En "
"particular, el primero es bueno para comprobar condiciones sofisticadas, "
"personalizadas que se deberían cumplir antes de ejecutar el comando. Usar "
"`argument_precmd` junto con `argument_cmd` nos permite realizar una "
"separación lógica de las comprobaciones y la acción."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:495
msgid ""
"Do not forget that you can cram any valid man:sh[1] expressions into the "
"methods, pre-, and post-commands you define.  Just invoking a function that "
"makes the real job is a good style in most cases, but never let style limit "
"your understanding of what is going on behind the curtain."
msgstr ""
"No olvides que puedes poner cualquier expresión man:sh[1] válida dentro de "
"los métodos, pre-, y post-commands que defines. Invocar simplemente una "
"función que realiza el trabajo es un buen estilo en la mayoría de los casos, "
"pero nunca dejes que el estilo limite tu entendimiento de lo que sucede por "
"debajo."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:498
msgid ""
"&#10128; If we would like to implement custom arguments, which can also be "
"thought of as _commands_ to our script, we need to list them in "
"`extra_commands` and provide methods to handle them."
msgstr ""
"&#10128; Si quieres implementar argumentos personalizados, que también se "
"pueden entender como _comandos_ para nuestro script, necesitamos listarlos "
"en `extra_commands` y proporcionar métodos para manejarlos."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:506
msgid ""
"The `reload` command is special. On the one hand, it has a preset method in "
"man:rc.subr[8].  On the other hand, `reload` is not offered by default.  The "
"reason is that not all daemons use the same reload mechanism and some have "
"nothing to reload at all.  So we need to ask explicitly that the builtin "
"functionality be provided.  We can do so via `extra_commands`."
msgstr ""
"El comando `reload` es especial. Por un lados tiene un método preestablecido "
"en man:rc.subr[8]. Por otro, `reload` no se ofrece por defecto. El motivo es "
"que no todos los demonios usan el mismo mecanismo de recarga y algunos no "
"tienen nada que recargar. De forma que tenemos que pedir explícitamente que "
"se proporcione la funcionalidad. Podemos hacerlo mediante `extra_commands`."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:510
msgid ""
"What do we get from the default method for `reload`? Quite often daemons "
"reload their configuration upon reception of a signal - typically, SIGHUP.  "
"Therefore man:rc.subr[8] attempts to reload the daemon by sending a signal "
"to it.  The signal is preset to SIGHUP but can be customized via "
"`sig_reload` if necessary."
msgstr ""
"¿Qué obtenemos del método por defecto para `reload`? A menudo los demonios "
"recargan su configuración al recibir una señal - típicamente, SIGHUP. Por lo "
"tanto man:rc.subr[8] intenta recargar el demonio enviándole una señal. La "
"están señal está preestablecida a SIGHUP pero se puede cambiar mediante "
"`sig_reload` si es necesario."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:515
msgid ""
"&#10129;&#9454; Our script supports two non-standard commands, `plugh` and "
"`xyzzy`.  We saw them listed in `extra_commands`, and now it is time to "
"provide methods for them.  The method for `xyzzy` is just inlined while that "
"for `plugh` is implemented as the `mumbled_plugh` function."
msgstr ""
"&#10129;&#9454; Nuestro script soporta dos comandos no estándar, `plugh` y "
"`xyzzy`. Los hemos visto listados en `extra_commands`, y ahora es momento de "
"proporcionarles métodos. El método para `xyzzy` está entre líneas mientras "
"que el de `plugh` se implementa en la función `mumbled_plugh`."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:519
msgid ""
"Non-standard commands are not invoked during startup or shutdown.  Usually "
"they are for the system admin's convenience.  They can also be used from "
"other subsystems, e.g., man:devd[8] if specified in man:devd.conf[5]."
msgstr ""
"Los comandos no estándar no se invocan durante el arranque o el apagado. "
"Normalmente están ahí por conveniencia para los administradores. También se "
"pueden usar desde otros subsistemas, por ejemplo, man:devd[8] si se "
"especifica en man:devd.conf[5]."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:522
msgid ""
"The full list of available commands can be found in the usage line printed "
"by man:rc.subr[8] when the script is invoked without arguments.  For "
"example, here is the usage line from the script under study:"
msgstr ""
"Se puede encontrar la lista completa de comandos disponibles en la línea de "
"uso imprimida por man:rc.subr[8] cuando se invoca el script sin argumentos. "
"Por ejemplo, esta es la línea de uso para el script que estamos estudiando:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:527
#, no-wrap
msgid ""
"# /etc/rc.d/mumbled\n"
"Usage: /etc/rc.d/mumbled [fast|force|one](start|stop|restart|rcvar|reload|plugh|xyzzy|status|poll)\n"
msgstr ""
"# /etc/rc.d/mumbled\n"
"Usage: /etc/rc.d/mumbled "
"[fast|force|one](start|stop|restart|rcvar|reload|plugh|xyzzy|status|poll)\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:534
msgid ""
"&#9453; A script can invoke its own standard or non-standard commands if "
"needed.  This may look similar to calling functions, but we know that "
"commands and shell functions are not always the same thing.  For instance, "
"`xyzzy` is not implemented as a function here.  In addition, there can be a "
"pre-command and post-command, which should be invoked orderly.  So the "
"proper way for a script to run its own command is by means of man:rc."
"subr[8], as shown in the example."
msgstr ""
"&#9453; Un script puede invocar sus comandos estándar y no estándar si lo "
"necesita. Esto parece similar a llamar a funciones, pero sabemos que los "
"comandos y funciones del shell no son siempre la misma cosa. Por ejemplo, "
"`xyzzy` aquí no se implementa como una función. Además, puede haber pre-"
"comandos y post-comandos, que se deberían invocar en orden. De modo que la "
"forma apropiada para que un script ejecute sus propios comandos es mediante "
"man:rc.subr[8], como se muestra en el ejemplo."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:540
msgid ""
"&#10130; A handy function named `checkyesno` is provided by man:rc.subr[8].  "
"It takes a variable name as its argument and returns a zero exit code if and "
"only if the variable is set to `YES`, or `TRUE`, or `ON`, or `1`, case "
"insensitive; a non-zero exit code is returned otherwise.  In the latter "
"case, the function tests the variable for being set to `NO`, `FALSE`, `OFF`, "
"or `0`, case insensitive; it prints a warning message if the variable "
"contains anything else, i.e., junk."
msgstr ""
"&#10130; man:rc.subr[8] proporciona una función útil llamada `checkyesno`. "
"Admite una variable como argumento y devuelve cero si y sólo si la variable "
"está establecida a `YES`, o `TRUE`, o `ON`, o `1`, sin considerar mayúsculas "
"y minúsculas; devuelve un valor distinto de cero en caso contrario. En el "
"último caso, la función comprueba que la variable esté establecida a `NO`, "
"`FALSE`, `OFF`, o `0`, sin distinguir entre mayúsculas y minúsculas; imprime "
"un aviso si la variable contiene cualquier otra cosa, es decir, basura."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:542
msgid ""
"Keep in mind that for man:sh[1] a zero exit code means true and a non-zero "
"exit code means false."
msgstr ""
"Ten en cuenta que para man:sh[1] un código de salida igual a cero significa "
"verdadero y distinto de cero significa falso."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:547
msgid ""
"The `checkyesno` function takes a __variable name__.  Do not pass the "
"expanded _value_ of a variable to it; it will not work as expected."
msgstr ""
"La función `checkyesno` admite un __nombre de variable__. No pases el "
"_valor_ expandido de una variable; no funcionará como se espera."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:549
msgid "The following is the correct usage of `checkyesno`:"
msgstr "Lo siguiente es un uso correcto de `checkyesno`:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:555
#, no-wrap
msgid ""
"if checkyesno mumbled_enable; then\n"
"        foo\n"
"fi\n"
msgstr ""
"if checkyesno mumbled_enable; then\n"
"        foo\n"
"fi\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:558
msgid ""
"On the contrary, calling `checkyesno` as shown below will not work - at "
"least not as expected:"
msgstr ""
"Por el contrario, llamar a `checkyesno` como se muestra abajo no funcionará -"
" al menos no como se espera:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:564
#, no-wrap
msgid ""
"if checkyesno \"${mumbled_enable}\"; then\n"
"        foo\n"
"fi\n"
msgstr ""
"if checkyesno \"${mumbled_enable}\"; then\n"
"        foo\n"
"fi\n"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:569
msgid ""
"&#10131; [[rc-flags]]We can affect the flags to be passed to `$command` by "
"modifying `rc_flags` in `$start_precmd`."
msgstr ""
"&#10131; [[rc-flags]]Podemos alterar los flags que se pasan a `$command` "
"modificando `rc_flags` en `$start_precmd`."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:573
msgid ""
"&#9451; In certain cases we may need to emit an important message that "
"should go to `syslog` as well.  This can be done easily with the following "
"man:rc.subr[8] functions: `debug`, `info`, `warn`, and `err`.  The latter "
"function then exits the script with the code specified."
msgstr ""
"&#9451; En algunos casos podríamos necesitar emitir un mensaje importante "
"que debería ir también a `syslog`. Se puede hacer fácilmente con las "
"siguientes funciones de man:rc.subr[8]: `debug`, `info`, `warn`, y `err`. La "
"última función sale del script con el código especificado."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:577
msgid ""
"&#9452; The exit codes from methods and their pre-commands are not just "
"ignored by default.  If `argument_precmd` returns a non-zero exit code, the "
"main method will not be performed.  In turn, `argument_postcmd` will not be "
"invoked unless the main method returns a zero exit code."
msgstr ""
"&#9452; Los códigos de salida de los métodos y sus pre-comandos no se "
"ignoran simplemente por defecto. Si `argument_precmd` devuelve un código de "
"salida distinto de cero, el método principal no se ejecutará. Del mismo "
"modo, `argument_postcmd` no será invocado a menos que el método principal "
"devuelva un código de salida igual a cero."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:581
msgid ""
"However, man:rc.subr[8] can be instructed from the command line to ignore "
"those exit codes and invoke all commands anyway by prefixing an argument "
"with `force`, as in `forcestart`."
msgstr ""
"Sin embargo, desde la línea de comando se puede indicar a man:rc.subr[8] que "
"ignore esos códigos de salida e invoque todos los comandos añadiendo el "
"prefijo `force` a los argumentos, como en `forcestart`."

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:584
#, no-wrap
msgid "Connecting a script to the rc.d framework"
msgstr "Conectando un script al framework rc.d"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:591
msgid ""
"After a script has been written, it needs to be integrated into [."
"filename]#rc.d#.  The crucial step is to install the script in [.filename]#/"
"etc/rc.d# (for the base system) or [.filename]#/usr/local/etc/rc.d# (for "
"ports).  Both [.filename]#bsd.prog.mk# and [.filename]#bsd.port.mk# provide "
"convenient hooks for that, and usually you do not have to worry about the "
"proper ownership and mode.  System scripts should be installed from [."
"filename]#src/libexec/rc/rc.d# through the [.filename]#Makefile# found "
"there.  Port scripts can be installed using `USE_RC_SUBR` as described "
"extref:{porters-handbook}[in the Porter's Handbook, rc-scripts]."
msgstr ""
"Después de que se ha escrito un script, es necesario integrarlo en [."
"filename]#rc.d#. El paso crucial es instalar el script en [.filename]#/etc/rc"
".d# (para el sistema base) o [.filename]#/usr/local/etc/rc.d# (para los "
"ports). Tanto [.filename]#bsd.prog.mk# como [.filename]#bsd.port.mk# "
"proporcionan los hooks necesarios para ello, y normalmente no tienes que "
"preocuparte acerca de los permisos y el propietario. Los scripts de sistema "
"deberían instalarse desde [.filename]#src/libexec/rc/rc.d# mediante el [."
"filename]#Makefile# que se encuentra allí. Los scripts de ports se pueden "
"instalar con `USE_RC_SUBR` como se describe extref:{porters-handbook}[en el "
"Porter's Handbook, rc-scripts]."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:596
msgid ""
"However, we should consider beforehand the place of our script in the system "
"startup sequence.  The service handled by our script is likely to depend on "
"other services.  For instance, a network daemon cannot function without the "
"network interfaces and routing up and running.  Even if a service seems to "
"demand nothing, it can hardly start before the basic filesystems have been "
"checked and mounted."
msgstr ""
"Sin embargo, debemos considerar de antemano el lugar de nuestro script en la "
"secuencia de inicio del sistema. Es probable que el servicio manejado por "
"nuestro script dependa de otros servicios. Por ejemplo, un demonio de red no "
"puede funcionar sin las interfaces de red y enrutamiento en funcionamiento. "
"Incluso si un servicio parece no exigir nada, difícilmente puede iniciarse "
"antes de que se hayan verificado y montado los sistemas de archivos básicos."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:602
msgid ""
"We mentioned man:rcorder[8] already.  Now it is time to have a close look at "
"it.  In a nutshell, man:rcorder[8] takes a set of files, examines their "
"contents, and prints a dependency-ordered list of files from the set to "
"`stdout`.  The point is to keep dependency information _inside_ the files so "
"that each file can speak for itself only.  A file can specify the following "
"information:"
msgstr ""
"Ya hemos mencionado man:rcorder[8]. Ahora es momento de mirarlo "
"detenidamente. En pocas palabras, man:rcorder[8] toma un conjunto de "
"ficheros, examina el contenido e imprime una lista ordenada de dependencias "
"de ficheros del conjunto a `stdout`. El objetivo es mantener la información "
"de dependencia _dentro_ de los ficheros de forma que cada uno de ellos sólo "
"habla por sí mismo. Un fichero puede especificar la siguiente información:"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:604
msgid ""
"the names of the \"conditions\" (which means services to us) it __provides__;"
msgstr ""
"los nombres de las \"condiciones\" (lo que para nosotros significa servicios)"
" que __proporciona__;"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:605
msgid "the names of the \"conditions\" it __requires__;"
msgstr "los nombres de las \"condiciones\" que __requiere__;"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:606
msgid "the names of the \"conditions\" this file should run __before__;"
msgstr ""
"los nombres de las \"condiciones\" para las cuales este fichero debería "
"ejecutarse _con anterioridad_;"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:607
msgid ""
"additional _keywords_ that can be used to select a subset from the whole set "
"of files (man:rcorder[8] can be instructed via options to include or omit "
"the files having particular keywords listed.)"
msgstr ""
"_palabras clave_ adicionales que se pueden usar para seleccionar un "
"subconjunto de todo el conjunto de ficheros (se puede indicar a "
"man:rcorder[8] mediante opciones que incluya u omita ficheros que contengan "
"determinadas palabras clave)"

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:612
msgid ""
"It is no surprise that man:rcorder[8] can handle only text files with a "
"syntax close to that of man:sh[1].  That is, special lines understood by man:"
"rcorder[8] look like man:sh[1] comments.  The syntax of such special lines "
"is rather rigid to simplify their processing.  See man:rcorder[8] for "
"details."
msgstr ""
"No es sorprendente que man:rcorder[8] pueda manejar sólo ficheros de texto "
"con una sintaxis similar a la de man:sh[1]. Es decir, las líneas especiales "
"entendidas por man:rcorder[8] se parecen a comentarios de man:sh[1]. La "
"sintaxis de dichas líneas especiales es bastante rígida para simplificar su "
"procesamiento. Lee man:rcorder[8] para más detalles."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:615
msgid ""
"Besides using man:rcorder[8] special lines, a script can insist on its "
"dependency upon another service by just starting it forcibly.  This can be "
"needed when the other service is optional and will not start by itself "
"because the system admin has disabled it mistakenly in man:rc.conf[5]."
msgstr ""
"Además de utilizar líneas especiales de man:rcorder[8], un script puede "
"incidir en sus dependencias de otro servicio forzando su arranque. Esto "
"podría ser necesario cuando el otro servicio es opcional y no arrancará por "
"sí mismo porque el administrador lo ha deshabilitado por error en man:rc."
"conf[5]."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:617
msgid ""
"With this general knowledge in mind, let us consider the simple daemon "
"script enhanced with dependency stuff:"
msgstr ""
"Con este conocimiento general en mente, consideremos el script demonio "
"simple mejorado con información de dependencia:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:626
#, no-wrap
msgid ""
"# PROVIDE: mumbled oldmumble <.>\n"
"# REQUIRE: DAEMON cleanvar frotz <.>\n"
"# BEFORE:  LOGIN <.>\n"
"# KEYWORD: nojail shutdown <.>\n"
msgstr ""
"# PROVIDE: mumbled oldmumble <.>\n"
"# REQUIRE: DAEMON cleanvar frotz <.>\n"
"# BEFORE:  LOGIN <.>\n"
"# KEYWORD: nojail shutdown <.>\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:634
#, no-wrap
msgid ""
"command=\"/usr/sbin/${name}\"\n"
"start_precmd=\"${name}_prestart\"\n"
msgstr ""
"command=\"/usr/sbin/${name}\"\n"
"start_precmd=\"${name}_prestart\"\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:643
#, no-wrap
msgid ""
"mumbled_prestart()\n"
"{\n"
"\tif ! checkyesno frotz_enable && \\\n"
"\t    ! /etc/rc.d/frotz forcestatus 1>/dev/null 2>&1; then\n"
"\t\tforce_depend frotz || return 1 <.>\n"
"\tfi\n"
"\treturn 0\n"
"}\n"
msgstr ""
"mumbled_prestart()\n"
"{\n"
"\tif ! checkyesno frotz_enable && \\\n"
"\t    ! /etc/rc.d/frotz forcestatus 1>/dev/null 2>&1; then\n"
"\t\tforce_depend frotz || return 1 <.>\n"
"\tfi\n"
"\treturn 0\n"
"}\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:649
msgid "As before, detailed analysis follows:"
msgstr "Como antes, sigue un análisis detallado:"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:652
msgid ""
"&#10122; That line declares the names of \"conditions\" our script "
"provides.  Now other scripts can record a dependency on our script by those "
"names."
msgstr ""
"&#10122; Esa línea declara los nombres de las \"condiciones\" que "
"proporciona nuestro script. Ahora otros scripts pueden registrar una "
"dependencia de nuestro script usando dichos nombres."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:657
msgid ""
"Usually a script specifies a single condition provided.  However, nothing "
"prevents us from listing several conditions there, e.g., for compatibility "
"reasons."
msgstr ""
"Por lo general, un script especifica una sola condición proporcionada. Sin "
"embargo, nada nos impide enumerar varias condiciones allí, por ejemplo, por "
"razones de compatibilidad."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:659
msgid ""
"In any case, the name of the main, or the only, `PROVIDE:` condition should "
"be the same as `${name}`."
msgstr ""
"En cualquier caso, el nombre de la condición `PROVIDE:` principal, o única, "
"debería ser el mismo que `${name}`."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:663
msgid ""
"&#10123;&#10124; So our script indicates which \"conditions\" provided by "
"other scripts it depends on.  According to the lines, our script asks man:"
"rcorder[8] to put it after the script(s) providing [.filename]#DAEMON# and [."
"filename]#cleanvar#, but before that providing [.filename]#LOGIN#."
msgstr ""
"&#10123;&#10124; Nuestro script indica de qué \"condiciones\" depende que "
"son proporcionadas por otros scripts. Según esas líneas nuestro script pide "
"a man:rcorder[8] situarlo después del script (o los scripts) que "
"proporcionan [.filename]#DAEMON# y [.filename]#cleanvar#, pero antes de los "
"que proporcionan [.filename]#LOGIN#."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:669
msgid ""
"The `BEFORE:` line should not be abused to work around an incomplete "
"dependency list in the other script.  The appropriate case for using `BEFORE:"
"` is when the other script does not care about ours, but our script can do "
"its task better if run before the other one.  A typical real-life example is "
"the network interfaces vs. the firewall: While the interfaces do not depend "
"on the firewall in doing their job, the system security will benefit from "
"the firewall being ready before there is any network traffic."
msgstr ""
"No se debería abusar de la línea `BEFORE:` para evitar una lista de "
"dependencias incompleta en el otro script. El caso apropiado para usar "
"`BEFORE:` es cuando el otro script no se preocupa por el nuestro, pero "
"nuestro script puede hacer mejor su tarea si se ejecuta antes que el otro. "
"Un ejemplo típico de la vida real son las interfaces de red frente al "
"firewall: si bien las interfaces no dependen del firewall para hacer su "
"trabajo, la seguridad del sistema se beneficiará de que el firewall esté "
"listo antes de que haya tráfico de red."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:673
msgid ""
"Besides conditions corresponding to a single service each, there are meta-"
"conditions and their \"placeholder\" scripts used to ensure that certain "
"groups of operations are performed before others.  These are denoted by [."
"filename]#UPPERCASE# names.  Their list and purposes can be found in man:"
"rc[8]."
msgstr ""
"Además de las condiciones que se corresponden con un solo servicio, hay meta-"
"condiciones y sus scripts tipo \"placeholder\" para asegurar que ciertos "
"grupos de operaciones se ejecutan antes que otras. Se distinguen por sus "
"nombres en [.filename]#MAYÚSCULAS#. Su listado y propósito se puede "
"encontrar en man:rc[8]."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:679
msgid ""
"Keep in mind that putting a service name in the `REQUIRE:` line does not "
"guarantee that the service will actually be running by the time our script "
"starts.  The required service may fail to start or just be disabled in man:"
"rc.conf[5].  Obviously, man:rcorder[8] cannot track such details, and man:"
"rc[8] will not do that either.  Consequently, the application started by our "
"script should be able to cope with any required services being unavailable.  "
"In certain cases, we can help it as discussed <<forcedep, below>>"
msgstr ""
"Ten en cuenta que poner un nombre de servicio en la línea `REQUIRE:` no "
"garantiza que el servicio se esté ejecutando cuando nuestro script arranque. "
"El servicio podría fallar al arrancar o estar deshabilitado en man:rc.conf[5]"
". Obviamente, man:rcorder[8] no puede controlar esos detalles y man:rc[8] "
"tampoco lo hará. Por lo tanto, la aplicación arrancada por nuestro script "
"debería ser capaz de lidiar con situaciones en las que algún servicio "
"requerido no esté disponible. En ciertos casos, podemos evitarlo como se "
"discute <<forcedep, abajo>>"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:684
msgid ""
"[[keywords]]&#10125; As we remember from the above text, man:rcorder[8] "
"keywords can be used to select or leave out some scripts.  Namely any man:"
"rcorder[8] consumer can specify through `-k` and `-s` options which keywords "
"are on the \"keep list\" and \"skip list\", respectively.  From all the "
"files to be dependency sorted, man:rcorder[8] will pick only those having a "
"keyword from the keep list (unless empty) and not having a keyword from the "
"skip list."
msgstr ""
"[[keywords]]&#10125; Como recordamos del texto anterior, las palabras clave "
"de man:rcorder[8] se pueden utilizar para seleccionar o excluir algunos "
"scripts. Cualquier consumidor de man:rcorder[8] puede especificar mediante "
"las opciones `-k` y `-s` qué palabras clave están en la lista \"a mantener\" "
"y la lista \"a omitir\", respectivamente. De todos los ficheros que serán "
"ordenados como dependencias, man:rcorder[8] escogerá sólo aquellos que "
"tengan las palabras clave de la lista \"a mantener\" (a menos que esté vacía)"
" y que no tenga la palabra clave en la lista \"a omitir\"."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:687
msgid ""
"In FreeBSD, man:rcorder[8] is used by [.filename]#/etc/rc# and [.filename]#/"
"etc/rc.shutdown#.  These two scripts define the standard list of FreeBSD [."
"filename]#rc.d# keywords and their meanings as follows:"
msgstr ""
"En FreeBSD, [.filename]#/etc/rc# y [.filename]#/etc/rc.shutdown# usan "
"man:rcorder[8]. Estos dos scripts definen la lista estándar de palabras "
"clave del [.filename]#rc.d# de FreeBSD y su significado es el que sigue:"

#. type: Labeled list
#: documentation/content/en/articles/rc-scripting/_index.adoc:688
#, no-wrap
msgid "nojail"
msgstr "nojail"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:690
msgid ""
"The service is not for man:jail[8] environment.  The automatic startup and "
"shutdown procedures will ignore the script if inside a jail."
msgstr ""
"El servicio no es para un entorno man:jail[8]. Los procedimientos "
"automáticos de arranque y parada ignorarán el script si está dentro de un "
"jail."

#. type: Labeled list
#: documentation/content/en/articles/rc-scripting/_index.adoc:691
#, no-wrap
msgid "nostart"
msgstr "nostart"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:694
msgid ""
"The service is to be started manually or not started at all.  The automatic "
"startup procedure will ignore the script.  In conjunction with the [."
"filename]#shutdown# keyword, this can be used to write scripts that do "
"something only at system shutdown."
msgstr ""
"El servicio se tiene que arrancar manualmente o no se arrancará. El "
"procedimiento de arranque automático ignorará el script. Esto se puede usar, "
"junto con la palabra clave [.filename]#shutdown#, para escribir scripts que "
"hace algo sólo cuando se para el sistema."

#. type: Labeled list
#: documentation/content/en/articles/rc-scripting/_index.adoc:695
#, no-wrap
msgid "shutdown"
msgstr "shutdown"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:696
msgid ""
"This keyword is to be listed __explicitly__ if the service needs to be "
"stopped before system shutdown."
msgstr ""
"Esta palabra clave se especifica __explícitamente__ si se necesita parar el "
"servicio antes de la parada del sistema."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:709
msgid ""
"When the system is going to shut down, [.filename]#/etc/rc.shutdown# runs.  "
"It assumes that most [.filename]#rc.d# scripts have nothing to do at that "
"time.  Therefore [.filename]#/etc/rc.shutdown# selectively invokes [."
"filename]#rc.d# scripts with the [.filename]#shutdown# keyword, effectively "
"ignoring the rest of the scripts.  For even faster shutdown, [.filename]#/"
"etc/rc.shutdown# passes the [.filename]#faststop# command to the scripts it "
"runs so that they skip preliminary checks, e.g., the pidfile check.  As "
"dependent services should be stopped before their prerequisites, [."
"filename]#/etc/rc.shutdown# runs the scripts in reverse dependency order.  "
"If writing a real [.filename]#rc.d# script, you should consider whether it "
"is relevant at system shutdown time.  E.g., if your script does its work in "
"response to the [.filename]#start# command only, then you need not to "
"include this keyword.  However, if your script manages a service, it is "
"probably a good idea to stop it before the system proceeds to the final "
"stage of its shutdown sequence described in man:halt[8].  In particular, a "
"service should be stopped explicitly if it needs considerable time or "
"special actions to shut down cleanly.  A typical example of such a service "
"is a database engine."
msgstr ""
"Cuando el sistema se va a apagar, se ejecuta [.filename]#/etc/rc.shutdown#. "
"Asume que la mayoría de los scripts  [.filename]#rc.d# no tienen nada que "
"hacer la mayoría del tiempo. Por lo tanto [.filename]#/etc/rc.shutdown# "
"invoca los scripts de [.filename]#rc.d# de forma selectiva con la palabra "
"clave [.filename]#shutdown#, ignorando de forma efectiva el resto de los "
"scripts. Para hacer un apagado incluso más rápido [.filename]#/etc/rc."
"shutdown# pasa el comando [.filename]#faststop# a los scripts que ejecuta de "
"forma que se salten las comprobaciones preliminares, por ejemplo la "
"comprobación del pidfile. Como los servicios dependientes se deberían parar "
"antes que sus prerequisitos,  [.filename]#/etc/rc.shutdown# ejecuta los "
"scripts en orden inverso de dependencia. Si escribes un script [.filename]#rc"
".d#, deberías considerar si es relevante en el momento del apagado. Por "
"ejemplo, si tu script hace su trabajo como respuesta sólo al comando [."
"filename]#start#, entonces no necesitas incluir esta palabra clave. Sin "
"embargo, si tu script gestiona un servicio, probablemente es una buena idea "
"pararlo antes de que el sistema proceda a la fase final de su secuencia de "
"apagado descrito en man:halt[8]. En particular, un servicio se debería parar "
"de forma explícita si necesita un tiempo considerable o acciones especiales "
"para pararse de forma limpia. Un ejemplo típico de dicho servicio es un "
"motor de bases de datos."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:713
msgid ""
"[[forcedep]]&#10126; To begin with, `force_depend` should be used with much "
"care.  It is generally better to revise the hierarchy of configuration "
"variables for your [.filename]#rc.d# scripts if they are interdependent."
msgstr ""
"[[forcedep]]&#10126; Para empezar, `force_depend` debería usarse con mucho "
"cuidado. Normalmente es mejor revisar la jerarquía de variables de "
"configuración para tu script de [.filename]#rc.d# si son interdependientes."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:722
msgid ""
"If you still cannot do without `force_depend`, the example offers an idiom "
"of how to invoke it conditionally.  In the example, our `mumbled` daemon "
"requires that another one, `frotz`, be started in advance.  However, `frotz` "
"is optional, too; and man:rcorder[8] knows nothing about such details.  "
"Fortunately, our script has access to all man:rc.conf[5] variables.  If "
"`frotz_enable` is true, we hope for the best and rely on [.filename]#rc.d# "
"to have started `frotz`.  Otherwise we forcibly check the status of "
"`frotz`.  Finally, we enforce our dependency on `frotz` if it is found to be "
"not running.  A warning message will be emitted by `force_depend` because it "
"should be invoked only if a misconfiguration has been detected."
msgstr ""
"Si aún así no puedes evitar usar `force_depend`, el ejemplo ofrece una forma "
"habitual de cómo invocarlo de forma condicional. En el ejemplo, nuestro "
"demonio `mumbled` requiere que otro, `frotz`, se arranque con antelación. "
"Sin embargo, `frotz` también es opcional; y man:rcorder[8] no sabe nada "
"acerca de ese detalle. Afortunadamente, nuestro script tiene acceso a todas "
"las variables de man:rc.conf[5]. Si `frotz_enable` es verdadero, esperamos "
"lo mejor y confiamos en que [.filename]#rc.d#  haya arrancado `frotz`. De lo "
"contrario comprobamos el estado de `frotz`. Finalmente, forzamos nuestra "
"dependencia de `frotz` si se constata que no se está ejecutando. "
"`force_depend` emitirá un mensaje de aviso porque se debería invocar sólo si "
"se ha detectado una mala configuración."

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:724
#, no-wrap
msgid "Giving more flexibility to an rc.d script"
msgstr "Dar más flexibilidad a un script rc.d"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:733
msgid ""
"When invoked during startup or shutdown, an [.filename]#rc.d# script is "
"supposed to act on the entire subsystem it is responsible for.  E.g., [."
"filename]#/etc/rc.d/netif# should start or stop all network interfaces "
"described by man:rc.conf[5].  Either task can be uniquely indicated by a "
"single command argument such as `start` or `stop`.  Between startup and "
"shutdown, [.filename]#rc.d# scripts help the admin to control the running "
"system, and it is when the need for more flexibility and precision arises.  "
"For instance, the admin may want to add the settings of a new network "
"interface to man:rc.conf[5] and then to start it without interfering with "
"the operation of the existing interfaces.  Next time the admin may need to "
"shut down a single network interface.  In the spirit of the command line, "
"the respective [.filename]#rc.d# script calls for an extra argument, the "
"interface name."
msgstr ""
"Cuando se invoca durante el arranque o la parada, un script [.filename]#rc.d#"
" se supone que actúa en todo el subsistema del que es responsable. Por "
"ejemplo,  [.filename]#/etc/rc.d/netif# debería arrancar o parar todas las "
"interfaces de red descritas en man:rc.conf[5]. Se puede indicar cualquiera "
"de los dos comandos utilizando un argumento como `start` o `stop`. Entre el "
"arranque y la parada, los scripts [.filename]#rc.d# ayudan al administrador "
"a controlar el sistema en ejecución, y es cuando surge la necesidad de mayor "
"flexibilidad y precisión. Por ejemplo, el administrador podría querer añadir "
"la configuración de una nueva interfaz de red a man:rc.conf[5] y luego "
"arrancarla sin interferir con la operación de las interfaces existentes. La "
"siguiente vez el administrador podría necesitar parar una interfaz de red "
"concreta. Siguiendo el espíritu de la línea de comandos, el script "
"respectivo de [.filename]#rc.d# necesita un argumento extra, el nombre de la "
"interfaz."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:736
msgid ""
"Fortunately, man:rc.subr[8] allows for passing any number of arguments to "
"script's methods (within the system limits).  Due to that, the changes in "
"the script itself can be minimal."
msgstr ""
"Afortunadamente, man:rc.subr[8] permite pasar un número arbitrario de "
"argumentos a los métodos del script (dentro de los límites del sistema). "
"Debido a esto, los cambios en el script pueden ser mínimos."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:741
msgid ""
"How can man:rc.subr[8] gain access to the extra command-line arguments.  "
"Should it just grab them directly? Not by any means.  Firstly, an man:sh[1] "
"function has no access to the positional parameters of its caller, but man:"
"rc.subr[8] is just a sack of such functions.  Secondly, the good manner of [."
"filename]#rc.d# dictates that it is for the main script to decide which "
"arguments are to be passed to its methods."
msgstr ""
"¿Cómo puede man:rc.subr[8] obtener acceso a los argumentos extra de la línea "
"de comando? ¿Debería simplemente obtenerlos? De ningún modo. Primero, una "
"función de man:sh[1] no tiene acceso a los parámetros posicionales del "
"llamante, pero man:rc.subr[8] es simplemente una pila de dichas funciones. "
"Segundo, las buenas maneras de [.filename]#rc.d# dictan que es el script "
"principal el encargado de decidir qué argumentos se pasan a sus métodos."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:745
msgid ""
"So the approach adopted by man:rc.subr[8] is as follows: `run_rc_command` "
"passes on all its arguments but the first one to the respective method "
"verbatim.  The first, omitted, argument is the name of the method itself: "
"`start`, `stop`, etc.  It will be shifted out by `run_rc_command`, so what "
"is `$2` in the original command line will be presented as `$1` to the "
"method, and so on."
msgstr ""
"De modo que la aproximación de man:rc.subr[8] es como sigue: `run_rc_command`"
" pasa todos sus argumentos salvo el primero de forma literal al método "
"respectivo. El primer argumento, omitido, es el nombre del método en sí: "
"`start`, `stop`, etc. `run_rc_commad` lo desplazará de forma que lo que es "
"`$2` en la línea de comandos original se presentará como `$1` al método y "
"así sucesivamente."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:748
msgid ""
"To illustrate this opportunity, let us modify the primitive dummy script so "
"that its messages depend on the additional arguments supplied.  Here we go:"
msgstr ""
"Para ilustrar esta oportunidad, modifiquemos el script ficticio primitivo "
"para que sus mensajes dependan de los argumentos adicionales proporcionados. "
"Aquí vamos:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:760
#, no-wrap
msgid ""
"name=\"dummy\"\n"
"start_cmd=\"${name}_start\"\n"
"stop_cmd=\":\"\n"
"kiss_cmd=\"${name}_kiss\"\n"
"extra_commands=\"kiss\"\n"
msgstr ""
"name=\"dummy\"\n"
"start_cmd=\"${name}_start\"\n"
"stop_cmd=\":\"\n"
"kiss_cmd=\"${name}_kiss\"\n"
"extra_commands=\"kiss\"\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:769
#, no-wrap
msgid ""
"dummy_start()\n"
"{\n"
"        if [ $# -gt 0 ]; then <.>\n"
"                echo \"Greeting message: $*\"\n"
"        else\n"
"                echo \"Nothing started.\"\n"
"        fi\n"
"}\n"
msgstr ""
"dummy_start()\n"
"{\n"
"        if [ $# -gt 0 ]; then <.>\n"
"                echo \"Greeting message: $*\"\n"
"        else\n"
"                echo \"Nothing started.\"\n"
"        fi\n"
"}\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:785
#, no-wrap
msgid ""
"dummy_kiss()\n"
"{\n"
"        echo -n \"A ghost gives you a kiss\"\n"
"        if [ $# -gt 0 ]; then <.>\n"
"                echo -n \" and whispers: $*\"\n"
"        fi\n"
"        case \"$*\" in\n"
"        *[.!?])\n"
"                echo\n"
"                ;;\n"
"        *)\n"
"                echo .\n"
"                ;;\n"
"        esac\n"
"}\n"
msgstr ""
"dummy_kiss()\n"
"{\n"
"        echo -n \"A ghost gives you a kiss\"\n"
"        if [ $# -gt 0 ]; then <.>\n"
"                echo -n \" and whispers: $*\"\n"
"        fi\n"
"        case \"$*\" in\n"
"        *[.!?])\n"
"                echo\n"
"                ;;\n"
"        *)\n"
"                echo .\n"
"                ;;\n"
"        esac\n"
"}\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:788
#, no-wrap
msgid ""
"load_rc_config $name\n"
"run_rc_command \"$@\" <.>\n"
msgstr ""
"load_rc_config $name\n"
"run_rc_command \"$@\" <.>\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:791
msgid "What essential changes can we notice in the script?"
msgstr "¿Qué cambios esenciales podemos notar en el script?"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:796
msgid ""
"&#10122; All arguments you type after `start` can end up as positional "
"parameters to the respective method.  We can use them in any way according "
"to our task, skills, and fancy.  In the current example, we just pass all of "
"them to man:echo[1] as one string in the next line - note `$*` within the "
"double quotes.  Here is how the script can be invoked now:"
msgstr ""
"&#10122; Todos los argumentos que escribas después de `start` terminan como "
"parámetros posicionales en el método respectivo. Podemos utilizarlos de "
"cualquier forma de acuerdo con nuestra tarea, habilidades e imaginación. En "
"el ejemplo actual, simplemente los pasamos todos a man:echo[1] como una "
"cadena en la siguiente línea - fíjate en `$*` dentro de las comillas dobles. "
"Aquí se ve cómo se puede invocar ahora el script:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:801
#, no-wrap
msgid ""
"# /etc/rc.d/dummy start\n"
"Nothing started.\n"
msgstr ""
"# /etc/rc.d/dummy start\n"
"Nothing started.\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:804
#, no-wrap
msgid ""
"# /etc/rc.d/dummy start Hello world!\n"
"Greeting message: Hello world!\n"
msgstr ""
"# /etc/rc.d/dummy start Hello world!\n"
"Greeting message: Hello world!\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:808
msgid ""
"&#10123; The same applies to any method our script provides, not only to a "
"standard one.  We have added a custom method named `kiss`, and it can take "
"advantage of the extra arguments not less than `start` does. E.g.:"
msgstr ""
"&#10123; Lo mismo aplica a cualquier método proporcionado por nuestro "
"script, no sólo a los estándar. Hemos añadido un método personalizado "
"llamado `kiss` y puede aprovecharse de los argumentos extra del mismo modo "
"que lo hace `start`. Ejemplo:"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:813
#, no-wrap
msgid ""
"# /etc/rc.d/dummy kiss\n"
"A ghost gives you a kiss.\n"
msgstr ""
"# /etc/rc.d/dummy kiss\n"
"A ghost gives you a kiss.\n"

#. type: delimited block . 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:816
#, no-wrap
msgid ""
"# /etc/rc.d/dummy kiss Once I was Etaoin Shrdlu...\n"
"A ghost gives you a kiss and whispers: Once I was Etaoin Shrdlu...\n"
msgstr ""
"# /etc/rc.d/dummy kiss Once I was Etaoin Shrdlu...\n"
"A ghost gives you a kiss and whispers: Once I was Etaoin Shrdlu...\n"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:819
msgid ""
"&#10124; If we want just to pass all extra arguments to any method, we can "
"merely substitute `\"$@\"` for `\"$1\"` in the last line of our script, "
"where we invoke `run_rc_command`."
msgstr ""
"&#10124; Si queremos pasar todos los argumentos extra a cualquier método, "
"podemos simplemente sustituir `\"$@\"` por `\"$1\"` en la última línea de "
"nuestro script, cuando invocamos `run_rc_command`."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:825
msgid ""
"An man:sh[1] programmer ought to understand the subtle difference between `"
"$*` and `$@` as the ways to designate all positional parameters.  For its in-"
"depth discussion, refer to a good handbook on man:sh[1] scripting.  _Do not_ "
"use the expressions until you fully understand them because their misuse "
"will result in buggy and insecure scripts."
msgstr ""
"Un programador de man:sh[1] tiene que entender la sutil diferencia entre `$*`"
" y `$@` como formas de designar todos los parámetros posicionales. Para una "
"discusión en profundidad, consulta un buen manual de script de man:sh[1]. "
"_No_ uses las expresiones hasta que las entiendas completamente porque un "
"uso inadecuado puede resultar en scripts defectuosos e inseguros."

#. type: delimited block = 4
#: documentation/content/en/articles/rc-scripting/_index.adoc:832
msgid ""
"Currently `run_rc_command` may have a bug that prevents it from keeping the "
"original boundaries between arguments.  That is, arguments with embedded "
"whitespace may not be processed correctly.  The bug stems from `$*` misuse."
msgstr ""
"Actualmente `run_rc_command` podría tener un bug que impide que mantenga los "
"límites originales entre los argumentos. Es decir, los argumentos con "
"espacios en blanco podrían no procesarse correctamente. El bug nace de un "
"uso inadecuado de `$*`."

#. type: Title ==
#: documentation/content/en/articles/rc-scripting/_index.adoc:835
#, no-wrap
msgid "Further reading"
msgstr "Otras lecturas"

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:839
msgid ""
"[[lukem]]http://www.mewburn.net/luke/papers/rc.d.pdf[The original article by "
"Luke Mewburn] offers a general overview of [.filename]#rc.d# and detailed "
"rationale for its design decisions.  It provides insight on the whole [."
"filename]#rc.d# framework and its place in a modern BSD operating system."
msgstr ""
"[[lukem]]http://www.mewburn.net/luke/papers/rc.d.pdf[El artículo original de "
"Luke Mewburn] ofrece una visión general de [.filename]#rc.d# y una "
"explicación detallada de las decisiones de diseño. Proporciona información "
"sobre todo el framework de [.filename]#rc.d# y su lugar de un sistema "
"operativo BSD moderno."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:842
msgid ""
"[[manpages]]The manual pages man:rc[8], man:rc.subr[8], and man:rcorder[8] "
"document the [.filename]#rc.d# components in great detail.  You cannot fully "
"use the [.filename]#rc.d# power without studying the manual pages and "
"referring to them while writing your own scripts."
msgstr ""
"[[manpages]] Las páginas del manual de man:rc[8], man:rc.subr[8], y "
"man:rcorder[8] documentan los componentes de [.filename]#rc.d# en gran "
"detalle. No puedes usar toda la potencia de [.filename]#rc.d# sin estudiar "
"las páginas del manual y hacer referencia a ellas mientras escribes tus "
"propios scripts."

#. type: Plain text
#: documentation/content/en/articles/rc-scripting/_index.adoc:846
msgid ""
"The major source of working, real-life examples is [.filename]#/etc/rc.d# in "
"a live system.  Its contents are easy and pleasant to read because most "
"rough corners are hidden deep in man:rc.subr[8].  Keep in mind though that "
"the [.filename]#/etc/rc.d# scripts were not written by angels, so they might "
"suffer from bugs and suboptimal design decisions.  Now you can improve them!"
msgstr ""
"La mayor fuente de ejemplos de la vida real en funcionamiento es [."
"filename]#/etc/rc.d# en un sistema real. Su contenido es fácil y agradable "
"de leer porque la mayoría de los asuntos espinosos están escondidos en man:rc"
".subr[8]. De cualquier forma ten en cuenta que los scripts de [.filename]#/"
"etc/rc.d# no han sido escritos por los ángeles, así que podrían tener bugs y "
"decisiones de diseño subóptimas. ¡Ahora puedes mejorarlos!"

#~ msgid ""
#~ "include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/"
#~ "{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists."
#~ "adoc[] include::shared/{{% lang %}}/urls.adoc[]"
#~ msgstr ""
#~ "include::shared/attributes/attributes-{{% lang %}}.adoc[]\n"
#~ "include::shared/{{% lang %}}/teams.adoc[]\n"
#~ "include::shared/{{% lang %}}/mailing-lists.adoc[]\n"
#~ "include::shared/{{% lang %}}/urls.adoc[]"