Date: Sun, 10 Oct 2010 20:48:24 -0700 From: Garrett Cooper <gcooper@FreeBSD.org> To: rc@FreeBSD.org Subject: [PATCH] /etc/rc.d/mdconfig improvements Message-ID: <AANLkTikEmEJ1fGAQWC_nFk0-DU6kY0hWSqq39YvBAeHN@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikEmEJ1fGAQWC_nFk0-DU6kY0hWSqq39YvBAeHN>