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 1QqxEw-0008Bm-JU for garchives@archives.gentoo.org; Wed, 10 Aug 2011 01:05:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F245721C1E5; Wed, 10 Aug 2011 01:05:31 +0000 (UTC) Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.216.174]) by pigeon.gentoo.org (Postfix) with ESMTP id A2B4921C427 for ; Wed, 10 Aug 2011 01:04:37 +0000 (UTC) Received: by qyk38 with SMTP id 38so2593037qyk.19 for ; Tue, 09 Aug 2011 18:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=lQ/9R5uoOCyzR2iEIrE0rDcSj5C/PhiyPlr+lhSmfvs=; b=i2qq/wuCAbM82Xntzxtgdy4pyi96zisK+O+CeEhUCEClDFQ6mjy6kV2LHT77KnTPHI cs5wR9qvI4gDqH2KHn7w4SwNtwVsz6Pm6emTFcggqZFt4FZIIG320xuxkAIFr2ZTMalG Bn18RyO6829I67+rmyj76VuCqd4DzEU07eWGg= Received: by 10.142.103.3 with SMTP id a3mr6149160wfc.254.1312938276988; Tue, 09 Aug 2011 18:04:36 -0700 (PDT) Received: from [192.168.247.60] (d207-216-234-202.bchsia.telus.net [207.216.234.202]) by mx.google.com with ESMTPS id s8sm211657wfh.19.2011.08.09.18.04.35 (version=SSLv3 cipher=OTHER); Tue, 09 Aug 2011 18:04:35 -0700 (PDT) Message-ID: <4E41D912.5040509@gmail.com> Date: Tue, 09 Aug 2011 18:04:18 -0700 From: Daniel Frey User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110801 Lightning/1.0b3pre Thunderbird/3.1.10 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: Re: [gentoo-user] Run command after root mounted ro? References: <4E418AD8.7070707@gmail.com> <4E418F7D.1010806@binarywings.net> In-Reply-To: <4E418F7D.1010806@binarywings.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: 35840b6d90a72672ef3e541c4574152a On 01/-10/37 11:59, Florian Philipp wrote: > Remounting root read-only is done by an init script called mount-ro > which is started in runlevel shutdown. Try to add a custom init script > to your /etc/init.d directory with the following content: > > #!/sbin/runscript > depend() > { > after mount-ro > } > start() > { > ebegin 'Shutting down mdadm' > mdadm --wait-clean --scan > eend $? > } > > Add it to the runlevel with `rc-update add shutdown` and > don't forget to mark it executable. > > Disclaimer: I've not tried this (obviously) and if the script eats your > dog and wreaks your system, it is entirely your fault ;) Thanks, I tried this out, and while it does run after mounting ro, it just hangs. I've noticed that it's supposed to be monitoring /proc/mdstat but it was (presumably) unmounted long ago. I guess I have to do some more experimenting. Dan