From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E848F138E20 for ; Fri, 21 Feb 2014 08:49:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0A5CE0C28; Fri, 21 Feb 2014 08:49:02 +0000 (UTC) Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 820A2E0C0C for ; Fri, 21 Feb 2014 08:49:01 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id w62so2339524wes.1 for ; Fri, 21 Feb 2014 00:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=zdqVOF6hVrTHn6KG+JbewzQtNqLr/tj9RFuPbmLzpM0=; b=qLEzg6Q6aQIvhNfiCUvsJ0U+6XfANWZcoMlHBMaKDtJtLdWb++20cB8RzG3rhZsHg3 BXckAGWjkiiPRozNRJs/jLtP/hMvgaQjV6haLLYj7cuwCFN2EZrsiBI96RUN6k08D6Rb 6IVjU3Z1M8IhvFc9xV5BlJkZfsQqTOIsyt0Dq24gPuKpDaePrzW5oAhZXtSlBmvp9VLF bIQQMEX5aXUuAalm+BF7PWfD9o9SliVaxNVZ/cnNBOpZFzXbdYqb2+ZrNSqxhOh5eKuz LCr5JlDlmtgq6lbm0rc/ovJ7EHdeagvrlf1pea5LU8H7Fi/1eAhjdh2P9V25vCCwAGDo ECYw== X-Received: by 10.195.13.234 with SMTP id fb10mr6027777wjd.50.1392972539966; Fri, 21 Feb 2014 00:48:59 -0800 (PST) Received: from [10.1.20.200] (dustpuppy.is.co.za. [196.14.169.11]) by mx.google.com with ESMTPSA id bj3sm15275632wjb.14.2014.02.21.00.48.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Feb 2014 00:48:59 -0800 (PST) Message-ID: <530712EA.6080005@gmail.com> Date: Fri, 21 Feb 2014 10:48:42 +0200 From: Alan McKinnon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: Debian just voted in systemd for default init system in jessie References: <53010A8E.2050909@googlemail.com> <53012691.6040503@googlemail.com> <5ea6afc66880871ddec1398bab1e1f17.squirrel@www.antarean.org> <31f183759cbab018caa5523ab4974175.squirrel@www.antarean.org> <5305C7E3.9030906@yandex.ru> <20140220113305.GB6784@sabayon.logifi> <5305ECB0.7060706@yandex.ru> <53061E1F.2050400@gmail.com> <5306FA54.2060108@yandex.ru> In-Reply-To: <5306FA54.2060108@yandex.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 3b006337-1734-40b0-bc6a-8d3d0518f0f4 X-Archives-Hash: bf8fcbbd810727799d187f35a4c97762 On 21/02/2014 09:03, Yuri K. Shatroff wrote: >> Your idea instantly fails as the rc-service author has no idea of what >> you defined ${SERVICE} to be and no way to determine what it is now. > > Yes, the rc-service author does not have any idea because he is not > requested to. > ${SERVICE} obviously comes from `rc-service status ${SERVICE}` . > The result (e.g. tail -n {$LINES} ${SERVICE}.log) is achieved by: > 1. putting LINES= in /etc/conf.d/${SERVICE} > 2. setting up ${SERVICE}.log with syslog. (or putting LOGFILE=... and > doing `tail -n ${LINES} ${LOGFILE}, or even LAST_LOG_CMD=`mysql -qe > 'SELECT ... FROM log.log ORDER BY date DESC LIMIT ${LINES}'`, or > *whatever*) > 3. adding this `tail -n ...` or whatever call to the init script . > 4. voila. > > If you feel I'm again entirely wrong please point out why. The faults with your comments are many, and I'm not going to detail them as that's not my job. I'm going to let you figure it out for yourself in production why your entire approach is wrong, and simply leave you with this: You violate DRY. You expect the sysadmin to know they must make changes in a restart config file when they tweak the syslogger so that somehow the init script continues to get it right. Trust me, sysadmins are not going to remember to do that, because expecting them to is off the wall crazy. I repeat what I and Canek said earlier: You've never actually DONE any of this in real life, right? -- Alan McKinnon alan.mckinnon@gmail.com