Date: Sun, 14 Nov 2010 22:38:01 -0800 From: Garrett Cooper <gcooper@FreeBSD.org> To: rc@freebsd.org Subject: [PATCH] add guard for checking _file in etc/rc.d/mdconfig2 Message-ID: <AANLkTinqv8VHDi1ghtViYmnkdXPpS7KrkhK9t5nkKreR@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
The mdconfig2 script doesn't have a ${type} = vnode guard for
checking whether or not ${_file} is readable. The attached patch fixes
that.
If someone could review and commit this change it would be much appreciated.
Thanks!
-Garrett
[-- Attachment #2 --]
Index: etc/rc.d/mdconfig2
===================================================================
--- etc/rc.d/mdconfig2 (revision 215333)
+++ etc/rc.d/mdconfig2 (working copy)
@@ -113,9 +113,11 @@
for _md in ${_mdconfig2_list}; do
init_variables ${_md}
- if [ ! -r ${_file} ]; then
- err 3 "${_file} doesn't exist"
- continue
+ if [ "${type}" = "vnode" ]; then
+ if [ ! -r "${_file}" ]; then
+ err 3 "${_file} doesn't exist"
+ continue
+ fi
fi
# First pass: create md(4) vnode devices from files stored on
# non-root partition. Swap and malloc md(4) devices have already
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinqv8VHDi1ghtViYmnkdXPpS7KrkhK9t5nkKreR>
