From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OnFnN-0005kw-Mx for garchives@archives.gentoo.org; Sun, 22 Aug 2010 19:01:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 40D3BE0639; Sun, 22 Aug 2010 19:00:58 +0000 (UTC) Received: from smtpout.karoo.kcom.com (smtpout.karoo.kcom.com [212.50.160.34]) by pigeon.gentoo.org (Postfix) with ESMTP id E4749E0807 for ; Sun, 22 Aug 2010 19:00:57 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.56,251,1280703600"; d="scan'208";a="219780747" Received: from 213-152-39-90.dsl.eclipse.net.uk (HELO compaq.stroller.uk.eu.org) ([213.152.39.90]) by smtpout.karoo.kcom.com with ESMTP; 22 Aug 2010 20:00:56 +0100 Received: from funf.stroller.uk.eu.org (funf.stroller.uk.eu.org [192.168.1.71]) by compaq.stroller.uk.eu.org (Postfix) with ESMTP id 866836C4F4 for ; Sun, 22 Aug 2010 20:00:52 +0100 (BST) Message-Id: <0059EB40-8530-454B-B092-ECA76E9F42A2@stellar.eclipse.co.uk> From: Stroller To: gentoo-user@lists.gentoo.org In-Reply-To: <201008221226.28193.wonko@wonkology.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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 (Apple Message framework v936) Subject: Re: [gentoo-user] Disable fcron logging Date: Sun, 22 Aug 2010 20:00:52 +0100 References: <201008211525.35115.wonko@wonkology.org> <68A64BAB-F743-4908-A608-7D5549B0444C@stellar.eclipse.co.uk> <201008221226.28193.wonko@wonkology.org> X-Mailer: Apple Mail (2.936) X-Archives-Salt: 3c3e1629-b18a-4f4d-a94a-e69a54df766c X-Archives-Hash: e052c304049f1d8bd5f4e020a94a5464 On 22 Aug 2010, at 11:26, Alex Schuster wrote: > Stroller writes: >> >> >> #!/bin/bash >> while true >> do >> for drive in a b c d >> do >> /usr/sbin/smartctl /dev/sd$drive --whatever >> /var/log/hdstate >> done >> sleep 60 >> done > > I use hdparm and hddtemp: > > for hd in sda sdb sdc sdd > do > ... > echo "$hd: $state $temp" > done The script with which you reply is missing the sleep 60 loop. > ... > The problem with cron is that I get those cron logs I do not like, and > that the update time of 60 seconds is a little long. Running the > script in > a loop, started in .kde4/Autostart, would be better, but as a user I > have > no permission to call hdparm or hdtemp. I do not want to be part of > the > disk group, and when using sudo I would get the logs by sudo I > wanted to > avoid. So now I SUID'ed hdparm and hddtemp, changed the group to > wheel and > disabled execution for others. cron problem not solved, but > workarounded. Running a script which contains `while true ... sleep 60` will cause only a single logging action. You can run it as root at startup using / etc/conf.d/local.start and have the file world readable. Stroller.