From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] Покритикуйте init-скрипт
Date: Thu, 1 Nov 2007 15:26:08 +0300
Message-ID: <20071101122608.GB25244@basalt.office.altlinux.org> (raw)
In-Reply-To: <75e139a00710310322pdba103cx323cee86a17dc0cc@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]
Hi,
On Wed, Oct 31, 2007 at 04:22:35PM +0600, Slava Semushin wrote:
> В аттаче init-скрипт для OSSEC. Прошу знающих людей посмотреть и
> высказать замечания/предложения.
> init-скрипта в апстрим...
[...]
> #!/bin/sh
В скрипте используются массивы. Если очень не хочется написать
#!/bin/bash, то может стоит хотя бы оставить комментарий.
Впрочем, скрипт и так содержит достаточно alt-специфики.
[...]
> SourceIfNotEmpty /etc/ossec-init.conf
Видимо в этом файле определена загадочная переменная DIRECTORY.
Я бы добавил строчку
DIRECTORY=
непосредственно перед включением этого файла.
[...]
> if [ "$TYPE" = "local" ]; then
> start_order="1 2 3 4 6 7"
> stop_order="7 4 6 3 1 2"
>
> elif [ "$TYPE" = "server" ]; then
> start_order="1 2 3 4 5 6 7"
> stop_order="7 4 5 6 3 1 2"
>
> elif [ "$TYPE" = "agent" ]; then
> start_order="2 0 4 6"
> stop_order="4 6 0 2"
>
> else
> exit 1
> fi
Пожалуйста, откройте для себя case.
[...]
> check
> [ $RETVAL -eq 0 ] || return
Здесь и далее проще было бы написать
check || return
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2007-11-01 12:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 10:22 Slava Semushin
2007-10-31 10:27 ` Avramenko Andrew
2007-10-31 10:50 ` Slava Semushin
2007-10-31 11:16 ` Avramenko Andrew
2007-11-01 10:46 ` Vladimir V. Kamarzin
2007-11-01 11:02 ` Slava Semushin
2007-11-01 12:14 ` Dmitry V. Levin
2007-11-01 12:19 ` Slava Semushin
2007-11-01 12:28 ` Dmitry V. Levin
2007-11-01 12:36 ` Slava Semushin
2007-11-01 13:46 ` Dmitry V. Levin
2007-11-02 10:17 ` Slava Semushin
2007-10-31 11:08 ` Alexey I. Froloff
2007-11-01 12:26 ` Dmitry V. Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071101122608.GB25244@basalt.office.altlinux.org \
--to=ldv@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git