Adding yet another patch from Fabio Erculiani <lxnay@lxnaydesign.net> from bug #152945.
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 14 Feb 2007 20:54:36 +0000 (20:54 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 14 Feb 2007 20:54:36 +0000 (20:54 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@487 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
generic/initrd.scripts

index 4e3fa6a2f741524de39fc2cf2dcc5300e22988ef..8a8e022af1447e80b2c926fb20ea44a8ab43c7c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  14 Feb 2007; Chris Gianelloni <wolf31o2@gentoo.org>
+  generic/initrd.scripts:
+  Adding yet another patch from Fabio Erculiani <lxnay@lxnaydesign.net> from
+  bug #152945.
+
   12 Feb 2007; Chris Gianelloni <wolf31o2@gentoo.org>
   generic/initrd.scripts, generic/linuxrc, genkernel:
   Added a non-braindead version of a patch provided by Fabio Erculiani
index 077d39673d7dd1504a23f6288a05141555539558..f1caef6d2a8da7ab5bcef85e73b6dc8f0cb23b87 100644 (file)
@@ -147,11 +147,13 @@ mount_sysfs() {
 # $2 = path to data directory
 #
 union_insert_dir() {
-   /sbin/unionctl $1 --add --after 0 --mode ro $2
-   if [ $? = '0' ]
-   then
-       good_msg "Addition of $2 to $1 successful"
-   fi
+       # detect branch 0 because newer unionfs doesn't support "0,1,2"
+       BRANCH_0="/"$(/sbin/unionctl $1 --list | cut -d/ -f2- | cut -d'(' -f1)
+       /sbin/unionctl $1 --add --after $BRANCH_0 --mode ro $2
+       if [ $? = '0' ]
+       then
+               good_msg "Addition of $2 to $1 after branch $BRANCH_0 successful"
+       fi
 }
 
 findnfsmount() {