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 1OnGYy-0001X6-2p for garchives@archives.gentoo.org; Sun, 22 Aug 2010 19:50:40 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D4CB5E07C3; Sun, 22 Aug 2010 19:50:20 +0000 (UTC) Received: from smtpout.karoo.kcom.com (smtpout.karoo.kcom.com [212.50.160.34]) by pigeon.gentoo.org (Postfix) with ESMTP id 7B717E07C3 for ; Sun, 22 Aug 2010 19:50:19 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.56,254,1280703600"; d="scan'208";a="211951267" Received: from unknown (HELO compaq.stroller.uk.eu.org) ([213.152.39.90]) by smtpout.karoo.kcom.com with ESMTP; 22 Aug 2010 20:50:19 +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 0140A6C48B for ; Sun, 22 Aug 2010 20:50:14 +0100 (BST) Message-Id: <0B6CFC07-0059-4EB8-903D-2717B38BB0A6@stellar.eclipse.co.uk> From: Stroller To: gentoo-user@lists.gentoo.org In-Reply-To: <0059EB40-8530-454B-B092-ECA76E9F42A2@stellar.eclipse.co.uk> 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:50:15 +0100 References: <201008211525.35115.wonko@wonkology.org> <68A64BAB-F743-4908-A608-7D5549B0444C@stellar.eclipse.co.uk> <201008221226.28193.wonko@wonkology.org> <0059EB40-8530-454B-B092-ECA76E9F42A2@stellar.eclipse.co.uk> X-Mailer: Apple Mail (2.936) X-Archives-Salt: 3c0ddc66-1421-49e6-9b45-f62a4d33e07d X-Archives-Hash: 855101f30f76b5a88467df7ff26e7d86 On 22 Aug 2010, at 20:00, Stroller wrote: > 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. Sorry, this wasn't very clear: If your script contains `while true ... sleep 60` then you'll only need to run it once. Stroller.