From owner-freebsd-rc@FreeBSD.ORG Mon Oct 11 04:20:02 2010 Return-Path: Delivered-To: rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655A2106564A for ; Mon, 11 Oct 2010 04:20:02 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 29DDE8FC0C for ; Mon, 11 Oct 2010 04:20:01 +0000 (UTC) Received: by iwn8 with SMTP id 8so4059509iwn.13 for ; Sun, 10 Oct 2010 21:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=HNrVmcVeiUSQ/H1P4t4J4j2VGzF4cBpBaZ829M677XA=; b=w9tD2HNsUFGMUL1B/VlSoSvDDS22vkbLXk77RKSgcbm2hJkjtj7vtv33z376GL8R8/ X3VvMZVGZU7lFV3F8OMRTaOgXQtoOrufVeCXLhoMp7P6EfZlX0qxC/IrsmDTb/DtZjpy QqZst6ZXs40cHglg95d6k3f4VDPs3kFme55Zc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=bDUs6A3utIZSZH5kUgQa1Vqn6tYBQNzNmS7RMXYxustQonZ2PVHxNTAO8ri4H2B7wL cgReTjngp45LSucglmqA9zh7ykw6VxYTDTZJ/7cFbGT9Z9s1MWiHAqzk3YdTzZ3LoDZD QzuXCtVp3wMtzixlKU6cJkQwsnvbHim2gyJ8A= MIME-Version: 1.0 Received: by 10.231.36.8 with SMTP id r8mr4125004ibd.128.1286768904447; Sun, 10 Oct 2010 20:48:24 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.231.184.3 with HTTP; Sun, 10 Oct 2010 20:48:24 -0700 (PDT) Date: Sun, 10 Oct 2010 20:48:24 -0700 X-Google-Sender-Auth: _zh6OFpMqauLnxYztfGMBwXt4JM Message-ID: From: Garrett Cooper To: rc@FreeBSD.org Content-Type: multipart/mixed; boundary=0021cc0224d275283604924f3b27 Cc: Subject: [PATCH] /etc/rc.d/mdconfig improvements X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 04:20:02 -0000 --0021cc0224d275283604924f3b27 Content-Type: text/plain; charset=ISO-8859-1 Hi RC folks, I was looking at /etc/rc.d/mdconfig* recently, and I thought of two improvements that could be done to the scripts: 1. It's not overly intuitive from the rc.conf manpage that the memory disks need to be defined in /etc/fstab, so I added an error to coach people on what to do 2. There was also a missing guard for around a ${_file} reference where if I did... /dev/md0 /scratch cd9660 rw 0 0 /dev/md1 /scratch2 ufs rw 0 0 mdconfig_md0="-f /scratch/disk.img -t vnode" mdconfig_md1="-t swap -s 1M" ... it would check test for ${_file} twice and fail the second time. The check is benign in most cases, but for completeness it should be fixed as shown above. Could someone please commit the attached patch for me, if no one objects to the change proposed? Thanks, -Garrett --0021cc0224d275283604924f3b27 Content-Type: application/octet-stream; name="etc-rc.d-mdconfig-improvements.diff" Content-Disposition: attachment; filename="etc-rc.d-mdconfig-improvements.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gf4simyp0 SW5kZXg6IGV0Yy9yYy5kL21kY29uZmlnCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGV0Yy9yYy5kL21kY29uZmln CShyZXZpc2lvbiAyMTM2ODApCisrKyBldGMvcmMuZC9tZGNvbmZpZwkod29ya2luZyBjb3B5KQpA QCAtMTQ2LDYgKzE0Niw4IEBACiAJCQlpZiBtb3VudCAtZCAke19kZXZ9IDI+JjEgPi9kZXYvbnVs bDsgdGhlbgogCQkJCWVjaG8gIk1vdW50aW5nICR7X2Rldn0uIgogCQkJCW1vdW50ICR7X2Rldn0K KwkJCWVsc2UKKwkJCQllcnIgMSAiTW91bnRwb2ludCBmb3IgJHtfZGV2fSBub3QgZGVmaW5lZCBp biAvZXRjL2ZzdGFiIgogCQkJZmkKIAkJZmkKIAlkb25lCkluZGV4OiBldGMvcmMuZC9tZGNvbmZp ZzIKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PQotLS0gZXRjL3JjLmQvbWRjb25maWcyCShyZXZpc2lvbiAyMTM2ODApCisr KyBldGMvcmMuZC9tZGNvbmZpZzIJKHdvcmtpbmcgY29weSkKQEAgLTExMyw5ICsxMTMsMTEgQEAK IAogCWZvciBfbWQgaW4gJHtfbWRjb25maWcyX2xpc3R9OyBkbwogCQlpbml0X3ZhcmlhYmxlcyAk e19tZH0KLQkJaWYgWyAhIC1yICR7X2ZpbGV9IF07IHRoZW4KLQkJCWVyciAzICIke19maWxlfSBk b2Vzbid0IGV4aXN0IgotCQkJY29udGludWUKKwkJaWYgWyAiJHt0eXBlfSIgPSAidm5vZGUiIF07 IHRoZW4KKwkJCWlmIFsgISAtciAiJHtfZmlsZX0iIF07IHRoZW4KKwkJCQllcnIgMyAiJHtfZmls ZX0gZG9lc24ndCBleGlzdCIKKwkJCQljb250aW51ZQorCQkJZmkKIAkJZmkKIAkJIyBGaXJzdCBw YXNzOiBjcmVhdGUgbWQoNCkgdm5vZGUgZGV2aWNlcyBmcm9tIGZpbGVzIHN0b3JlZCBvbgogCQkj IG5vbi1yb290IHBhcnRpdGlvbi4gU3dhcCBhbmQgbWFsbG9jIG1kKDQpIGRldmljZXMgaGF2ZSBh bHJlYWR5Cg== --0021cc0224d275283604924f3b27--