Units
Translation components API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/translations/freebsd-doc/articles_rc-scripting/pt_BR/units/?format=api&page=2
https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/units/?format=api&page=3", "previous": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/units/?format=api", "results": [ { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The variable <envar>rcvar</envar> specifies the name of the ON/OFF knob variable." ], "previous_source": "", "target": [ "A variável <envar>rcvar</envar> especifica o nome da variável do botão ON/OFF." ], "id_hash": -7850705860231486865, "content_hash": -7850705860231486865, "location": "article.translate.xml:414", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 51, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/100907/?format=api", "priority": 100, "id": 29481, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=130cb09d6cd3226f", "url": "https://translate-dev.freebsd.org/api/units/29481/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.039054Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Now <function>load_rc_config</function> is invoked earlier in the script, before any <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> variables are accessed." ], "previous_source": "", "target": [ "Agora o <function>load_rc_config</function> é invocado anteriormente no script, antes que qualquer variável do <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> seja acessada." ], "id_hash": 3232638307272919230, "content_hash": 3232638307272919230, "location": "article.translate.xml:419", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 52, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 14, "source_unit": "https://translate-dev.freebsd.org/api/units/100908/?format=api", "priority": 100, "id": 29482, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=acdca369c85288be", "url": "https://translate-dev.freebsd.org/api/units/29482/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.046807Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "While examining <filename>rc.d</filename> scripts, keep in mind that <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> defers the evaluation of expressions in a function until the latter is called. Therefore it is not an error to invoke <function>load_rc_config</function> as late as just before <function>run_rc_command</function> and still access <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> variables from the method functions exported to <function>run_rc_command</function>. This is because the method functions are to be called by <function>run_rc_command</function>, which is invoked <emphasis>after</emphasis> <function>load_rc_config</function>." ], "previous_source": "", "target": [ "Ao examinar os scripts <filename>rc.d</filename>, tenha em mente que o <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> adia a avaliação de expressões em uma função até que a função seja chamada. Portanto, não é um erro invocar <function>load_rc_config</function> tão tarde quanto antes do <function>run_rc_comman</function> e ainda acessar as variáveis do <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> a partir do método das funções exportadas para o <function>run_rc_command</function>. Isto ocorre porque as funções do método devem ser chamadas por <function>run_rc_command</function>, que é chamado <emphasis>após</emphasis> o <function>load_rc_config</function>." ], "id_hash": -7391827370420370912, "content_hash": -7391827370420370912, "location": "article.translate.xml:424", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 53, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 66, "source_unit": "https://translate-dev.freebsd.org/api/units/100909/?format=api", "priority": 100, "id": 29483, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=196af42b91158220", "url": "https://translate-dev.freebsd.org/api/units/29483/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.075827Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "A warning will be emitted by <function>run_rc_command</function> if <envar>rcvar</envar> itself is set, but the indicated knob variable is unset. If your <filename>rc.d</filename> script is for the base system, you should add a default setting for the knob to <filename>/etc/defaults/rc.conf</filename> and document it in <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. 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." ], "previous_source": "", "target": [ "Um aviso será emitido pelo <function>run_rc_command</function> se o próprio <envar>rcvar</envar> estiver definido, mas a variável de knob indicada não estiver definida. Se o seu script <filename>rc.d</filename> for para o sistema base, você deve adicionar uma configuração padrão para o knob no <filename>/etc/defaults/rc.conf</filename> e documentá-lo em <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Caso contrário, será o seu script que deverá fornecer uma configuração padrão para o knob. A abordagem canônica para o último caso é mostrada no exemplo." ], "id_hash": -5473815063366408949, "content_hash": -5473815063366408949, "location": "article.translate.xml:440", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 54, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 70, "source_unit": "https://translate-dev.freebsd.org/api/units/100910/?format=api", "priority": 100, "id": 29484, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=34091a338ddce50b", "url": "https://translate-dev.freebsd.org/api/units/29484/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.092852Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "You can make <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> act as though the knob is set to <literal>ON</literal>, irrespective of its current setting, by prefixing the argument to the script with <literal>one</literal> or <literal>force</literal>, as in <option>onestart</option> or <option>forcestop</option>. Keep in mind though that <literal>force</literal> has other dangerous effects we will touch upon below, while <literal>one</literal> just overrides the ON/OFF knob. E.g., assume that <envar>dummy_enable</envar> is <literal>OFF</literal>. The following command will run the <option>start</option> method in spite of the setting:" ], "previous_source": "", "target": [ "Você pode fazer o <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> agir como se o knob fosse definido como <literal>ON</literal>, independentemente da sua configuração atual, prefixando o argumento para o script com <literal>one</literal> ou <literal>force</literal>, como em <option>onestart</option> ou <option>forcestop</option>. Tenha em mente que o <literal>force</literal> tem outros efeitos perigosos que mencionaremos abaixo, enquanto <literal>one</literal> apenas sobrescreve o knob ON/OFF. Por exemplo, suponha que <envar>dummy_enable</envar> seja <literal>OFF</literal>. O comando a seguir executará o método <option>start</option> apesar da configuração:" ], "id_hash": -7249915972232730016, "content_hash": -7249915972232730016, "location": "article.translate.xml:451", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 55, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 75, "source_unit": "https://translate-dev.freebsd.org/api/units/100911/?format=api", "priority": 100, "id": 29485, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=1b631fd5bfa32a60", "url": "https://translate-dev.freebsd.org/api/units/29485/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.103465Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "<prompt>#</prompt> <userinput>/etc/rc.d/dummy onestart</userinput>" ], "previous_source": "", "target": [ "<prompt>#</prompt> <userinput>/etc/rc.d/dummy onestart</userinput>" ], "id_hash": 6117329116059047457, "content_hash": 6117329116059047457, "location": "article.translate.xml:464", "context": "", "note": "(itstool) path: note/screen", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 56, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/100912/?format=api", "priority": 100, "id": 29486, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=d4e51e6b88da9621", "url": "https://translate-dev.freebsd.org/api/units/29486/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.111754Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Now the message to be shown at boot time is no longer hard-coded in the script. It is specified by an <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> variable named <envar>dummy_msg</envar>. This is a trivial example of how <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> variables can control an <filename>rc.d</filename> script." ], "previous_source": "", "target": [ "Agora, a mensagem a ser mostrada no momento da inicialização não é mais codificada no script. Ela é especificada por uma variável do <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> chamada <envar>dummy_msg</envar>. Este é um exemplo trivial de como as variáveis do <citerefentry><refentrytitle>rc.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> podem controlar um script <filename>rc.d</filename>." ], "id_hash": 8071578784071747066, "content_hash": 8071578784071747066, "location": "article.translate.xml:469", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 57, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 39, "source_unit": "https://translate-dev.freebsd.org/api/units/100913/?format=api", "priority": 100, "id": 29487, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=f0040223992d05fa", "url": "https://translate-dev.freebsd.org/api/units/29487/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.179071Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The names of all <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> variables used exclusively by our script <emphasis>must</emphasis> have the same prefix: <envar>${name}_</envar>. For example: <envar>dummy_mode</envar>, <envar>dummy_state_file</envar>, and so on." ], "previous_source": "", "target": [ "Os nomes de todas as variáveis do <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> usadas exclusivamente pelo nosso script <emphasis>devem</emphasis> possuir o mesmo prefixo: <envar>$ {name} _</envar>. Por exemplo: <envar>dummy_mode</envar>, <envar>dummy_state_file</envar>, e assim por diante." ], "id_hash": 7194985863378165283, "content_hash": 7194985863378165283, "location": "article.translate.xml:476", "context": "", "note": "(itstool) path: important/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 58, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 24, "source_unit": "https://translate-dev.freebsd.org/api/units/100914/?format=api", "priority": 100, "id": 29488, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=e3d9b985a69cde23", "url": "https://translate-dev.freebsd.org/api/units/29488/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.205511Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "While it is possible to use a shorter name internally, e.g., just <envar>msg</envar>, adding the unique prefix <envar>${name}_</envar> to all global names introduced by our script will save us from possible collisions with the <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> namespace." ], "previous_source": "", "target": [ "Embora seja possível usar um nome mais curto internamente, por exemplo, apenas <envar>msg</envar>, adicionar o prefixo exclusivo <envar> ${name}_</envar> a todos os nomes globais introduzidos pelo nosso script nos salvará de possíveis colisões com o nome das funções existentes no <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>." ], "id_hash": 8467806815062452045, "content_hash": 8467806815062452045, "location": "article.translate.xml:484", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 59, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 36, "source_unit": "https://translate-dev.freebsd.org/api/units/100915/?format=api", "priority": 100, "id": 29489, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=f583b16f166de74d", "url": "https://translate-dev.freebsd.org/api/units/29489/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.230205Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "As a rule, <filename>rc.d</filename> scripts of the base system need not provide defaults for their <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> variables because the defaults should be set in <filename>/etc/defaults/rc.conf</filename> instead. On the other hand, <filename>rc.d</filename> scripts for ports should provide the defaults as shown in the example." ], "previous_source": "", "target": [ "Como regra, os scripts <filename>rc.d</filename> do sistema base não precisam fornecer valores padrões para as suas variáveis <citerefentry><refentrytitle>rc.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> porque os padrões devem ser definidos em <filename>/etc/defaults/rc.conf</filename>. Por outro lado, os scripts <filename>rc.d</filename> para os ports devem fornecer os valores padrões, conforme mostrado no exemplo." ], "id_hash": 135257685755041541, "content_hash": 135257685755041541, "location": "article.translate.xml:490", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 60, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 43, "source_unit": "https://translate-dev.freebsd.org/api/units/100916/?format=api", "priority": 100, "id": 29490, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=81e0882608921705", "url": "https://translate-dev.freebsd.org/api/units/29490/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.247557Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Here we use <envar>dummy_msg</envar> 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:" ], "previous_source": "", "target": [ "Aqui usamos <envar>dummy_msg</envar> para realmente controlar nosso script, ou seja, para emitir uma mensagem variável. O uso de uma função de shell é um exagero aqui, já que ele só executa um único comando; uma alternativa igualmente válida seria:" ], "id_hash": 2832485484524982666, "content_hash": 2832485484524982666, "location": "article.translate.xml:501", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 61, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 35, "source_unit": "https://translate-dev.freebsd.org/api/units/100917/?format=api", "priority": 100, "id": 29491, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=a74f028a808fd18a", "url": "https://translate-dev.freebsd.org/api/units/29491/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.269510Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "start_cmd=\"echo \\\"$dummy_msg\\\"\"" ], "previous_source": "", "target": [ "start_cmd=\"echo \\\"$dummy_msg\\\"\"" ], "id_hash": 1999939210457409991, "content_hash": 1999939210457409991, "location": "article.translate.xml:506", "context": "", "note": "(itstool) path: callout/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 62, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/100918/?format=api", "priority": 100, "id": 29492, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=9bc1361da3b069c7", "url": "https://translate-dev.freebsd.org/api/units/29492/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.280757Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Startup and shutdown of a simple daemon" ], "previous_source": "", "target": [ "Inicialização e desligamento de um daemon simples" ], "id_hash": -8444834757010602763, "content_hash": -8444834757010602763, "location": "article.translate.xml:512", "context": "", "note": "(itstool) path: sect1/title", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 63, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/100919/?format=api", "priority": 100, "id": 29493, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=0acdeb87f982c4f5", "url": "https://translate-dev.freebsd.org/api/units/29493/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.291637Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "We said earlier that <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> 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</filename> script for such a daemon called <command>mumbled</command>. Here it is:" ], "previous_source": "", "target": [ "Dissemos anteriormente que o <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> poderia fornecer métodos padrão. Obviamente, estes padrões não podem ser muito gerais. Eles são adequados para o caso comum de iniciar e encerrar um programa daemon simples. Vamos supor agora que precisamos escrever um script <filename>rc.d</filename> para um daemon chamado <command>mumbled</command>. Aqui está:" ], "id_hash": 3379371736999227134, "content_hash": 3379371736999227134, "location": "article.translate.xml:514", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 64, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 53, "source_unit": "https://translate-dev.freebsd.org/api/units/100920/?format=api", "priority": 100, "id": 29494, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=aee5f0b0abd56efe", "url": "https://translate-dev.freebsd.org/api/units/29494/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.301386Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "#!/bin/sh\n\n. /etc/rc.subr\n\nname=mumbled\nrcvar=mumbled_enable\n\ncommand=\"/usr/sbin/${name}\"<co xml:id=\"rcng-daemon-basic-cmd\"/>\n\nload_rc_config $name\nrun_rc_command \"$1\"" ], "previous_source": "", "target": [ "#!/bin/sh\n\n. /etc/rc.subr\n\nname=mumbled\nrcvar=mumbled_enable\n\ncommand=\"/usr/sbin/${name}\"<co xml:id=\"rcng-daemon-basic-cmd\"/>\n\nload_rc_config $name\nrun_rc_command \"$1\"" ], "id_hash": 4570875237610077276, "content_hash": 4570875237610077276, "location": "article.translate.xml:522", "context": "", "note": "(itstool) path: informalexample/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 65, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/100921/?format=api", "priority": 100, "id": 29495, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=bf6f02cfa260bc5c", "url": "https://translate-dev.freebsd.org/api/units/29495/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.311491Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Pleasingly simple, isn't it? Let us examine our little script. The only new thing to note is as follows:" ], "previous_source": "", "target": [ "Agradavelmente simples, não é? Vamos examinar nosso pequeno script. A única coisa nova a observar é o seguinte:" ], "id_hash": 1886849438356525776, "content_hash": 1886849438356525776, "location": "article.translate.xml:535", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 66, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 19, "source_unit": "https://translate-dev.freebsd.org/api/units/100922/?format=api", "priority": 100, "id": 29496, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=9a2f6f9135e2d2d0", "url": "https://translate-dev.freebsd.org/api/units/29496/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.329733Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The <envar>command</envar> variable is meaningful to <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>. If it is set, <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> will act according to the scenario of serving a conventional daemon. In particular, the default methods will be provided for such arguments: <option>start</option>, <option>stop</option>, <option>restart</option>, <option>poll</option>, and <option>status</option>." ], "previous_source": "", "target": [ "A variável <envar>command</envar> é significativa para o <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>. Se estiver definido, o <citerefentry><refentrytitle>rc.subr</refentrytitle> <manvolnum>8</manvolnum></citerefentry> agirá de acordo com o cenário de servir um daemon convencional. Em particular, os métodos padrão serão fornecidos para tais argumentos: <option>start</option>, <option>stop</option>, <option>restart</option>, <option>poll</option>, e <option>status</option>." ], "id_hash": 2456916253854035003, "content_hash": 2456916253854035003, "location": "article.translate.xml:540", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 67, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 40, "source_unit": "https://translate-dev.freebsd.org/api/units/100923/?format=api", "priority": 100, "id": 29497, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=a218b850c9da6c3b", "url": "https://translate-dev.freebsd.org/api/units/29497/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.352213Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The daemon will be started by running <envar>$command</envar> with command-line flags specified by <envar>$mumbled_flags</envar>. Thus all the input data for the default <option>start</option> method are available in the variables set by our script. Unlike <option>start</option>, other methods may require additional information about the process started. For instance, <option>stop</option> must know the PID of the process to terminate it. In the present case, <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> will scan through the list of all processes, looking for a process with its name equal to <envar>$procname</envar>. The latter is another variable of meaning to <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>, and its value defaults to that of <envar>command</envar>. In other words, when we set <envar>command</envar>, <envar>procname</envar> 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." ], "previous_source": "", "target": [ "O daemon será iniciado executando <envar>$command</envar> com os sinalizadores de linha de comando especificados por <envar>$mumbled_flags</envar>. Assim, todos os dados de entrada para o método padrão <option>start</option> estão disponíveis nas variáveis configuradas pelo nosso script. Ao contrário do <option>start</option>, outros métodos podem requerer informações adicionais sobre o processo iniciado. Por exemplo, <option>stop</option> deve conhecer o PID do processo para terminá-lo. No presente caso, <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> varrerá a lista de todos os processos, procurando por um processo com seu nome igual a <envar>$procname</envar>. Esta última é outra variável de significado para <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>, e seu valor é padronizado para <envar>command</envar>. Em outras palavras, quando definimos o <envar>command</envar>, <envar>procname</envar> é efetivamente definido para o mesmo valor. Isso permite que nosso script mate o daemon e verifique se ele está sendo executado em primeiro lugar." ], "id_hash": -4217034928677537733, "content_hash": -4217034928677537733, "location": "article.translate.xml:548", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 68, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 132, "source_unit": "https://translate-dev.freebsd.org/api/units/100924/?format=api", "priority": 100, "id": 29498, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=457a15133ec2b83b", "url": "https://translate-dev.freebsd.org/api/units/29498/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.361133Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "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 <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>. You should additionally set <envar>command_interpreter</envar> to let <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> know the actual name of the process if <envar>$command</envar> is a script." ], "previous_source": "", "target": [ "Alguns programas são, na verdade, scripts executáveis. O sistema executa esse script iniciando seu interpretador e passando o nome do script para ele como um argumento de linha de comando. Isso é refletido na lista de processos, que podem confundir o <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>. Você também deve definir o <envar>command_interpreter</envar> para permitir que o <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> saiba o nome real do processo se o <envar>$command</envar> é um script." ], "id_hash": -9113787697906426517, "content_hash": -9113787697906426517, "location": "article.translate.xml:567", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 69, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 62, "source_unit": "https://translate-dev.freebsd.org/api/units/100925/?format=api", "priority": 100, "id": 29499, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=018552602bf65d6b", "url": "https://translate-dev.freebsd.org/api/units/29499/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.375468Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "For each <filename>rc.d</filename> script, there is an optional <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> variable that takes precedence over <envar>command</envar>. Its name is constructed as follows: <envar>${name}_program</envar>, where <envar>name</envar> is the mandatory variable we discussed <link linkend=\"name-var\">earlier</link>. E.g., in this case it will be <envar>mumbled_program</envar>. It is <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> that arranges <envar>${name}_program</envar> to override <envar>command</envar>." ], "previous_source": "", "target": [ "Para cada script <filename>rc.d</filename>, existe uma variável <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum></manvolnum></citerefentry> que tem precedência sobre <envar>command</envar>. Seu nome é construído da seguinte forma: <envar>${name}_program</envar>, onde <envar>name</envar> é a variável obrigatória que discutimos <link linkend=\"name-var\">anteriormente</link>. Por exemplo, neste caso, será <envar> mumbled_program </envar>. É <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>que organiza<envar>${name}_program</envar> para substituir o comando<envar></envar>." ], "id_hash": -6361805945880800855, "content_hash": -6361805945880800855, "location": "article.translate.xml:576", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 70, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 49, "source_unit": "https://translate-dev.freebsd.org/api/units/100926/?format=api", "priority": 100, "id": 29500, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=27b65332d1ce91a9", "url": "https://translate-dev.freebsd.org/api/units/29500/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.388215Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Of course, <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> will permit you to set <envar>${name}_program</envar> from <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> or the script itself even if <envar>command</envar> is unset. In that case, the special properties of <envar>${name}_program</envar> are lost, and it becomes an ordinary variable your script can use for its own purposes. However, the sole use of <envar>${name}_program</envar> is discouraged because using it together with <envar>command</envar> became an idiom of <filename>rc.d</filename> scripting." ], "previous_source": "", "target": [ "Obviamente, o <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> permitirá que você defina <envar>${name}_program</envar> a partir do <citerefentry><refentrytitle>rc.conf </refentrytitle><manvolnum>5</manvolnum></citerefentry> ou o próprio script, mesmo que o <envar>command</envar> esteja indefinido. Nesse caso, as propriedades especiais de <envar>${name}_program</envar> são perdidas e se tornam uma variável comum que seu script pode usar para seus próprios propósitos. No entanto, o uso exclusivo de <envar>${name}_program</envar> é desencorajado porque usá-lo junto com o <envar>command</envar> tornou-se um idioma na escrita de scripts <filename>rc.d</filename>." ], "id_hash": 5556391936333066044, "content_hash": 5556391936333066044, "location": "article.translate.xml:587", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 71, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 64, "source_unit": "https://translate-dev.freebsd.org/api/units/100927/?format=api", "priority": 100, "id": 29501, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=cd1c4506edfa2f3c", "url": "https://translate-dev.freebsd.org/api/units/29501/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.400180Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "For more detailed information on default methods, refer to <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>." ], "previous_source": "", "target": [ "Para obter informações mais detalhadas sobre métodos padrões, consulte <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>." ], "id_hash": -8525192651962250557, "content_hash": -8525192651962250557, "location": "article.translate.xml:599", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 72, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/100928/?format=api", "priority": 100, "id": 29502, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=09b06e7392050ac3", "url": "https://translate-dev.freebsd.org/api/units/29502/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.419110Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Startup and shutdown of an advanced daemon" ], "previous_source": "", "target": [ "Inicialização e desligamento de um daemon avançado" ], "id_hash": 3818684683030145373, "content_hash": 3818684683030145373, "location": "article.translate.xml:606", "context": "", "note": "(itstool) path: sect1/title", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 73, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/100929/?format=api", "priority": 100, "id": 29503, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=b4feb17ca93ca95d", "url": "https://translate-dev.freebsd.org/api/units/29503/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.431304Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "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." ], "previous_source": "", "target": [ "Vamos adicionar um pouco de carne aos ossos do script anterior e torná-lo mais complexo e cheio de funcionalidades. Os métodos padrões podem fazer um bom trabalho para nós, mas podemos precisar ajustar alguns dos seus aspectos. Agora vamos aprender como ajustar os métodos padrões para as nossas necessidades." ], "id_hash": 3702051188174477417, "content_hash": 3702051188174477417, "location": "article.translate.xml:608", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 74, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 51, "source_unit": "https://translate-dev.freebsd.org/api/units/100930/?format=api", "priority": 100, "id": 29504, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=b36053f0fb73d869", "url": "https://translate-dev.freebsd.org/api/units/29504/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.447942Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "#!/bin/sh\n\n. /etc/rc.subr\n\nname=mumbled\nrcvar=mumbled_enable\n\ncommand=\"/usr/sbin/${name}\"\ncommand_args=\"mock arguments > /dev/null 2>&1\"<co xml:id=\"rcng-daemon-adv-args\"/>\n\npidfile=\"/var/run/${name}.pid\"<co xml:id=\"rcng-daemon-adv-pid\"/>\n\nrequired_files=\"/etc/${name}.conf /usr/share/misc/${name}.rules\"<co xml:id=\"rcng-daemon-adv-reqfiles\"/>\n\nsig_reload=\"USR1\"<co xml:id=\"rcng-daemon-adv-sig\"/>\n\nstart_precmd=\"${name}_prestart\"<co xml:id=\"rcng-daemon-adv-precmd\"/>\nstop_postcmd=\"echo Bye-bye\"<co xml:id=\"rcng-daemon-adv-postcmd\"/>\n\nextra_commands=\"reload plugh xyzzy\"<co xml:id=\"rcng-daemon-adv-extra\"/>\n\nplugh_cmd=\"mumbled_plugh\"<co xml:id=\"rcng-daemon-adv-methods\"/>\nxyzzy_cmd=\"echo 'Nothing happens.'\"\n\nmumbled_prestart()\n{\n\tif checkyesno mumbled_smart; then<co xml:id=\"rcng-daemon-adv-yn\"/>\n\t\trc_flags=\"-o smart ${rc_flags}\"<co xml:id=\"rcng-daemon-adv-rcflags\"/>\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\"<co xml:id=\"rcng-daemon-adv-warn\"/>\n\t\treturn 1<co xml:id=\"rcng-daemon-adv-preret\"/>\n\t\t;;\n\tesac\n\trun_rc_command xyzzy<co xml:id=\"rcng-daemon-adv-run\"/>\n\treturn 0\n}\n\nmumbled_plugh()<co xml:id=\"rcng-daemon-adv-plugh\"/>\n{\n\techo 'A hollow voice says \"plugh\".'\n}\n\nload_rc_config $name\nrun_rc_command \"$1\"" ], "previous_source": "", "target": [ "#!/bin/sh\n\n. /etc/rc.subr\n\nname=mumbled\nrcvar=mumbled_enable\n\ncommand=\"/usr/sbin/${name}\"\ncommand_args=\"mock arguments > /dev/null 2>&1\"<co xml:id=\"rcng-daemon-adv-args\"/>\n\npidfile=\"/var/run/${name}.pid\"<co xml:id=\"rcng-daemon-adv-pid\"/>\n\nrequired_files=\"/etc/${name}.conf /usr/share/misc/${name}.rules\"<co xml:id=\"rcng-daemon-adv-reqfiles\"/>\n\nsig_reload=\"USR1\"<co xml:id=\"rcng-daemon-adv-sig\"/>\n\nstart_precmd=\"${name}_prestart\"<co xml:id=\"rcng-daemon-adv-precmd\"/>\nstop_postcmd=\"echo Bye-bye\"<co xml:id=\"rcng-daemon-adv-postcmd\"/>\n\nextra_commands=\"reload plugh xyzzy\"<co xml:id=\"rcng-daemon-adv-extra\"/>\n\nplugh_cmd=\"mumbled_plugh\"<co xml:id=\"rcng-daemon-adv-methods\"/>\nxyzzy_cmd=\"echo 'Nothing happens.'\"\n\nmumbled_prestart()\n{\n\tif checkyesno mumbled_smart; then<co xml:id=\"rcng-daemon-adv-yn\"/>\n\t\trc_flags=\"-o smart ${rc_flags}\"<co xml:id=\"rcng-daemon-adv-rcflags\"/>\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\"<co xml:id=\"rcng-daemon-adv-warn\"/>\n\t\treturn 1<co xml:id=\"rcng-daemon-adv-preret\"/>\n\t\t;;\n\tesac\n\trun_rc_command xyzzy<co xml:id=\"rcng-daemon-adv-run\"/>\n\treturn 0\n}\n\nmumbled_plugh()<co xml:id=\"rcng-daemon-adv-plugh\"/>\n{\n\techo 'A hollow voice says \"plugh\".'\n}\n\nload_rc_config $name\nrun_rc_command \"$1\"" ], "id_hash": -4683251072129754579, "content_hash": -4683251072129754579, "location": "article.translate.xml:615", "context": "", "note": "(itstool) path: informalexample/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 75, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 88, "source_unit": "https://translate-dev.freebsd.org/api/units/100931/?format=api", "priority": 100, "id": 29505, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=3f01bff67bbd1a2d", "url": "https://translate-dev.freebsd.org/api/units/29505/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.463159Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Additional arguments to <envar>$command</envar> can be passed in <envar>command_args</envar>. They will be added to the command line after <envar>$mumbled_flags</envar>. Since the final command line is passed to <command>eval</command> for its actual execution, input and output redirections can be specified in <envar>command_args</envar>." ], "previous_source": "", "target": [ "Argumentos adicionais para <envar>$command</envar> podem ser passados em <envar>command_args</envar>. Eles serão adicionados a linha de comando após <envar>$mumbled_flags</envar>. Como a linha de comando final é passada para <command>eval</command> para sua execução real, os redirecionamentos de entrada e saída podem ser especificados em <envar>command_args</envar>." ], "id_hash": 8731102084092073639, "content_hash": 8731102084092073639, "location": "article.translate.xml:671", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 76, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 41, "source_unit": "https://translate-dev.freebsd.org/api/units/100932/?format=api", "priority": 100, "id": 29506, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=f92b1b160bfb16a7", "url": "https://translate-dev.freebsd.org/api/units/29506/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.480288Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "<emphasis>Never</emphasis> include dashed options, like <option>-X</option> or <option>--foo</option>, in <envar>command_args</envar>. The contents of <envar>command_args</envar> will appear at the end of the final command line, hence they are likely to follow arguments present in <envar>${name}_flags</envar>; but most commands will not recognize dashed options after ordinary arguments. A better way of passing additional options to <envar>$command</envar> is to add them to the beginning of <envar>${name}_flags</envar>. Another way is to modify <envar>rc_flags</envar> <link linkend=\"rc-flags\">as shown later</link>." ], "previous_source": "", "target": [ "<emphasis> Nunca</emphasis> inclua opções tracejadas, como <option>-X</option> ou <option>--foo</option>, em <envar>command_args</envar>. O conteúdo de <envar>command_args</envar> aparecerá no final da linha de comando final, portanto é provável que eles sigam os argumentos presentes em <envar>${name}_flags</envar>; mas a maioria dos comandos não reconhecerá opções tracejadas após argumentos comuns. Uma maneira melhor de passar opções adicionais para <envar>$command</envar> é adicioná-las ao início de <envar>${name}_flags </envar>. Outra maneira é modificar <envar>rc_flags</envar><link linkend=\"rc-flags\"> como mostrado posteriormente </link>." ], "id_hash": 485000100361810962, "content_hash": 485000100361810962, "location": "article.translate.xml:679", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 77, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 73, "source_unit": "https://translate-dev.freebsd.org/api/units/100933/?format=api", "priority": 100, "id": 29507, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=86bb11058a183412", "url": "https://translate-dev.freebsd.org/api/units/29507/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.492096Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "A good-mannered daemon should create a <emphasis>pidfile</emphasis> so that its process can be found more easily and reliably. The variable <envar>pidfile</envar>, if set, tells <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> where it can find the pidfile for its default methods to use." ], "previous_source": "", "target": [ "Um daemon de boas maneiras deve criar um <emphasis>pidfile</emphasis> para que seu processo possa ser encontrado com mais facilidade e confiabilidade. A variável <envar>pidfile</envar>, se configurada, informa ao <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> onde pode encontrar o pidfile para seus métodos padrão possam usar." ], "id_hash": -7108414061210433979, "content_hash": -7108414061210433979, "location": "article.translate.xml:695", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 78, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 37, "source_unit": "https://translate-dev.freebsd.org/api/units/100934/?format=api", "priority": 100, "id": 29508, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=1d59d712c5290645", "url": "https://translate-dev.freebsd.org/api/units/29508/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.502240Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "In fact, <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> will also use the pidfile to see if the daemon is already running before starting it. This check can be skipped by using the <option>faststart</option> argument." ], "previous_source": "", "target": [ "De fato, o <citerefentry><refentrytitle>rc.subr</refentrytitle> <manvolnum>8</manvolnum></citerefentry> também usará o pidfile para ver se o daemon já está em execução antes de iniciá-lo. Esta verificação pode ser ignorada usando o argumento <option>faststart</option>." ], "id_hash": -2159756231034125490, "content_hash": -2159756231034125490, "location": "article.translate.xml:703", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 79, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 29, "source_unit": "https://translate-dev.freebsd.org/api/units/100935/?format=api", "priority": 100, "id": 29509, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=6207012697c6434e", "url": "https://translate-dev.freebsd.org/api/units/29509/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.508933Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "If the daemon cannot run unless certain files exist, just list them in <envar>required_files</envar>, and <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> will check that those files do exist before starting the daemon. There also are <envar>required_dirs</envar> and <envar>required_vars</envar> for directories and environment variables, respectively. They all are described in detail in <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>." ], "previous_source": "", "target": [ "Se o daemon não puder ser executado a menos que existam certos arquivos, apenas liste-os em <envar>required_files</envar>, e <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> irá verificar se esses arquivos existem antes de iniciar o daemon. Também existem <envar>required_dirs</envar> e <envar>required_vars</envar> para diretórios e variáveis de ambiente, respectivamente. Todos eles são descritos em detalhes em <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>." ], "id_hash": 3199960945916420283, "content_hash": 3199960945916420283, "location": "article.translate.xml:711", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 80, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 47, "source_unit": "https://translate-dev.freebsd.org/api/units/100936/?format=api", "priority": 100, "id": 29510, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=ac688b86b478a0bb", "url": "https://translate-dev.freebsd.org/api/units/29510/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.518827Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The default method from <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> can be forced to skip the prerequisite checks by using <option>forcestart</option> as the argument to the script." ], "previous_source": "", "target": [ "O método padrão de <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> pode ser forçado a ignorar as verificações de pré-requisitos usando <option>forcestart</option> como o argumento para o script." ], "id_hash": -6522019209334492057, "content_hash": -6522019209334492057, "location": "article.translate.xml:720", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 81, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 22, "source_unit": "https://translate-dev.freebsd.org/api/units/100937/?format=api", "priority": 100, "id": 29511, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=257d22159157f467", "url": "https://translate-dev.freebsd.org/api/units/29511/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.532461Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "We can customize signals to send to the daemon in case they differ from the well-known ones. In particular, <envar>sig_reload</envar> specifies the signal that makes the daemon reload its configuration; it is <symbol>SIGHUP</symbol> by default. Another signal is sent to stop the daemon process; the default is <symbol>SIGTERM</symbol>, but this can be changed by setting <envar>sig_stop</envar> appropriately." ], "previous_source": "", "target": [ "Podemos personalizar sinais para enviar para o daemon caso eles sejam diferentes dos mais conhecidos. Em particular, <envar>sig_reload</envar> especifica o sinal que faz o daemon recarregar sua configuração; é <symbol>SIGHUP</symbol> por padrão. Outro sinal é enviado para parar o processo do daemon; o padrão é <symbol>SIGTERM</symbol>, mas isso pode ser alterado definindo <envar>sig_stop</envar> apropriadamente." ], "id_hash": -4138894333589286343, "content_hash": -4138894333589286343, "location": "article.translate.xml:728", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 82, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 57, "source_unit": "https://translate-dev.freebsd.org/api/units/100938/?format=api", "priority": 100, "id": 29512, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=468fb1884b889239", "url": "https://translate-dev.freebsd.org/api/units/29512/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.547217Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The signal names should be specified to <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> without the <literal>SIG</literal> prefix, as it is shown in the example. The FreeBSD version of <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>1</manvolnum></citerefentry> can recognize the <literal>SIG</literal> prefix, but the versions from other OS types may not." ], "previous_source": "", "target": [ "Os nomes dos sinais devem ser especificados para o <citerefentry><refentrytitle>rc.subr</refentrytitle> <manvolnum>8</manvolnum></citerefentry> sem o prefixo <literal>SIG</literal>, como é mostrado no exemplo. A versão do FreeBSD do <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>1</manvolnum></citerefentry> pode reconhecer o prefixo <literal>SIG</literal>, mas as versões de outros tipos de sistema operacional não." ], "id_hash": 7591559323495916416, "content_hash": 7591559323495916416, "location": "article.translate.xml:738", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 83, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 38, "source_unit": "https://translate-dev.freebsd.org/api/units/100939/?format=api", "priority": 100, "id": 29513, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=e95aa2fba0476380", "url": "https://translate-dev.freebsd.org/api/units/29513/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.554673Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Performing additional tasks before or after the default methods is easy. For each command-argument supported by our script, we can define <envar><replaceable>argument</replaceable>_precmd</envar> and <envar><replaceable>argument</replaceable>_postcmd</envar>. These <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> commands are invoked before and after the respective method, as it is evident from their names." ], "previous_source": "", "target": [ "Realizar tarefas adicionais antes ou depois dos métodos padrão é fácil. Para cada argumento de comando suportado pelo nosso script, podemos definir o argumento <envar><replaceable></replaceable>_precmd</envar> e <envar><replaceable></replaceable>_postcmd</envar>. Esses comandos no <citerefentry><refentrytitle>sh </refentrytitle><manvolnum>1</manvolnum> </citerefentry> são invocados antes e depois do respectivo método, como é evidente em seus nomes." ], "id_hash": -8400721503933702222, "content_hash": -8400721503933702222, "location": "article.translate.xml:747", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 84, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 42, "source_unit": "https://translate-dev.freebsd.org/api/units/100940/?format=api", "priority": 100, "id": 29514, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=0b6aa44d150bdfb2", "url": "https://translate-dev.freebsd.org/api/units/29514/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.569809Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Overriding a default method with a custom <envar><replaceable>argument</replaceable>_cmd</envar> still does not prevent us from making use of <envar><replaceable>argument</replaceable>_precmd</envar> or <envar><replaceable>argument</replaceable>_postcmd</envar> 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 <envar><replaceable>argument</replaceable>_precmd</envar> along with <envar><replaceable>argument</replaceable>_cmd</envar> lets us logically separate the checks from the action." ], "previous_source": "", "target": [ "Sobrescrever um método padrão com um <envar><replaceable>argumento </replaceable>_cmd</envar> personalizado ainda não nos impede de fazer uso do <envar><replaceable>argumento </replaceable>_precmd</envar> ou <envar><replaceable>argumento </replaceable>_postcmd</envar> se precisarmos. Em particular, o primeiro é bom para verificar condições personalizadas e sofisticadas que devem ser atendidas antes de executar o comando em si. Usar o <envar><replaceable>argumento </replaceable>_precmd</envar> junto com o <envar><replaceable>argumento </replaceable>_cmd</envar> nos permite separar logicamente as verificações da ação." ], "id_hash": 820644862122432484, "content_hash": 820644862122432484, "location": "article.translate.xml:757", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 85, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 58, "source_unit": "https://translate-dev.freebsd.org/api/units/100941/?format=api", "priority": 100, "id": 29515, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=8b638427758e97e4", "url": "https://translate-dev.freebsd.org/api/units/29515/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.579726Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Do not forget that you can cram any valid <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> 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." ], "previous_source": "", "target": [ "Não se esqueça de que você pode amontoar qualquer expressão válida do <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> nos métodos, pré e pós-comandos definidos por você. Apenas invocar uma função que faz com que o trabalho real seja um bom estilo na maioria dos casos, mas nunca deixe o estilo limitar sua compreensão do que está acontecendo por trás da cortina." ], "id_hash": 8424288641386574749, "content_hash": 8424288641386574749, "location": "article.translate.xml:770", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 86, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 50, "source_unit": "https://translate-dev.freebsd.org/api/units/100942/?format=api", "priority": 100, "id": 29516, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=f4e915e2b334739d", "url": "https://translate-dev.freebsd.org/api/units/29516/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.589021Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "If we would like to implement custom arguments, which can also be thought of as <emphasis>commands</emphasis> to our script, we need to list them in <envar>extra_commands</envar> and provide methods to handle them." ], "previous_source": "", "target": [ "Se quisermos implementar argumentos customizados, que também podem ser considerados como <emphasis>comandos</emphasis> para o nosso script, precisamos listá-los em <envar>extra_commands</envar> e fornecer métodos para manipulá-los." ], "id_hash": 9221611301212268503, "content_hash": 9221611301212268503, "location": "article.translate.xml:780", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 87, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 32, "source_unit": "https://translate-dev.freebsd.org/api/units/100943/?format=api", "priority": 100, "id": 29517, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=fff9be9ec97c27d7", "url": "https://translate-dev.freebsd.org/api/units/29517/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.602400Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The <option>reload</option> command is special. On the one hand, it has a preset method in <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>. On the other hand, <option>reload</option> 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 <envar>extra_commands</envar>." ], "previous_source": "", "target": [ "O comando <option>reload</option> é especial. Por um lado, tem um método predefinido em <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>. Por outro lado, <option>reload</option> não é oferecido por padrão. A razão é que nem todos os daemons usam o mesmo mecanismo de recarga e alguns não têm nada para recarregar. Portanto, precisamos solicitar explicitamente que a funcionalidade incorporada seja fornecida. Podemos fazer isso via <envar>extra_commands</envar>." ], "id_hash": 9213492530691973220, "content_hash": 9213492530691973220, "location": "article.translate.xml:787", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 88, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 64, "source_unit": "https://translate-dev.freebsd.org/api/units/100944/?format=api", "priority": 100, "id": 29518, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=ffdce6a4389c2064", "url": "https://translate-dev.freebsd.org/api/units/29518/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.610886Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "What do we get from the default method for <option>reload</option>? Quite often daemons reload their configuration upon reception of a signal — typically, <symbol>SIGHUP</symbol>. Therefore <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> attempts to reload the daemon by sending a signal to it. The signal is preset to <symbol>SIGHUP</symbol> but can be customized via <envar>sig_reload</envar> if necessary." ], "previous_source": "", "target": [ "O que obtemos do método padrão para <option>reload</option>? Muitas vezes, os daemons recarregam sua configuração na recepção de um sinal - normalmente, <symbol>SIGHUP</symbol>. Portanto, o <citerefentry><refentrytitle>rc.subr</refentrytitle> <manvolnum>8</manvolnum></citerefentry> tenta recarregar o daemon enviando um sinal para ele. O sinal é predefinido para <symbol>SIGHUP</symbol>, mas pode ser personalizado via <envar>sig_reload</envar>, caso necessário." ], "id_hash": -7400768026299924205, "content_hash": -7400768026299924205, "location": "article.translate.xml:796", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 89, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 51, "source_unit": "https://translate-dev.freebsd.org/api/units/100945/?format=api", "priority": 100, "id": 29519, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=194b30b0e7530113", "url": "https://translate-dev.freebsd.org/api/units/29519/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.624144Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Our script supports two non-standard commands, <option>plugh</option> and <option>xyzzy</option>. We saw them listed in <envar>extra_commands</envar>, and now it is time to provide methods for them. The method for <option>xyzzy</option> is just inlined while that for <option>plugh</option> is implemented as the <function>mumbled_plugh</function> function." ], "previous_source": "", "target": [ "Nosso script suporta dois comandos não padrão, <option>plugh</option> e <option>xyzzy</option>. Nós os vimos listados em <envar>extra_commands</envar>, e agora é hora de fornecer métodos para eles. O método para <option>xyzzy</option> é apenas embutido, enquanto que para <option>plugh</option> é implementado como a função <function>mumbled_plugh</function>." ], "id_hash": 956449696613107104, "content_hash": 956449696613107104, "location": "article.translate.xml:808", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 90, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 42, "source_unit": "https://translate-dev.freebsd.org/api/units/100946/?format=api", "priority": 100, "id": 29520, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=8d45fdee7c2785a0", "url": "https://translate-dev.freebsd.org/api/units/29520/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.634018Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "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., <citerefentry><refentrytitle>devd</refentrytitle><manvolnum>8</manvolnum></citerefentry> if specified in <citerefentry><refentrytitle>devd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>." ], "previous_source": "", "target": [ "Comandos não padrão não são chamados durante a inicialização ou o desligamento. Geralmente eles são para a conveniência do administrador do sistema. Eles também podem ser usados de outros subsistemas, por exemplo, <citerefentry><refentrytitle>devd</refentrytitle> <manvolnum>8</manvolnum></citerefentry> se especificado em <citerefentry><refentrytitle>devd.conf</refentrytitle><manvolnum>5</manvolnum> </citerefentry>." ], "id_hash": -4981231278663621146, "content_hash": -4981231278663621146, "location": "article.translate.xml:816", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 91, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 31, "source_unit": "https://translate-dev.freebsd.org/api/units/100947/?format=api", "priority": 100, "id": 29521, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=3adf1c8b3330a5e6", "url": "https://translate-dev.freebsd.org/api/units/29521/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.651250Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The full list of available commands can be found in the usage line printed by <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> when the script is invoked without arguments. For example, here is the usage line from the script under study:" ], "previous_source": "", "target": [ "A lista completa de comandos disponíveis pode ser encontrada na linha de uso impressa por <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry> quando o script é invocado sem argumentos. Por exemplo, aqui está a linha de uso do script em estudo:" ], "id_hash": -2708075789055090074, "content_hash": -2708075789055090074, "location": "article.translate.xml:821", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 92, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 35, "source_unit": "https://translate-dev.freebsd.org/api/units/100948/?format=api", "priority": 100, "id": 29522, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=5a6afb6af8892266", "url": "https://translate-dev.freebsd.org/api/units/29522/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.660482Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "<prompt>#</prompt> <userinput>/etc/rc.d/mumbled</userinput>\nUsage: /etc/rc.d/mumbled [fast|force|one](start|stop|restart|rcvar|reload|plugh|xyzzy|status|poll)" ], "previous_source": "", "target": [ "<prompt>#</prompt> <userinput>/etc/rc.d/mumbled</userinput>\nUso: /etc/rc.d/mumbled [fast|force|one](start|stop|restart|rcvar|reload|plugh|xyzzy|status|poll)" ], "id_hash": 6025364535198715704, "content_hash": 6025364535198715704, "location": "article.translate.xml:826", "context": "", "note": "(itstool) path: callout/screen", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 93, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 5, "source_unit": "https://translate-dev.freebsd.org/api/units/100949/?format=api", "priority": 100, "id": 29523, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=d39e651efac18f38", "url": "https://translate-dev.freebsd.org/api/units/29523/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.673054Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "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, <command>xyzzy</command> 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 <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>, as shown in the example." ], "previous_source": "", "target": [ "Um script pode invocar seus próprios comandos padrão ou não padrão, se necessário. Isto pode parecer semelhante as funções de chamada, mas sabemos que comandos e funções de shell nem sempre são a mesma coisa. Por exemplo, <command>xyzzy</command> não é implementado como uma função aqui. Além disso, pode haver um pré-comando e um pós-comando, que devem ser chamados ordenadamente. Portanto, a maneira correta de um script executar seu próprio comando é por meio de <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>, conforme mostrado no exemplo." ], "id_hash": 9161149031501247081, "content_hash": 9161149031501247081, "location": "article.translate.xml:831", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 94, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 79, "source_unit": "https://translate-dev.freebsd.org/api/units/100950/?format=api", "priority": 100, "id": 29524, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=ff22f0819d0bb269", "url": "https://translate-dev.freebsd.org/api/units/29524/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.681532Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "A handy function named <function>checkyesno</function> is provided by <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum></citerefentry>. It takes a variable name as its argument and returns a zero exit code if and only if the variable is set to <literal>YES</literal>, or <literal>TRUE</literal>, or <literal>ON</literal>, or <literal>1</literal>, case insensitive; a non-zero exit code is returned otherwise. In the latter case, the function tests the variable for being set to <literal>NO</literal>, <literal>FALSE</literal>, <literal>OFF</literal>, or <literal>0</literal>, case insensitive; it prints a warning message if the variable contains anything else, i.e., junk." ], "previous_source": "", "target": [ "Uma função útil chamada <function>checkyesno</function> é fornecida por <citerefentry><refentrytitle>rc.subr</refentrytitle><manvolnum>8</manvolnum> </citerefentry>. Ele usa um nome de variável como argumento e retorna um código de saída zero se, e somente se, a variável estiver configurada como <literal>YES</literal>, ou <literal>TRUE</literal>, ou <literal>ON</literal>, ou <literal>1</literal>, sem distinção entre maiúsculas e minúsculas; um código de saída diferente de zero é retornado de outra forma. No último caso, a função testa a variável como sendo definida como <literal>NO</literal>,<literal>FALSE</literal>,<literal>OFF</literal>ou<literal>0</literal> insensível a maiúsculas e minúsculas; imprime uma mensagem de aviso se a variável contiver qualquer outra coisa, ou seja, lixo." ], "id_hash": -235497926144396948, "content_hash": -235497926144396948, "location": "article.translate.xml:843", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 95, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 81, "source_unit": "https://translate-dev.freebsd.org/api/units/100951/?format=api", "priority": 100, "id": 29525, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=7cbb57e246d2716c", "url": "https://translate-dev.freebsd.org/api/units/29525/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.689614Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "Keep in mind that for <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> a zero exit code means true and a non-zero exit code means false." ], "previous_source": "", "target": [ "Tenha em mente que para o <citerefentry><refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum></citerefentry> um código de saída zero significa verdadeiro e um código de saída diferente de zero significa falso." ], "id_hash": -2568186388353347740, "content_hash": -2568186388353347740, "location": "article.translate.xml:856", "context": "", "note": "(itstool) path: callout/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 96, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 19, "source_unit": "https://translate-dev.freebsd.org/api/units/100952/?format=api", "priority": 100, "id": 29526, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=5c5bf8162d348f64", "url": "https://translate-dev.freebsd.org/api/units/29526/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.700905Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The <function>checkyesno</function> function takes a <emphasis>variable name</emphasis>. Do not pass the expanded <emphasis>value</emphasis> of a variable to it; it will not work as expected." ], "previous_source": "", "target": [ "A função <function>checkyesno</function> recebe um <emphasis>nome da variável</emphasis>. Não passe o <emphasis>valor</emphasis> expandido de uma variável para ele; não funcionará como esperado." ], "id_hash": -8564249265136817473, "content_hash": -8564249265136817473, "location": "article.translate.xml:860", "context": "", "note": "(itstool) path: important/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 97, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 24, "source_unit": "https://translate-dev.freebsd.org/api/units/100953/?format=api", "priority": 100, "id": 29527, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=0925acab2f9eaabf", "url": "https://translate-dev.freebsd.org/api/units/29527/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.711417Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "The following is the correct usage of <function>checkyesno</function>:" ], "previous_source": "", "target": [ "O uso correto de <function>checkyesno</function> é:" ], "id_hash": 3640918530314103491, "content_hash": 3640918530314103491, "location": "article.translate.xml:865", "context": "", "note": "(itstool) path: important/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 98, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 8, "source_unit": "https://translate-dev.freebsd.org/api/units/100954/?format=api", "priority": 100, "id": 29528, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=b287241ce7826ac3", "url": "https://translate-dev.freebsd.org/api/units/29528/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.723738Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "if checkyesno mumbled_enable; then\n foo\nfi" ], "previous_source": "", "target": [ "if checkyesno mumbled_enable; then\n foo\nfi" ], "id_hash": 5471842769628858309, "content_hash": 5471842769628858309, "location": "article.translate.xml:868", "context": "", "note": "(itstool) path: important/programlisting", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 99, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/100955/?format=api", "priority": 100, "id": 29529, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=cbefe402068487c5", "url": "https://translate-dev.freebsd.org/api/units/29529/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.732215Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_rc-scripting/pt_BR/?format=api", "source": [ "On the contrary, calling <function>checkyesno</function> as shown below will not work — at least not as expected:" ], "previous_source": "", "target": [ "Pelo contrário, chamar <function>checkyesno</function> como mostrado abaixo não funcionará - pelo menos não como esperado:" ], "id_hash": -838001610519536107, "content_hash": -838001610519536107, "location": "article.translate.xml:872", "context": "", "note": "(itstool) path: important/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 100, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 17, "source_unit": "https://translate-dev.freebsd.org/api/units/100956/?format=api", "priority": 100, "id": 29530, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_rc-scripting/pt_BR/?checksum=745ed1f9a3c71e15", "url": "https://translate-dev.freebsd.org/api/units/29530/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:16:13.754876Z" } ] }{ "count": 156, "next": "