This is the long-awaited unionfs code cleanup. All of the unionfs code in genkernel...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 14 Feb 2008 01:07:14 +0000 (01:07 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 14 Feb 2008 01:07:14 +0000 (01:07 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@592 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
gen_cmdline.sh
gen_compile.sh
gen_determineargs.sh
gen_initramfs.sh
gen_initrd.sh
generic/initrd.scripts
generic/linuxrc
genkernel
genkernel.conf
mips/config.sh

index 67f259f52cd18335b1ef855858bbeb85c51b7982..33427062bbb6902bd92b8d8ed8bf277afceb7989 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> gen_cmdline.sh,
+  gen_compile.sh, gen_determineargs.sh, gen_initramfs.sh, gen_initrd.sh,
+  generic/initrd.scripts, generic/linuxrc, genkernel, genkernel.conf,
+  mips/config.sh:
+  This is the long-awaited unionfs code cleanup. All of the unionfs code in
+  genkernel has been removed.
+
   07 Feb 2008; Andrew Gaffney <agaffney@gentoo.org> gen_determineargs.sh:
   Fix two calls to set_config_with_override on CMD_KERNCACHE and some
   indentation weirdness
index 55e306353321df22795dd399e91fb71771d9f2c3..7a962cbf322a533733c5d08b71c65111e827d6ae 100755 (executable)
@@ -211,17 +211,6 @@ parse_cmdline() {
                        echo
                        print_warning 1 "Please use --evms, as --evms2 is deprecated."
                        ;;
-               --unionfs)
-                       CMD_UNIONFS=1
-                       print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
-                       echo
-                       print_warning 1 "WARNING: unionfs support is in active development and is not meant for general"
-                       print_warning 1 "use."
-                       print_warning 1 "Bug Reports without patches/fixes will be ignored."
-                       print_warning 1 "Use at your own risk as this could blow up your system."
-                       print_warning 1 "This code is subject to change at any time."
-                       echo
-                       ;;
                --lvm)
                        CMD_LVM=1
                        print_info 2 "CMD_LVM: ${CMD_LVM}"
index 8ea934e878bef82e6573410000e57dc3f628dc54..6898cf3858a815a1df6724753fc448dd0a6219f7 100644 (file)
@@ -324,106 +324,6 @@ compile_kernel() {
        fi
 }
 
-compile_unionfs_modules() {
-       if [ ! -f "${UNIONFS_MODULES_BINCACHE}" ]
-       then
-               [ -f "${UNIONFS_SRCTAR}" ] ||
-                       gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!"
-               cd "${TEMP}"
-               rm -rf ${UNIONFS_DIR} > /dev/null
-               rm -rf unionfs* > /dev/null
-               mkdir unionfs
-               /bin/tar xzpf ${UNIONFS_SRCTAR} ||
-                       gen_die 'Could not extract unionfs source tarball!'
-               [ -d "${UNIONFS_DIR}" ] ||
-                       gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!'
-               cd "${UNIONFS_DIR}"
-               print_info 1 'unionfs modules: >> Compiling...'
-               echo "LINUXSRC=${KERNEL_DIR}" >> fistdev.mk
-               echo 'TOPINC=-I$(LINUXSRC)/include' >> fistdev.mk
-               echo "MODDIR= /lib/modules/${KV}" >> fistdev.mk
-               echo "KVERS=${KV}" >> fistdev.mk
-               echo "KERNELVERSION=${KV}" >> fistdev.mk
-               # Fix for hardened/selinux systems to have extened attributes
-               # per r2d2's request.  Also add -DUNIONFS_UNSUPPORTED for 2.6.16
-               echo "EXTRACFLAGS=-DUNIONFS_XATTR -DFIST_SETXATTR_CONSTVOID -DUNIONFS_UNSUPPORTED" \
-                       >> fistdev.mk
-               # Here we do something really nasty and disable debugging, along with
-               # change our default CFLAGS
-               echo "UNIONFS_DEBUG_CFLAG=-DUNIONFS_NDEBUG" >> fistdev.mk
-               echo "UNIONFS_OPT_CFLAG= -O2 -pipe" >> fistdev.mk
-
-               if [ "${PAT}" -ge '6' ]
-               then
-                       # ARCH is used by unionfs - and conflicts with genkernel
-                       ARCH_PUSH=${ARCH}
-                       unset ARCH
-                       # Compile unionfs module within the unionfs
-                       # environment not within the kernelsrc dir
-                       make unionfs.ko || gen_die 'failed to compile unionfs'
-                       ARCH=${ARCH_PUSH}
-               else
-                       gen_die 'unionfs is only supported on 2.6 targets'
-               fi
-               print_info 1 'unionfs: >> Copying to cache...'
-       
-               mkdir -p ${TEMP}/unionfs/lib/modules/${KV}/kernel/fs/unionfs
-               
-               if [ -f unionfs.ko ]
-               then 
-                       cp -f unionfs.ko ${TEMP}/unionfs/lib/modules/${KV}/kernel/fs/unionfs
-               else
-                       cp -f unionfs.o ${TEMP}/unionfs/lib/modules/${KV}/kernel/fs/unionfs
-               fi
-       
-               cd ${TEMP}/unionfs
-               /bin/tar -cjf "${UNIONFS_MODULES_BINCACHE}" . ||
-                       gen_die 'Could not create unionfs modules binary cache'
-       
-               cd "${TEMP}"
-               rm -rf "${UNIONFS_DIR}" > /dev/null
-               rm -rf unionfs > /dev/null
-       fi
-}
-
-compile_unionfs_utils() {
-       if [ ! -f "${UNIONFS_BINCACHE}" ]
-       then
-               [ -f "${UNIONFS_SRCTAR}" ] ||
-                       gen_die "Could not find unionfs source tarball: ${UNIONFS_SRCTAR}!"
-               cd "${TEMP}"
-               rm -rf ${UNIONFS_DIR} > /dev/null
-               rm -rf unionfs* > /dev/null
-               mkdir -p unionfs/sbin
-               /bin/tar -zxpf ${UNIONFS_SRCTAR} ||
-                       gen_die 'Could not extract unionfs source tarball!'
-               [ -d "${UNIONFS_DIR}" ] ||
-                       gen_die 'Unionfs directory ${UNIONFS_DIR} is invalid!'
-               cd "${UNIONFS_DIR}"
-               print_info 1 'unionfs tools: >> Compiling...'
-               sed -i utils/Makefile -e 's|${CC} -o|${CC} -static -o|g'
-               sed -i Makefile -e 's|${CC} -o|${CC} -static -o|g'
-               compile_generic utils utils
-
-               if [ ! -e "uniondbg" ]; then
-                       cd utils
-               fi
-               print_info 1 'unionfs: >> Copying to cache...'
-               strip uniondbg unionctl
-               cp uniondbg ${TEMP}/unionfs/sbin/ || 
-                       gen_die 'Could not copy the uniondbg binary to the tmp directory'
-               cp unionctl ${TEMP}/unionfs/sbin/ ||
-                       gen_die 'Could not copy the unionctl binary to the tmp directory'
-               cd ${TEMP}/unionfs
-               /bin/tar -cjf "${UNIONFS_BINCACHE}" . ||
-                       gen_die 'Could not create unionfs tools binary cache'
-               
-               cd "${TEMP}"
-               rm -rf "${UNIONFS_DIR}" > /dev/null
-               rm -rf unionfs > /dev/null
-       fi
-}
-
 compile_busybox() {
        [ -f "${BUSYBOX_SRCTAR}" ] ||
                gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"
index ac4041258477f228794e59529702b2d4bf185477..31f000ee953182caa26491a45bcbe087b6dea969 100644 (file)
@@ -109,7 +109,6 @@ determine_real_args() {
        set_config_with_override 1 OLDCONFIG            CMD_OLDCONFIG
        set_config_with_override 1 LVM                  CMD_LVM
        set_config_with_override 1 EVMS                 CMD_EVMS
-       set_config_with_override 1 UNIONFS              CMD_UNIONFS
        set_config_with_override 1 DMRAID               CMD_DMRAID
        set_config_with_override 1 BUSYBOX              CMD_BUSYBOX              "yes"
        set_config_with_override 1 DEVFS                CMD_UNDEFINED_CMD        "no"
@@ -128,8 +127,6 @@ determine_real_args() {
        DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
        LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
        DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`
-       UNIONFS_BINCACHE=`cache_replace "${UNIONFS_BINCACHE}"`
-       UNIONFS_MODULES_BINCACHE=`cache_replace "${UNIONFS_MODULES_BINCACHE}"`
        BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
   
        DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
@@ -138,8 +135,6 @@ determine_real_args() {
        DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"`
        LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"`
        DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"`
-       UNIONFS_BINCACHE=`arch_replace "${UNIONFS_BINCACHE}"`
-       UNIONFS_MODULES_BINCACHE=`arch_replace "${UNIONFS_MODULES_BINCACHE}"`
        BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
        
 
@@ -205,5 +200,4 @@ determine_real_args() {
        fi
        
        get_KV
-       UNIONFS_MODULES_BINCACHE=`kv_replace "${UNIONFS_MODULES_BINCACHE}"`
 }
index 1833f82b71c8dc0641003de5a6775545edcff56c..014de67de21bfe077df19f0cb2efb6ffa91ed9a8 100644 (file)
@@ -72,36 +72,6 @@ append_blkid(){
        rm -rf "${TEMP}/initramfs-blkid-temp" > /dev/null
 }
 
-append_unionfs_modules(){
-       if [ -d "${TEMP}/initramfs-unionfs-modules-temp" ]
-       then
-               rm -r "${TEMP}/initramfs-unionfs-modules-temp/"
-       fi
-       print_info 1 'UNIONFS MODULES: Adding support (compiling)...'
-       compile_unionfs_modules
-       mkdir -p "${TEMP}/initramfs-unionfs-modules-temp/"
-       /bin/tar -jxpf "${UNIONFS_MODULES_BINCACHE}" -C "${TEMP}/initramfs-unionfs-modules-temp" ||
-               gen_die "Could not extract unionfs modules binary cache!";
-       cd "${TEMP}/initramfs-unionfs-modules-temp/"
-       find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
-       rm -r "${TEMP}/initramfs-unionfs-modules-temp/"
-}
-
-append_unionfs_tools(){
-       if [ -d "${TEMP}/initramfs-unionfs-tools-temp" ]
-       then
-               rm -r "${TEMP}/initramfs-unionfs-tools-temp/"
-       fi
-       print_info 1 'UNIONFS TOOLS: Adding support (compiling)...'
-       compile_unionfs_utils
-       mkdir -p "${TEMP}/initramfs-unionfs-tools-temp/bin/"
-       /bin/tar -jxpf "${UNIONFS_BINCACHE}" -C "${TEMP}/initramfs-unionfs-tools-temp" ||
-               gen_die "Could not extract unionfs tools binary cache!";
-       cd "${TEMP}/initramfs-unionfs-tools-temp/"
-       find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
-       rm -r "${TEMP}/initramfs-unionfs-tools-temp/"
-}
-
 #append_suspend(){
 #      if [ -d "${TEMP}/initramfs-suspend-temp" ];
 #      then
@@ -454,8 +424,6 @@ create_initramfs() {
        append_data 'auxilary'
        append_data 'busybox' "${BUSYBOX}"
 #      append_data 'devfs' "${DEVFS}"
-       append_data 'unionfs_modules' "${UNIONFS}"
-       append_data 'unionfs_tools' "${UNIONFS}"
        append_data 'lvm' "${LVM}"
        append_data 'dmraid' "${DMRAID}"
        append_data 'evms' "${EVMS}"
index fc42f9340e52f30e9814c5739fdd4d6794613a2b..2cd02ac29dcd79d8f1108e72fbd0793039e8c6f7 100644 (file)
@@ -90,24 +90,6 @@ create_base_initrd_sys() {
                chmod +x "${TEMP}/initrd-temp/bin/devfsd"
        fi
 
-       #unionfs modules
-       if [ "${UNIONFS}" -eq '1' ]
-       then
-               print_info 1 'UNIONFS MODULES: Adding support (compiling)...'
-               compile_unionfs_modules
-               /bin/tar -jxpf "${UNIONFS_MODULES_BINCACHE}" -C "${TEMP}/initrd-temp" ||
-                       gen_die "Could not extract unionfs modules binary cache!";
-       fi
-       
-       #unionfs utils
-       if [ "${UNIONFS}" -eq '1' ]
-       then
-               print_info 1 'UNIONFS TOOLS: Adding support (compiling)...'
-               compile_unionfs_utils
-               /bin/tar -jxpf "${UNIONFS_BINCACHE}" -C "${TEMP}/initrd-temp" ||
-                       gen_die "Could not extract unionfs tools binary cache!";
-       fi
-
        # DMRAID 
        if [ "${DMRAID}" -eq '1' ]
        then
index d0b8c43fa57748c553365fda49055b79fdf34b32..fa896a9ee51e13ea75f53e381dce7c827d12f719 100644 (file)
@@ -195,21 +195,6 @@ mount_sysfs() {
        fi
 }
 
-# Insert a directory tree $2 to an union specified by $1
-# Top-level read-write branch is specified by it's index 0
-# $1 = union absolute path (starting with /)
-# $2 = path to data directory
-#
-union_insert_dir() {
-       # 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() {
 
        if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts
@@ -906,62 +891,6 @@ rundebugshell() {
        fi
 }
 
-setup_unionfs() {
-       if [ "${USE_UNIONFS_NORMAL}" = '1' ]
-       then
-               # Directory used for rw changes in union mount filesystem
-               UNION=/union
-               MEMORY=/memory
-               if [ -z "$UID" ]
-               then
-                       CHANGES=$MEMORY/unionfs_changes/default
-               else
-                       CHANGES=$MEMORY/unionfs_changes/$UID
-               fi
-
-               mkdir -p ${MEMORY}
-               mkdir -p ${UNION}
-               good_msg "Loading unionfs module"
-               modprobe unionfs > /dev/null 2>&1
-               if [ -n "${UNIONFS}" ]
-               then
-                       CHANGESDEV=${UNIONFS}
-                       good_msg "mounting $CHANGESDEV to $MEMORY for unionfs support"
-                       mount -t auto $CHANGESDEV $MEMORY
-                       # mount tmpfs only in the case when changes= boot parameter was
-                       # empty or we were not able to mount the storage device
-                       ret=$?
-                       if [ "${ret}" -ne 0 ]
-                       then
-                               bad_msg "mount of $CHANGESDEV failed falling back to ramdisk based unionfs"
-                               mount -t tmpfs tmpfs $MEMORY
-                       fi
-                       if [ "${CDROOT}" -eq '1' -a ! -f ${MEMORY}/livecd.unionfs  ]
-                       then
-                               umount $MEMORY
-                               bad_msg "failed to find livecd.unionfs file on $CHANGESDEV"
-                               bad_msg "create a livecd.unionfs file on this device if you wish to use it for unionfs"
-                               bad_msg "falling back to ramdisk based unionfs for safety"
-                               mount -t tmpfs tmpfs $MEMORY
-                       fi
-               else 
-                       good_msg "Mounting ramdisk to $MEMORY for unionfs support..."
-                       mount -t tmpfs tmpfs $MEMORY 
-               fi 
-
-               mkdir -p $CHANGES 
-               mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
-               ret=$?
-               if [ "${ret}" -ne 0 ]
-               then 
-                       bad_msg "Can't setup union ${UNION} in directory!"
-                       USE_UNIONFS_NORMAL=0
-               fi
-       else
-               USE_UNIONFS_NORMAL=0
-       fi
-}
-
 swsusp_resume() {
        ### determine swap resume partition
        local device=$(ls -l "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \  -f 6-7 | sed 's/,\ */:/')
index 0962df17b6d79e23a79ee648512391e6dcc61048..7cf09f5d6b287d9d38bae5950c37e503aa9963f5 100644 (file)
@@ -81,33 +81,6 @@ do
                looptype\=*)
                        LOOPTYPE=`parse_opt "${x}"`
                ;;
-               unionfs)
-                       if [ ! -x /sbin/unionctl ]
-                       then
-                               USE_UNIONFS_NORMAL=0
-                               bad_msg 'Unionctl not found: aborting use of unionfs!'
-                       else
-                               USE_UNIONFS_NORMAL=1
-                       fi
-               ;;
-               unionfs\=*)
-                       if [ ! -x /sbin/unionctl ]
-                       then
-                               USE_UNIONFS_NORMAL=0
-                               bad_msg 'Unionctl not found: aborting use of unionfs!'
-                       else
-                               USE_UNIONFS_NORMAL=1
-                               CMD_UNIONFS=`parse_opt "${x}"`
-                               echo ${CMD_UNIONFS}|grep , >/dev/null 2>&1
-                               if [ "$?" -eq '0' ]
-                               then
-                                       UID=`echo ${CMD_UNIONFS#*,}`
-                                       UNIONFS=`echo ${CMD_UNIONFS%,*}`
-                               else
-                                       UNIONFS=${CMD_UNIONFS}
-                               fi
-                       fi
-               ;;
                # Start Volume manager options 
                dolvm)
                        USE_LVM_NORMAL=1
@@ -274,27 +247,16 @@ then
        fi
 fi
 
-# Set up unionfs
 mkdir -p ${NEW_ROOT}
-setup_unionfs
-
-if [ "${USE_UNIONFS_NORMAL}" = '1' ]
-then
-       CHROOT=${UNION}
-else
-       CHROOT=${NEW_ROOT}
-fi
+CHROOT=${NEW_ROOT}
 
 # Run debug shell if requested
 rundebugshell
 
 if [ "${CDROOT}" = '1' ]
 then
-       if [ ! "${USE_UNIONFS_NORMAL}" = '1' ]
-       then
-               good_msg "Making tmpfs for ${NEW_ROOT}"
-               mount -t tmpfs tmpfs ${NEW_ROOT}
-       fi
+       good_msg "Making tmpfs for ${NEW_ROOT}"
+       mount -t tmpfs tmpfs ${NEW_ROOT}
        
        for i in dev mnt mnt/cdrom mnt/livecd mnt/key tmp tmp/.initrd mnt/gentoo sys
        do
@@ -608,15 +570,6 @@ then
 # End cdrom looptype determination and mounting if necessary
 #
 
-       if [ "${USE_UNIONFS_NORMAL}" = '1' ]
-       then
-               union_insert_dir ${UNION} ${NEW_ROOT}/${FS_LOCATION}
-               
-               # Make sure fstab notes livecd is mounted ro.  Makes system skip remount which fails on unionfs dirs.
-               sed -e 's|\(.*\s/\s*tmpfs\s*\)defaults\(.*\)|\1defaults,ro\2|' /${UNION}/etc/fstab > /${UNION}/etc/fstab.new
-               mv /${UNION}/etc/fstab.new /${UNION}/etc/fstab
-       fi
-
        # Unpacking additional packages from NFS mount
        # This is useful for adding kernel modules to /lib
        # We do this now, so that additional packages can add whereever they want.
@@ -634,59 +587,56 @@ then
        fi
 
        
-       if [ "${USE_UNIONFS_NORMAL}" != '1' ]
-       then
-               good_msg "Copying read-write image contents to tmpfs"
-               # Copy over stuff that should be writable
-               (cd ${NEW_ROOT}/${FS_LOCATION}; cp -a ${ROOT_TREES} ${NEW_ROOT})
+       good_msg "Copying read-write image contents to tmpfs"
+       # Copy over stuff that should be writable
+       (cd ${NEW_ROOT}/${FS_LOCATION}; cp -a ${ROOT_TREES} ${NEW_ROOT})
 
-               # Now we do the links.
-               for x in ${ROOT_LINKS}
-               do
-                       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
-                               find "${NEW_ROOT}/${FS_LOCATION}/${x}" -type d 2>/dev/null | while read directory
-                               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
-                                       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
-
-               if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ]
+       # Now we do the links.
+       for x in ${ROOT_LINKS}
+       do
+               if [ -L "${NEW_ROOT}/${FS_LOCATION}/${x}" ]
                then
-                       sleep 10
+                       ln -s "`readlink ${NEW_ROOT}/${FS_LOCATION}/${x}`" "${x}" 2>/dev/null
+               else
+                       # List all subdirectories of x
+                       find "${NEW_ROOT}/${FS_LOCATION}/${x}" -type d 2>/dev/null | while read directory
+                       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
+                               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
-               mkdir initrd proc tmp sys 2>/dev/null
-               chmod 1777 tmp
+       done
+
+       if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ]
+       then
+               sleep 10
        fi
-       
+       mkdir initrd proc tmp sys 2>/dev/null
+       chmod 1777 tmp
+
        #UML=`cat /proc/cpuinfo|grep UML|sed -e 's|model name.*: ||'`
        #if [ "${UML}" = 'UML' ]
        #then
@@ -701,12 +651,6 @@ then
        then
                sleep 10
        fi
-else
-       if [ "${USE_UNIONFS_NORMAL}" = '1' ]
-       then
-               union_insert_dir ${UNION} ${NEW_ROOT}
-               mkdir -p ${UNION}/tmp/.initrd
-       fi
 fi
 
 # Execute script on the cdrom just before boot to update things if necessary
@@ -720,16 +664,6 @@ fi
 
 verbose_kmsg
 
-# Move the /memory mount point to what will be the system root so that 
-# init scripts will be able to unmount it properly at next reboot
-#
-# Eventually, all "unions over /" mounts should go in that /.unions/
-if [ "${USE_UNIONFS_NORMAL}" = '1' ]
-then
-       mkdir -p /${CHROOT}/.unions/memory 2>/dev/null
-       mount -o move /memory /${CHROOT}/.unions/memory || echo '*: Failed to move unionfs /memory into the system root!'
-fi
-
 if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ]
 then
        [ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
index 578492f01b675ba5c5fffeae82cc048db2674c1a..e88bb6b6cd3a835e39c9af8310e1b48a137197b0 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -396,8 +396,6 @@ then
        [ "${EVMS}" -eq '1' ] && print_info 1 'add "doevms" for evms support'
        [ "${DMRAID}" -eq '1' ] && print_info 1 'add "dodmraid" for dmraid support'
        [ "${DMRAID}" -eq '1' ] && print_info 1 '       or "dodmraid=<additional options>"'
-       [ "${UNIONFS}" -eq '1' ] && print_info 1 'add "unionfs" for unionfs support'
-       [ "${UNIONFS}" -eq '1' ] && print_info 1 '      or "unionfs=<block_device>"'
 fi
 
 [ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR}
index c61a398fdb74df1e590db6dc660a996aa2ce7033..45b967cfd07e18c456f21c699ac7e082e25cfe32 100755 (executable)
@@ -59,10 +59,6 @@ USECOLOR="yes"
 # should run "emerge evms" first.
 # EVMS="no"
 
-# UnionFS support.  Under active development.  Do not use unless you are working
-# on developing this feature.
-# UNIONFS="no"
-
 # Add DMRAID support.
 # DMRAID="no"
 
@@ -162,14 +158,6 @@ DMRAID_DIR="dmraid/${DMRAID_VER}"
 DMRAID_SRCTAR="${GK_SHARE}/pkg/dmraid-${DMRAID_VER}.tar.bz2"
 DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2"
 
-# Kernel Version Compatibility
-# (from http://www.am-utils.org/project-unionfs.html)
-UNIONFS_VER="VERSION_UNIONFS"
-UNIONFS_DIR="unionfs-${UNIONFS_VER}"
-UNIONFS_SRCTAR="${GK_SHARE}/pkg/unionfs-${UNIONFS_VER}.tar.gz"
-UNIONFS_BINCACHE="%%CACHE%%/unionfs-${UNIONFS_VER}-tools-%%ARCH%%.tar.bz2"
-UNIONFS_MODULES_BINCACHE="%%CACHE%%/unionfs-${UNIONFS_VER}-modules-%%KV%%-%%ARCH%%.tar.bz2"
-
 E2FSPROGS_VER="VERSION_E2FSPROGS"
 E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}"
 E2FSPROGS_SRCTAR="${GK_SHARE}/pkg/e2fsprogs-${E2FSPROGS_VER}.tar.gz"
index b8b11318310eb319f459e679707556b5834055b7..3a54c46193fd3fbf821e49a6dcefc104f3024d85 100644 (file)
@@ -12,7 +12,6 @@ COMPRESS_INITRD="yes"
 USECOLOR="yes"
 NOINITRDMODULES="yes"
 BUSYBOX=1
-UNIONFS=0
 DMRAID=0
 DISKLABEL=0