ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] systemd + logrotate + syslogd
Date: Sat, 17 Nov 2012 14:37:03 +0400
Message-ID: <20121117103701.GA24452@altlinux.org> (raw)
In-Reply-To: <19020562.58.1353126507447.JavaMail.javamailuser@localhost>

[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]

On Sat, Nov 17, 2012 at 01:28:29PM +0900, Alexei Takaseev wrote:
> Добрый день!
> 
> Подскажите, вот такой костыль:
> 
> --- reload-syslog.old   2009-02-12 10:17:02.000000000 +0800
> +++ reload-syslog       2012-11-16 20:19:56.000000000 +0900
> @@ -2,9 +2,17 @@
> 
>  LOCKDIR=/var/lock/subsys
> 
> -for n in syslogd syslog-ng rsyslogd; do
> +if ! cat /proc/1/cmdline | fgrep --binary-files=text \/bin\/systemd; then
> +    for n in syslogd syslog-ng rsyslogd; do
>         if [ -f "$LOCKDIR/$n" ]; then
>                 /sbin/service $n reload && break
>         fi
> -done
> +    done
> +else
> +    for n in syslogd syslog-ng rsyslogd; do
> +       if [ -f "$LOCKDIR/$n" ]; then
> +           /bin/systemctl restart ${n}.service && break
> +       fi
> +    done
> +fi
>  exit 0
> 
> будет сильно противоречить политике партии, или не очень?

По идее, замена reload на restart не должна повлиять, поскольку
/etc/init.d/syslogd и так в ответ на reload в дефолтной конфигурации
делает restart.

Кстати говоря, интересно, как перевести эту часть логики
/etc/init.d/syslogd на язык systemd?


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-11-17 10:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-17  4:28 ` Alexei Takaseev
2012-11-17 10:37   ` Dmitry V. Levin [this message]
2012-11-20  8:33     ` Mike
2012-11-20  9:23       ` Dmitry V. Levin
2012-11-17 10:55   ` Michael Shigorin
2012-11-19  6:01   ` Sergei Epiphanov
2012-11-19 11:04     ` Dmitry V. Levin
2012-11-19 11:13       ` Alexei Takaseev
2012-11-19 11:35       ` Sergei Epiphanov
2012-11-20  8:30     ` Mike
2012-11-20  9:40       ` Sergei Epiphanov

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=20121117103701.GA24452@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