diff options
Diffstat (limited to 'documentation/content/ru/articles/rc-scripting/_index.po')
| -rw-r--r-- | documentation/content/ru/articles/rc-scripting/_index.po | 515 |
1 files changed, 257 insertions, 258 deletions
diff --git a/documentation/content/ru/articles/rc-scripting/_index.po b/documentation/content/ru/articles/rc-scripting/_index.po index eb6e3fab38..38632d1c84 100644 --- a/documentation/content/ru/articles/rc-scripting/_index.po +++ b/documentation/content/ru/articles/rc-scripting/_index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2025-10-20 11:17+0300\n" -"PO-Revision-Date: 2025-09-27 04:45+0000\n" +"POT-Creation-Date: 2024-09-14 15:00-0300\n" +"PO-Revision-Date: 2025-10-29 04:45+0000\n" "Last-Translator: Vladlen Popolitov <vladlenpopolitov@list.ru>\n" "Language-Team: Russian <https://translate-dev.freebsd.org/projects/" "documentation/articlesrc-scripting_index/ru/>\n" @@ -18,11 +18,12 @@ msgstr "" "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" -#. type: Yaml Front Matter Hash Value: description +#. 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 "Руководство по написанию новых rc.d-скриптов и пониманию уже существующих" +msgstr "" +"Руководство по написанию новых rc.d-скриптов и пониманию уже существующих" #. type: Title = #: documentation/content/en/articles/rc-scripting/_index.adoc:1 @@ -31,12 +32,12 @@ msgstr "Руководство по написанию новых rc.d-скри msgid "Practical rc.d scripting in BSD" msgstr "Практическое руководство по написанию rc.d скриптов в BSD" -#. type: .abstract-title +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:45 msgid "Abstract" msgstr "Аннотация" -#. type: .abstract-title +#. 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 " @@ -50,12 +51,12 @@ msgstr "" "Новичкам может быть сложно соотнести факты из официальной документации по " "фреймворку [.filename]#rc.d# в BSD с практическими задачами написания " "скриптов для [.filename]#rc.d#. В этой статье мы рассмотрим несколько " -"типичных случаев возрастающей сложности, покажем возможности " -"[.filename]#rc.d#, подходящие для каждого случая, и обсудим, как они " -"работают. Такое рассмотрение должно дать ориентиры для дальнейшего изучения " -"устройства и эффективного применения [.filename]#rc.d#." +"типичных случаев возрастающей сложности, покажем возможности [.filename]#rc." +"d#, подходящие для каждого случая, и обсудим, как они работают. Такое " +"рассмотрение должно дать ориентиры для дальнейшего изучения устройства и " +"эффективного применения [.filename]#rc.d#." -#. type: .abstract-title +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:51 msgid "'''" msgstr "'''" @@ -66,7 +67,7 @@ msgstr "'''" msgid "Introduction" msgstr "Введение" -#. type: .abstract-title +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:61 msgid "" "The historical BSD had a monolithic startup script, [.filename]#/etc/rc#. " @@ -82,10 +83,10 @@ msgstr "" "пользовательского пространства, необходимые для многопользовательского " "режима: проверку и монтирование файловых систем, настройку сети, запуск " "демонов и так далее. Точный список задач не был одинаковым в каждой системе; " -"администраторам требовалось его настраивать. За редкими исключениями, " -"[.filename]#/etc/rc# приходилось изменять, и настоящим хакерам это нравилось." +"администраторам требовалось его настраивать. За редкими исключениями, [." +"filename]#/etc/rc# приходилось изменять, и настоящим хакерам это нравилось." -#. type: .abstract-title +#. 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 " @@ -100,8 +101,8 @@ msgid "" "make the system admin's life easier." msgstr "" "Основная проблема монолитного подхода заключалась в том, что он не " -"предоставлял контроля над отдельными компонентами, запускаемыми из " -"[.filename]#/etc/rc#. Например, [.filename]#/etc/rc# не мог перезапустить " +"предоставлял контроля над отдельными компонентами, запускаемыми из [." +"filename]#/etc/rc#. Например, [.filename]#/etc/rc# не мог перезапустить " "отдельный демон. Администратору системы приходилось вручную находить процесс " "демона, завершать его, ждать, пока он действительно завершится, затем искать " "в [.filename]#/etc/rc# нужные флаги и, наконец, вводить полную командную " @@ -111,7 +112,7 @@ msgstr "" "с тем, для чего скрипты вообще предназначены: облегчать жизнь администратору " "системы." -#. type: .abstract-title +#. 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# " @@ -120,27 +121,27 @@ msgid "" "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 " +"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 "" -"Позже была предпринята попытка разделить некоторые части [.filename]#/etc/" -"rc# для возможности отдельного запуска наиболее важных подсистем. Известным " +"Позже была предпринята попытка разделить некоторые части [.filename]#/etc/rc#" +" для возможности отдельного запуска наиболее важных подсистем. Известным " "примером стал [.filename]#/etc/netstart#, предназначенный для настройки " "сети. Это позволяло получить доступ к сети в однопользовательском режиме, но " "плохо интегрировалось в автоматический процесс запуска, так как части его " "кода требовалось переплетаться с действиями, по сути не связанными с сетью. " -"Именно поэтому [.filename]#/etc/netstart# превратился в [.filename]#/etc/" -"rc.network#. Последний больше не был обычным скриптом; он состоял из " -"больших, запутанных функций man:sh[1], вызываемых из [.filename]#/etc/rc# на " -"разных этапах загрузки системы. Однако по мере того, как задачи при запуске " +"Именно поэтому [.filename]#/etc/netstart# превратился в [.filename]#/etc/rc." +"network#. Последний больше не был обычным скриптом; он состоял из больших, " +"запутанных функций man:sh[1], вызываемых из [.filename]#/etc/rc# на разных " +"этапах загрузки системы. Однако по мере того, как задачи при запуске " "становились разнообразнее и сложнее, \"квазимодульный\" подход стал ещё " "большей обузой, чем монолитный [.filename]#/etc/rc#." -#. type: .abstract-title +#. 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 " @@ -164,15 +165,15 @@ msgstr "" "Вскоре мы узнаем больше о компонентах системы [.filename]#rc.d# и увидим, " "как вызываются отдельные скрипты." -#. type: .abstract-title +#. 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 " +"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#. " @@ -195,65 +196,65 @@ msgstr "" "переданным в сценарий. Сценарий [.filename]#/etc/rc# по-прежнему управляет " "запуском системы, но теперь он просто вызывает небольшие сценарии один за " "другим с аргументом `start`. Также легко выполнять задачи завершения работы, " -"запуская тот же набор сценариев с аргументом `stop`, что и делает " -"[.filename]#/etc/rc.shutdown#. Обратите внимание, насколько это близко " -"следует Unix-подходу, где используется набор небольших специализированных " +"запуская тот же набор сценариев с аргументом `stop`, что и делает [." +"filename]#/etc/rc.shutdown#. Обратите внимание, насколько это близко следует " +"Unix-подходу, где используется набор небольших специализированных " "инструментов, каждый из которых выполняет свою задачу наилучшим образом. " "_Повторное использование кода_ означает, что общие операции реализованы как " "функции man:sh[1] и собраны в [.filename]#/etc/rc.subr#. Теперь типичный " "сценарий может состоять всего из нескольких строк кода man:sh[1]. Наконец, " "важной частью инфраструктуры [.filename]#rc.d# является man:rcorder[8], " "который помогает [.filename]#/etc/rc# упорядоченно запускать небольшие " -"сценарии с учётом зависимостей между ними. Он также может помочь " -"[.filename]#/etc/rc.shutdown#, поскольку правильный порядок завершения " -"работы противоположен порядку запуска." +"сценарии с учётом зависимостей между ними. Он также может помочь [." +"filename]#/etc/rc.shutdown#, поскольку правильный порядок завершения работы " +"противоположен порядку запуска." -#. type: .abstract-title +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:101 msgid "" "The BSD [.filename]#rc.d# design is described in crossref:rc-" -"scripting[lukem, the original article by Luke Mewburn], and the " -"[.filename]#rc.d# components are documented in great detail in crossref:rc-" +"scripting[lukem, the original article by Luke Mewburn], and the [." +"filename]#rc.d# components are documented in great detail in crossref:rc-" "scripting[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 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." +"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 "" "Дизайн BSD [.filename]#rc.d# описан в crossref:rc-scripting[lukem, " "оригинальной статье Люка Мьюберна], а компоненты [.filename]#rc.d# подробно " -"документированы в crossref:rc-scripting[manpages, соответствующих " -"руководствах]. Однако новичку в [.filename]#rc.d# может быть неочевидно, как " +"документированы в crossref:rc-scripting[manpages, соответствующих страницах " +"Справочника]. Однако новичку в [.filename]#rc.d# может быть неочевидно, как " "связать многочисленные элементы вместе, чтобы создать хорошо " "структурированный скрипт для конкретной задачи. Поэтому в этой статье будет " "предпринята попытка описать [.filename]#rc.d# с другого ракурса. В ней будет " "показано, какие функции следует использовать в ряде типичных случаев и " -"почему. Обратите внимание, что это не руководство, поскольку наша цель — не " -"предоставление готовых рецептов, а демонстрация нескольких простых способов " -"входа в мир [.filename]#rc.d#. Также эта статья не заменяет соответствующие " -"руководства. Не стесняйтесь обращаться к ним для получения более формальной " -"и полной документации во время чтения этой статьи." +"почему. Обратите внимание, что это не руководство HowTo, поскольку наша цель " +"— не предоставление готовых рецептов, а демонстрация нескольких простых " +"способов входа в мир [.filename]#rc.d#. Также эта статья не заменяет " +"соответствующие страниц Справочника. Не стесняйтесь обращаться к ним для " +"получения более формальной и полной документации во время чтения этой статьи." -#. type: .abstract-title +#. 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 to master " -"[.filename]#rc.d#. In addition, you should know how the system performs " +"should be familiar with the man:sh[1] scripting language 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 "" "Для понимания этой статьи есть предварительные требования. Прежде всего, вы " -"должны быть знакомы с языком написания сценариев man:sh[1], чтобы освоить " -"[.filename]#rc.d#. Кроме того, вы должны знать, как система выполняет задачи " +"должны быть знакомы с языком написания сценариев man:sh[1], чтобы освоить [." +"filename]#rc.d#. Кроме того, вы должны знать, как система выполняет задачи " "запуска и завершения работы пользовательского пространства, что описано в " "man:rc[8]." -#. type: .abstract-title +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:108 msgid "" "This article focuses on the FreeBSD branch of [.filename]#rc.d#. " @@ -262,9 +263,9 @@ msgid "" "stay similar in their aspects visible to script authors." msgstr "" "Эта статья посвящена ветке FreeBSD в [.filename]#rc.d#. Тем не менее, она " -"может быть полезна и разработчикам NetBSD, потому что две ветки BSD " -"[.filename]#rc.d# не только разделяют одинаковый дизайн, но и остаются " -"схожими в аспектах, видимых авторам скриптов." +"может быть полезна и разработчикам NetBSD, потому что две ветки BSD [." +"filename]#rc.d# не только разделяют одинаковый дизайн, но и остаются схожими " +"в аспектах, видимых авторам скриптов." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:110 @@ -272,7 +273,7 @@ msgstr "" msgid "Outlining the task" msgstr "Обрисовка задачи" -#. type: .abstract-title +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:114 msgid "" "A little consideration before starting `$EDITOR` will not hurt. To write a " @@ -283,12 +284,12 @@ msgstr "" "хорошо продуманный скрипт [.filename]#rc.d# для системной службы, сначала " "нужно ответить на следующие вопросы:" -#. type: .abstract-title +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:116 msgid "Is the service mandatory or optional?" msgstr "Является ли служба обязательной или опциональной?" -#. type: .abstract-title +#. 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 " @@ -297,12 +298,12 @@ msgstr "" "Будет ли скрипт обслуживать одну программу, например, демон, или выполнять " "более сложные действия?" -#. type: .abstract-title +#. 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 "От каких других служб зависит наша служба, и наоборот?" -#. type: .abstract-title +#. 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 " @@ -316,7 +317,7 @@ msgstr "" msgid "A dummy script" msgstr "Примитивный скрипт" -#. type: .abstract-title +#. 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:" @@ -477,9 +478,9 @@ msgid "" "script _must_ set `name` before it calls man:rc.subr[8] functions." msgstr "" "➌ [[name-var]]Обязательная переменная `name` определяет имя нашего " -"скрипта. Она требуется man:rc.subr[8]. То есть, каждый скрипт в " -"[.filename]#rc.d# _должен_ установить `name` перед вызовом функций " -"man:rc.subr[8]." +"скрипта. Она требуется man:rc.subr[8]. То есть, каждый скрипт в [." +"filename]#rc.d# _должен_ установить `name` перед вызовом функций man:rc." +"subr[8]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:191 @@ -528,23 +529,23 @@ msgid "" "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 "" -"➍ Основная идея man:rc.subr[8] заключается в том, что скрипт " -"[.filename]#rc.d# предоставляет обработчики (или методы) для вызова " -"man:rc.subr[8]. В частности, аргументы `start`, `stop` и другие, " -"передаваемые в скрипт [.filename]#rc.d#, обрабатываются таким образом. Метод " -"представляет собой выражение man:sh[1], сохранённое в переменной с именем " -"`argument_cmd`, где _argument_ соответствует тому, что может быть указано в " -"командной строке скрипта. Далее мы увидим, как man:rc.subr[8] предоставляет " -"стандартные методы для типовых аргументов." +"specified on the script's command line. We will see later how man:rc." +"subr[8] provides default methods for the standard arguments." +msgstr "" +"➍ Основная идея man:rc.subr[8] заключается в том, что скрипт [." +"filename]#rc.d# предоставляет обработчики (или методы) для вызова man:rc." +"subr[8]. В частности, аргументы `start`, `stop` и другие, передаваемые в " +"скрипт [.filename]#rc.d#, обрабатываются таким образом. Метод представляет " +"собой выражение man:sh[1], сохранённое в переменной с именем `argument_cmd`, " +"где _argument_ соответствует тому, что может быть указано в командной строке " +"скрипта. Далее мы увидим, как man:rc.subr[8] предоставляет стандартные " +"методы для типовых аргументов." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:209 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 " +"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 "" "Чтобы сделать код в [.filename]#rc.d# более единообразным, обычно используют " @@ -587,14 +588,14 @@ msgstr "" #: documentation/content/en/articles/rc-scripting/_index.adoc:224 msgid "" "➐ 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." +"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 "" "➐ Этот вызов man:rc.subr[8] загружает переменные man:rc.conf[5]. Наш " -"скрипт пока их не использует, но всё равно рекомендуется загружать " -"man:rc.conf[5], потому что могут быть переменные man:rc.conf[5], управляющие " -"самим man:rc.subr[8]." +"скрипт пока их не использует, но всё равно рекомендуется загружать man:rc." +"conf[5], потому что могут быть переменные man:rc.conf[5], управляющие самим " +"man:rc.subr[8]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:227 @@ -616,8 +617,8 @@ msgstr "Настраиваемый фиктивный скрипт" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:239 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, " +"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 " @@ -627,15 +628,14 @@ msgid "" "will do both things in the same script though:" msgstr "" "Теперь добавим некоторые элементы управления в наш тестовый скрипт. Как вам " -"может быть известно, скрипты [.filename]#rc.d# управляются с помощью " -"man:rc.conf[5]. К счастью, man:rc.subr[8] скрывает от нас все сложности. " -"Следующий скрипт использует man:rc.conf[5] через man:rc.subr[8], чтобы " -"проверить, включен ли он вообще, и получить сообщение для отображения во " -"время загрузки. Эти две задачи на самом деле независимы. С одной стороны, " -"скрипт [.filename]#rc.d# может просто поддерживать включение и выключение " -"своего сервиса. С другой стороны, обязательный скрипт [.filename]#rc.d# " -"может иметь переменные конфигурации. Однако мы реализуем обе возможности в " -"одном скрипте:" +"может быть известно, скрипты [.filename]#rc.d# управляются с помощью man:rc." +"conf[5]. К счастью, man:rc.subr[8] скрывает от нас все сложности. Следующий " +"скрипт использует man:rc.conf[5] через man:rc.subr[8], чтобы проверить, " +"включен ли он вообще, и получить сообщение для отображения во время " +"загрузки. Эти две задачи на самом деле независимы. С одной стороны, скрипт [." +"filename]#rc.d# может просто поддерживать включение и выключение своего " +"сервиса. С другой стороны, обязательный скрипт [.filename]#rc.d# может иметь " +"переменные конфигурации. Однако мы реализуем обе возможности в одном скрипте:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:243 @@ -766,8 +766,8 @@ msgid "" "knob. The canonical approach to the latter case is shown in the example." msgstr "" "➌ `run_rc_command` выдаст предупреждение, если переменная `rcvar` " -"установлена, но указанная переменная-флаг не задана. Если ваш скрипт " -"[.filename]#rc.d# предназначен для базовой системы, вы должны добавить " +"установлена, но указанная переменная-флаг не задана. Если ваш скрипт [." +"filename]#rc.d# предназначен для базовой системы, вы должны добавить " "значение по умолчанию для флага в [.filename]#/etc/defaults/rc.conf# и " "задокументировать его в man:rc.conf[5]. В противном случае ваш скрипт должен " "предоставить значение по умолчанию для флага. Канонический подход для " @@ -807,11 +807,11 @@ msgid "" "control an [.filename]#rc.d# script." msgstr "" "➍ Теперь сообщение, отображаемое при загрузке, больше не жестко " -"закодировано в скрипте. Оно задается переменной `dummy_msg` в " -"man:rc.conf[5]. Это простой пример того, как переменные man:rc.conf[5] могут " -"управлять скриптом в [.filename]#rc.d#." +"закодировано в скрипте. Оно задается переменной `dummy_msg` в man:rc.conf[5]" +". Это простой пример того, как переменные man:rc.conf[5] могут управлять " +"скриптом в [.filename]#rc.d#." -#. type: delimited block = 4 +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:304 msgid "" "The names of all man:rc.conf[5] variables used exclusively by our script " @@ -822,7 +822,7 @@ msgstr "" "скриптом, _должны_ иметь один и тот же префикс: `${name}_`. Например: " "`dummy_mode`, `dummy_state_file` и так далее." -#. type: delimited block = 4 +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:309 msgid "" "While it is possible to use a shorter name internally, e.g., just `msg`, " @@ -835,13 +835,13 @@ msgstr "" "вводимым нашим скриптом, избавит нас от возможных конфликтов с пространством " "имен man:rc.subr[8]." -#. type: delimited block = 4 +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:312 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 " +"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 "" "Как правило, скрипты [.filename]#rc.d# базовой системы не должны " @@ -850,7 +850,7 @@ msgstr "" "defaults/rc.conf#. С другой стороны, скрипты [.filename]#rc.d# для портов " "должны предоставлять значения по умолчанию, как показано в примере." -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:316 msgid "" "➎ Here we use `dummy_msg` to actually control our script, i.e., to " @@ -1006,12 +1006,12 @@ msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:378 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." +"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 "" "Конечно, man:sh[1] позволяет установить `${name}_program` из man:rc.conf[5] " "или самого скрипта, даже если `command` не задан. В этом случае специальные " @@ -1067,7 +1067,8 @@ msgstr "pidfile=\"/var/run/${name}.pid\" <.>\n" #: documentation/content/en/articles/rc-scripting/_index.adoc:404 #, 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" +msgstr "" +"required_files=\"/etc/${name}.conf /usr/share/misc/${name}.rules\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:406 @@ -1171,10 +1172,10 @@ msgid "" "`command_args`." msgstr "" "➊ Дополнительные аргументы для `$command` могут быть переданы в " -"`command_args`. Они будут добавлены в командную строку после " -"`$mumbled_flags`. Поскольку итоговая командная строка передаётся в `eval` " -"для фактического выполнения, перенаправления ввода и вывода могут быть " -"указаны в `command_args`." +"`command_args`. Они будут добавлены в командную строку после `$mumbled_flags`" +". Поскольку итоговая командная строка передаётся в `eval` для фактического " +"выполнения, перенаправления ввода и вывода могут быть указаны в " +"`command_args`." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:455 @@ -1192,9 +1193,9 @@ msgstr "" "командной строки, поэтому, скорее всего, окажется после аргументов, " "указанных в `${name}_flags`; однако большинство команд не распознают " "параметры с дефисами после обычных аргументов. Лучший способ передать " -"дополнительные параметры в `$command` — добавить их в начало `${name}" -"_flags`. Другой способ — изменить `rc_flags` crossref:rc-scripting[rc-flags, " -"как показано далее]." +"дополнительные параметры в `$command` — добавить их в начало `${name}_flags`" +". Другой способ — изменить `rc_flags` crossref:rc-scripting[rc-flags, как " +"показано далее]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:459 @@ -1312,9 +1313,9 @@ msgid "" "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 "" -"Не забывайте, что вы можете вставлять любые допустимые выражения из " -"man:sh[1] в определяемые вами методы, а также команды pre- и post-. Просто " -"вызывать функцию, которая выполняет основную работу, — это хороший стиль в " +"Не забывайте, что вы можете вставлять любые допустимые выражения из man:sh[1]" +" в определяемые вами методы, а также команды pre- и post-. Просто вызывать " +"функцию, которая выполняет основную работу, — это хороший стиль в " "большинстве случаев, но никогда не позволяйте стилю ограничивать ваше " "понимание того, что происходит за кулисами." @@ -1404,7 +1405,8 @@ msgid "" "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" +"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:537 @@ -1414,8 +1416,8 @@ msgid "" "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." +"proper way for a script to run its own command is by means of man:rc." +"subr[8], as shown in the example." msgstr "" "⓭ Скрипт может вызывать свои собственные стандартные или нестандартные " "команды, если это необходимо. Это может выглядеть похоже на вызов функций, " @@ -1440,9 +1442,9 @@ msgstr "" "принимает имя переменной в качестве аргумента и возвращает нулевой код " "выхода только если переменная установлена в `YES`, `TRUE`, `ON` или `1`, без " "учёта регистра; в противном случае возвращается ненулевой код выхода. В " -"последнем случае функция проверяет, установлена ли переменная в `NO`, " -"`FALSE`, `OFF` или `0`, также без учёта регистра; если переменная содержит " -"что-то иное (т.е. мусор), функция выводит предупреждение." +"последнем случае функция проверяет, установлена ли переменная в `NO`, `FALSE`" +", `OFF` или `0`, также без учёта регистра; если переменная содержит что-то " +"иное (т.е. мусор), функция выводит предупреждение." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:545 @@ -1535,7 +1537,7 @@ msgstr "" "выхода, основной метод не будет выполнен. В свою очередь, `argument_postcmd` " "не будет вызван, если основной метод возвращает ненулевой код выхода." -#. type: delimited block = 4 +#. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:584 msgid "" "However, man:rc.subr[8] can be instructed from the command line to ignore " @@ -1552,32 +1554,30 @@ msgstr "" msgid "Connecting a script to the rc.d framework" msgstr "Подключение скрипта к инфраструктуре rc.d" -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:594 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]." +"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 "" "После написания скрипта его необходимо интегрировать в [.filename]#rc.d#. " "Ключевой шаг — установка скрипта в [.filename]#/etc/rc.d# (для базовой " -"системы) или [.filename]#/usr/local/etc/rc.d# (для портов). И " -"[.filename]#bsd.prog.mk#, и [.filename]#bsd.port.mk# предоставляют удобные " -"механизмы для этого, и обычно вам не нужно беспокоиться о правильных правах " -"доступа и режиме. Системные скрипты должны устанавливаться из " -"[.filename]#src/libexec/rc/rc.d# через [.filename]#Makefile#, находящийся " -"там. Скрипты портов можно установить с помощью `USE_RC_SUBR`, как описано " -"extref:{porters-handbook}special/[в Руководстве FreeBSD по созданию портов, " -"rc-скрипты]." +"системы) или [.filename]#/usr/local/etc/rc.d# (для портов). И [.filename]#bsd" +".prog.mk#, и [.filename]#bsd.port.mk# предоставляют удобные механизмы для " +"этого, и обычно вам не нужно беспокоиться о правильных правах доступа и " +"режиме. Системные скрипты должны устанавливаться из [.filename]#src/libexec/" +"rc/rc.d# через [.filename]#Makefile#, находящийся там. Скрипты портов можно " +"установить с помощью `USE_RC_SUBR`, как описано extref:{porters-handbook}" +"special/[в Руководстве FreeBSD по созданию портов, rc-скрипты]." -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:599 msgid "" "However, we should consider beforehand the place of our script in the system " @@ -1594,7 +1594,7 @@ msgstr "" "не требует, он вряд ли сможет запуститься до проверки и монтирования " "основных файловых систем." -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:605 msgid "" "We mentioned man:rcorder[8] already. Now it is time to have a close look at " @@ -1611,7 +1611,7 @@ msgstr "" "зависимостях _внутри_ файлов, чтобы каждый файл мог описывать только себя. " "Файл может содержать следующую информацию:" -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:607 msgid "" "the names of the \"conditions\" (which means services to us) it __provides__;" @@ -1619,17 +1619,17 @@ msgstr "" "имена \"условий\" (что для нас означает сервисы), которые он " "__предоставляет__;" -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:608 msgid "the names of the \"conditions\" it __requires__;" msgstr "имена \"условий\", которые он __требует__;" -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:609 msgid "the names of the \"conditions\" this file should run __before__;" msgstr "имена \"условий\", перед которыми должен выполняться этот файл;" -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:610 msgid "" "additional _keywords_ that can be used to select a subset from the whole set " @@ -1641,13 +1641,13 @@ msgstr "" "помощью опций для включения или исключения файлов, содержащих указанные " "ключевые слова.)" -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:615 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 " +"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 "" "Неудивительно, что man:rcorder[8] может обрабатывать только текстовые файлы " @@ -1656,7 +1656,7 @@ msgstr "" "специальных строк довольно жёсткий, чтобы упростить их обработку. " "Подробности см. в man:rcorder[8]." -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:618 msgid "" "Besides using man:rcorder[8] special lines, a script can insist on its " @@ -1670,7 +1670,7 @@ msgstr "" "опциональной и не запускается самостоятельно, потому что системный " "администратор ошибочно отключил её в man:rc.conf[5]." -#. type: Plain text +#. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:620 msgid "" "With this general knowledge in mind, let us consider the simple daemon " @@ -1764,26 +1764,26 @@ msgstr "" #: documentation/content/en/articles/rc-scripting/_index.adoc:666 msgid "" "➋➌ 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#." +"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 "" "➋➌ Таким образом, наш скрипт указывает, от каких \"условий\", " "предоставляемых другими скриптами, он зависит. Согласно строкам, наш скрипт " -"просит man:rcorder[8] разместить его после скрипта(ов), предоставляющих " -"[.filename]#DAEMON# и [.filename]#cleanvar#, но перед тем, который " +"просит man:rcorder[8] разместить его после скрипта(ов), предоставляющих [." +"filename]#DAEMON# и [.filename]#cleanvar#, но перед тем, который " "предоставляет [.filename]#LOGIN#." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:672 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." +"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 "" "Строку `BEFORE:` не следует использовать для обхода неполного списка " "зависимостей в другом скрипте. Правильный случай для использования `BEFORE:` " @@ -1798,26 +1798,25 @@ msgstr "" 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]." +"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 "" "Помимо условий, соответствующих отдельным службам, существуют метаусловия и " "их \"заглушки\" скриптов, используемые для обеспечения выполнения " -"определённых групп операций в заданном порядке. Они обозначаются именами в " -"[.filename]#ВЕРХНЕМ РЕГИСТРЕ#. Их список и назначение можно найти в " -"man:rc[8]." +"определённых групп операций в заданном порядке. Они обозначаются именами в [." +"filename]#ВЕРХНЕМ РЕГИСТРЕ#. Их список и назначение можно найти в man:rc[8]." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:682 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 crossref:rc-" +"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 crossref:rc-" "scripting[forcedep, below]" msgstr "" "Имейте в виду, что указание имени службы в строке `REQUIRE:` не гарантирует, " @@ -1826,19 +1825,19 @@ msgstr "" "Очевидно, man:rcorder[8] не может отслеживать такие детали, и man:rc[8] тоже " "этого не делает. Следовательно, приложение, запускаемое нашим скриптом, " "должно быть способно обрабатывать ситуации, когда требуемые службы " -"недоступны. В некоторых случаях мы можем помочь ему, как описано в " -"crossref:rc-scripting[forcedep, ниже]" +"недоступны. В некоторых случаях мы можем помочь ему, как описано в crossref" +":rc-scripting[forcedep, ниже]" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:687 msgid "" "[[keywords]]➍ 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." +"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]]➍ Как мы помним из текста выше, ключевые слова " "man:rcorder[8] могут использоваться для выбора или исключения некоторых " @@ -1853,8 +1852,8 @@ msgstr "" #: documentation/content/en/articles/rc-scripting/_index.adoc:690 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:" +"etc/rc.shutdown#. These two scripts define the standard list of FreeBSD [." +"filename]#rc.d# keywords and their meanings as follows:" msgstr "" "В FreeBSD, man:rcorder[8] используется [.filename]#/etc/rc# и [.filename]#/" "etc/rc.shutdown#. Эти два скрипта определяют стандартный список ключевых " @@ -1886,13 +1885,13 @@ msgstr "nostart" #: documentation/content/en/articles/rc-scripting/_index.adoc:697 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 " +"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 "" "Служба должна запускаться вручную или не запускаться вовсе. Процедура " -"автоматического запуска проигнорирует скрипт. В сочетании с ключевым словом " -"[.filename]#shutdown# это может использоваться для написания скриптов, " +"автоматического запуска проигнорирует скрипт. В сочетании с ключевым словом [" +".filename]#shutdown# это может использоваться для написания скриптов, " "выполняющих действия только при выключении системы." #. type: Labeled list @@ -1915,13 +1914,13 @@ msgstr "" 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. " +"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 " @@ -1932,17 +1931,17 @@ msgid "" "special actions to shut down cleanly. A typical example of such a service " "is a database engine." msgstr "" -"Когда система собирается завершить работу, выполняется [.filename]#/etc/" -"rc.shutdown#. Предполагается, что большинству скриптов [.filename]#rc.d# в " -"этот момент нечего делать. Поэтому [.filename]#/etc/rc.shutdown# выборочно " +"Когда система собирается завершить работу, выполняется [.filename]#/etc/rc." +"shutdown#. Предполагается, что большинству скриптов [.filename]#rc.d# в этот " +"момент нечего делать. Поэтому [.filename]#/etc/rc.shutdown# выборочно " "запускает скрипты [.filename]#rc.d# с ключевым словом [.filename]#shutdown#, " "фактически игнорируя остальные скрипты. Для ещё более быстрого завершения " "работы [.filename]#/etc/rc.shutdown# передаёт команду [.filename]#faststop# " "запускаемым скриптам, чтобы они пропускали предварительные проверки, " "например, проверку pid-файла. Поскольку зависимые службы должны быть " "остановлены до своих зависимостей, [.filename]#/etc/rc.shutdown# запускает " -"скрипты в обратном порядке зависимостей. Если вы пишете настоящий скрипт " -"[.filename]#rc.d#, стоит подумать, актуален ли он во время завершения работы " +"скрипты в обратном порядке зависимостей. Если вы пишете настоящий скрипт [." +"filename]#rc.d#, стоит подумать, актуален ли он во время завершения работы " "системы. Например, если ваш скрипт выполняет свою работу только в ответ на " "команду [.filename]#start#, то включать это ключевое слово не нужно. Однако " "если ваш скрипт управляет службой, вероятно, стоит остановить её до того, " @@ -1981,8 +1980,8 @@ msgstr "" "демон, `frotz`, был запущен заранее. Однако `frotz` также является " "опциональным, и man:rcorder[8] ничего не знает о таких деталях. К счастью, " "наш скрипт имеет доступ ко всем переменным man:rc.conf[5]. Если " -"`frotz_enable` имеет значение true, мы надеемся на лучшее и полагаемся на " -"[.filename]#rc.d#, что `frotz` был запущен. В противном случае мы " +"`frotz_enable` имеет значение true, мы надеемся на лучшее и полагаемся на [." +"filename]#rc.d#, что `frotz` был запущен. В противном случае мы " "принудительно проверяем статус `frotz`. Наконец, мы принудительно " "устанавливаем зависимость от `frotz`, если обнаруживаем, что он не запущен. " "`force_depend` выдаст предупреждение, так как его следует вызывать только в " @@ -1998,8 +1997,8 @@ msgstr "Придание большей гибкости скрипту rc.d" #: documentation/content/en/articles/rc-scripting/_index.adoc:736 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 " +"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 " @@ -2012,8 +2011,8 @@ msgid "" "interface name." msgstr "" "При вызове во время запуска или завершения работы скрипт [.filename]#rc.d# " -"должен воздействовать на всю подсистему, за которую он отвечает. Например, " -"[.filename]#/etc/rc.d/netif# должен запускать или останавливать все сетевые " +"должен воздействовать на всю подсистему, за которую он отвечает. Например, [." +"filename]#/etc/rc.d/netif# должен запускать или останавливать все сетевые " "интерфейсы, описанные в man:rc.conf[5]. Любая из этих задач может быть " "однозначно указана единственным аргументом команды, таким как `start` или " "`stop`. Между запуском и завершением работы скрипты [.filename]#rc.d# " @@ -2022,8 +2021,8 @@ msgstr "" "может добавить настройки нового сетевого интерфейса в man:rc.conf[5], а " "затем запустить его, не затрагивая работу существующих интерфейсов. В " "следующий раз администратору может потребоваться остановить отдельный " -"сетевой интерфейс. В духе командной строки, соответствующий скрипт " -"[.filename]#rc.d# требует дополнительного аргумента — имени интерфейса." +"сетевой интерфейс. В духе командной строки, соответствующий скрипт [." +"filename]#rc.d# требует дополнительного аргумента — имени интерфейса." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:739 @@ -2032,18 +2031,18 @@ msgid "" "script's methods (within the system limits). Due to that, the changes in " "the script itself can be minimal." msgstr "" -"К счастью, man:rc.subr[8] позволяет передавать любое количество аргументов " -"(в пределах системных ограничений) методам скрипта. Благодаря этому " -"изменения в самом скрипте могут быть минимальными." +"К счастью, man:rc.subr[8] позволяет передавать любое количество аргументов (" +"в пределах системных ограничений) методам скрипта. Благодаря этому изменения " +"в самом скрипте могут быть минимальными." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:744 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 " +"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 "" "Как man:rc.subr[8] может получить доступ к дополнительным аргументам " @@ -2065,10 +2064,10 @@ msgid "" msgstr "" "Итак, подход, принятый в man:rc.subr[8], следующий: `run_rc_command` " "передаёт все свои аргументы, кроме первого, в соответствующий метод в " -"неизменном виде. Первый, опущенный аргумент — это имя самого метода: " -"`start`, `stop` и т.д. Он будет удалён с помощью `shift` в `run_rc_command`, " -"так что то, что было `$2` в оригинальной командной строке, будет " -"представлено как `$1` в методе, и так далее." +"неизменном виде. Первый, опущенный аргумент — это имя самого метода: `start`" +", `stop` и т.д. Он будет удалён с помощью `shift` в `run_rc_command`, так " +"что то, что было `$2` в оригинальной командной строке, будет представлено " +"как `$1` в методе, и так далее." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:751 @@ -2434,8 +2433,8 @@ msgid "" "(e.g., set inside man:rc.conf[5]), this needs to be handled by " "``load_rc_config`` and ``run_rc_command`` instead of inside a precommand." msgstr "" -"Если настройка запуска/остановки зависит от переменных из rc-фреймворка " -"(например, заданных в man:rc.conf[5]), это должно обрабатываться с помощью " +"Если настройка запуска/остановки зависит от переменных из rc-фреймворка (" +"например, заданных в man:rc.conf[5]), это должно обрабатываться с помощью " "``load_rc_config`` и ``run_rc_command``, а не внутри precommand." #. type: Plain text @@ -2602,15 +2601,15 @@ msgstr "" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:978 msgid "" -"➊ and ➋ make sure to set the name variable to the " -"man:basename[1] of the script name. If the filename is [.filename]#/usr/" -"local/etc/rc.d/dummy#, name is set to [.filename]#dummy#. This way changing " -"the filename of the rc script changes automatically the content of the name " +"➊ and ➋ make sure to set the name variable to the man:" +"basename[1] of the script name. If the filename is [.filename]#/usr/local/" +"etc/rc.d/dummy#, name is set to [.filename]#dummy#. This way changing the " +"filename of the rc script changes automatically the content of the name " "variable." msgstr "" "➊ и ➋ убедитесь, что переменная name установлена в значение " -"man:basename[1] имени скрипта. Если имя файла — [.filename]#/usr/local/etc/" -"rc.d/dummy#, то name будет установлено в [.filename]#dummy#. Таким образом, " +"man:basename[1] имени скрипта. Если имя файла — [.filename]#/usr/local/etc/rc" +".d/dummy#, то name будет установлено в [.filename]#dummy#. Таким образом, " "изменение имени rc-скрипта автоматически изменит содержимое переменной name." #. type: Plain text @@ -2620,9 +2619,9 @@ msgid "" "to enable this service based upon the filename of this script. In this " "example this resolves to dummy_enable." msgstr "" -"➌ указывает имя переменной, которая используется в " -"[.filename]#rc.conf# для включения этой службы на основе имени файла этого " -"скрипта. В данном примере это преобразуется в dummy_enable." +"➌ указывает имя переменной, которая используется в [.filename]#rc." +"conf# для включения этой службы на основе имени файла этого скрипта. В " +"данном примере это преобразуется в dummy_enable." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:983 @@ -2647,8 +2646,8 @@ msgid "" "the underscore in front of _dummy_user to make it different from dummy_user " "which can be set in [.filename]#rc.conf#)." msgstr "" -"➏ и ➐ устанавливают переменные, внутренние для скрипта " -"(обратите внимание на подчёркивание в начале _dummy_user, чтобы отличать её " +"➏ и ➐ устанавливают переменные, внутренние для скрипта (" +"обратите внимание на подчёркивание в начале _dummy_user, чтобы отличать её " "от dummy_user, которая может быть задана в [.filename]#rc.conf#)." #. type: Plain text @@ -2693,14 +2692,14 @@ msgid "" "The above creates an instance of the dummy service with the name dummy_foo. " "It does not use the config file [.filename]#/usr/local/etc/dummy.cfg# but " "the config file [.filename]#/usr/local/etc/dummy_foo.cfg# (➐), and it " -"uses the PID file [.filename]#/var/run/dummy/dummy_foo.pid# instead of " -"[.filename]#/var/run/dummy/dummy.pid#." +"uses the PID file [.filename]#/var/run/dummy/dummy_foo.pid# instead of [." +"filename]#/var/run/dummy/dummy.pid#." msgstr "" "Вышеприведенное создает экземпляр службы dummy с именем dummy_foo. Он " "использует не файл конфигурации [.filename]#/usr/local/etc/dummy.cfg#, а " "файл конфигурации [.filename]#/usr/local/etc/dummy_foo.cfg# (➐), и " -"использует PID-файл [.filename]#/var/run/dummy/dummy_foo.pid# вместо " -"[.filename]#/var/run/dummy/dummy.pid#." +"использует PID-файл [.filename]#/var/run/dummy/dummy_foo.pid# вместо [." +"filename]#/var/run/dummy/dummy.pid#." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:1012 @@ -2714,8 +2713,8 @@ msgid "" "update is installed." msgstr "" "Сервисы dummy и dummy_foo могут управляться независимо друг от друга, при " -"этом скрипт запуска обновляется автоматически при обновлении пакета " -"(благодаря символьной ссылке). Это не обновляет строку REQUIRE, поэтому нет " +"этом скрипт запуска обновляется автоматически при обновлении пакета (" +"благодаря символьной ссылке). Это не обновляет строку REQUIRE, поэтому нет " "простого способа зависеть от конкретного экземпляра. Чтобы зависеть от " "конкретного экземпляра в порядке запуска, необходимо создать копию вместо " "использования символьной ссылки. Это предотвращает автоматическое применение " @@ -2732,14 +2731,14 @@ msgstr "Дополнительная литература" 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." +"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[Оригинальная статья " "Люка Мьюберна] предлагает общий обзор [.filename]#rc.d# и подробное " "обоснование принятых при его проектировании решений. В ней представлено " -"понимание всего фреймворка [.filename]#rc.d# и его места в современной BSD-" -"системе." +"понимание всего фреймворка [.filename]#rc.d# и его места в современной " +"BSD-системе." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:1021 @@ -2763,8 +2762,8 @@ msgid "" "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 "" -"Основным источником рабочих, жизненных примеров является [.filename]#/etc/" -"rc.d# в работающей системе. Его содержимое легко и приятно читать, поскольку " +"Основным источником рабочих, жизненных примеров является [.filename]#/etc/rc." +"d# в работающей системе. Его содержимое легко и приятно читать, поскольку " "большинство сложных моментов скрыто глубоко в man:rc.subr[8]. Однако " "помните, что скрипты в [.filename]#/etc/rc.d# были написаны не ангелами, " "поэтому они могут содержать ошибки и неоптимальные решения. Теперь вы можете " |
