Added multilib cdboot patch.
authorChris Gianelloni <wolf31o2@gentoo.org>
Tue, 12 Jul 2005 15:09:38 +0000 (15:09 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Tue, 12 Jul 2005 15:09:38 +0000 (15:09 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@250 67a159dc-881f-0410-a524-ba9dfbe2cb84

generic/initrd.defaults
generic/linuxrc

index 6ab71ba4ec75941bd366c39e7ff32199e6679280..1addb959f619f06b767a8feb9977f4b7e104f7c9 100644 (file)
@@ -60,7 +60,7 @@ then
 fi
 
 QUIET=1
-ROOT_LINKS='bin sbin lib lib64 boot usr opt'
+ROOT_LINKS='bin sbin lib lib32 lib64 boot usr opt'
 ROOT_TREES='etc root home var'
 INSMOD='insmod'
 if [ "${KMINOR}" -gt '4' ]
index 859345a4dfe3fda0357a764108725de5cd42e1f1..59fdff6f577ebfde9e48280dc12f49297af7030c 100644 (file)
@@ -474,35 +474,40 @@ then
                # Now we do the links.
                for x in ${ROOT_LINKS}
                do
-                       # List all subdirectories of x
-                       for directory in `find "${NEW_ROOT}/${FS_LOCATION}/${x}" -type d 2>/dev/null`
-                       do
-                               ## Strip the prefix of the FS_LOCATION
-                               directory=${directory#${NEW_ROOT}/${FS_LOCATION}/}
-
-                               ## Skip this directory if we already linked a parent directory
-                               if [ "${current_parrent}" != '' ]; then
-                                       var=`echo "${directory}" | grep "^${current_parrent}"`
-                                       if [ "${var}" != '' ]; then
-                                               continue
-                                       fi
-                               fi
-                               ## Test if the directory exists already
-                               if [ -e "/${NEW_ROOT}/${directory}" ]
-                               then
-                                       # It does exist, link all the individual files
-                                       for file in `ls /${NEW_ROOT}/${FS_LOCATION}/${directory}`
-                                       do
-                                       if [ ! -d "/${NEW_ROOT}/${FS_LOCATION}/${directory}/${file}" ] && [ ! -e "${NEW_ROOT}/${directory}/${file}" ]; then
-                                                       ln -s "/${FS_LOCATION}/${directory}/${file}" "${directory}/${file}" 2> /dev/null
+                       if [ -L "${NEW_ROOT}/${FS_LOCATION}/${x}" ]
+                       then
+                               ln -s "`readlink ${NEW_ROOT}/${FS_LOCATION}/${x}`" "${x}" 2>/dev/null
+                       else
+                               # List all subdirectories of x
+                               for directory in `find "${NEW_ROOT}/${FS_LOCATION}/${x}" -type d 2>/dev/null`
+                               do
+                                       ## Strip the prefix of the FS_LOCATION
+                                       directory=${directory#${NEW_ROOT}/${FS_LOCATION}/}
+
+                                       ## Skip this directory if we already linked a parent directory
+                                       if [ "${curent_parrent}" != '' ]; then
+                                               var=`echo "${directory}" | grep "^${curent_parrent}"`
+                                               if [ "${var}" != '' ]; then
+                                                       continue
                                                fi
-                                       done
-                               else
-                                       # It does not exist, make a link to the livecd
-                                       ln -s "/${FS_LOCATION}/${directory}" "${directory}" 2> /dev/null
-                                       current_parrent=${directory}
-                               fi
-                       done
+                                       fi
+                                       ## Test if the directory exists already
+                                       if [ -e "/${NEW_ROOT}/${directory}" ]
+                                       then
+                                               # It does exist, link all the individual files
+                                               for file in `ls /${NEW_ROOT}/${FS_LOCATION}/${directory}`
+                                               do
+                                               if [ ! -d "/${NEW_ROOT}/${FS_LOCATION}/${directory}/${file}" ] && [ ! -e "${NEW_ROOT}/${directory}/${file}" ]; then
+                                                               ln -s "/${FS_LOCATION}/${directory}/${file}" "${directory}/${file}" 2> /dev/null
+                                                       fi
+                                               done
+                                       else
+                                               # It does not exist, make a link to the livecd
+                                               ln -s "/${FS_LOCATION}/${directory}" "${directory}" 2>/dev/null
+                                               current_parent=${directory}
+                                       fi
+                               done
+                       fi
                done
 
                mkdir initrd proc tmp sys