Fix CONFIG_PROTECT_MASK support. Thanks to piavlo <piavka@cs.bgu.ac.il> for this...
authorZac Medico <zmedico@gentoo.org>
Thu, 15 Feb 2007 20:21:49 +0000 (20:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 15 Feb 2007 20:21:49 +0000 (20:21 -0000)
svn path=/main/trunk/; revision=5969

bin/etc-update

index 17a008bf677cd00a07b4b0db3c6ee4fdcd24d7ff..b51b1b6701f6f9d4b843baa1f2fa2fc208391dca 100755 (executable)
@@ -60,7 +60,8 @@ function scan() {
                        rpath=$(echo "${file/\/\///}" | sed -e "s:/[^/]*$::")
                        rfile=$(echo "${file/\/\///}" | sed -e "s:^.*/::")
                        for mpath in ${CONFIG_PROTECT_MASK}; do
-                               mpath="${ROOT}${path}"
+                               mpath="${ROOT}${mpath}"
+                               mpath=$(echo ${mpath/\/\///})
                                if [[ "${rpath}" == "${mpath}"* ]]; then
                                        mv ${rpath}/${rfile} ${rpath}/${rfile:10}
                                        break