This is the long-awaited unionfs code cleanup. All of the unionfs code in genkernel has been removed.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@592 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Chris Gianelloni 17 years ago
parent 74ebf6cd74
commit a479c34552

@ -2,6 +2,13 @@
# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $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: 07 Feb 2008; Andrew Gaffney <agaffney@gentoo.org> gen_determineargs.sh:
Fix two calls to set_config_with_override on CMD_KERNCACHE and some Fix two calls to set_config_with_override on CMD_KERNCACHE and some
indentation weirdness indentation weirdness

@ -211,17 +211,6 @@ parse_cmdline() {
echo echo
print_warning 1 "Please use --evms, as --evms2 is deprecated." 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) --lvm)
CMD_LVM=1 CMD_LVM=1
print_info 2 "CMD_LVM: ${CMD_LVM}" print_info 2 "CMD_LVM: ${CMD_LVM}"

@ -324,106 +324,6 @@ compile_kernel() {
fi 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() { compile_busybox() {
[ -f "${BUSYBOX_SRCTAR}" ] || [ -f "${BUSYBOX_SRCTAR}" ] ||
gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!" gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"

@ -109,7 +109,6 @@ determine_real_args() {
set_config_with_override 1 OLDCONFIG CMD_OLDCONFIG set_config_with_override 1 OLDCONFIG CMD_OLDCONFIG
set_config_with_override 1 LVM CMD_LVM set_config_with_override 1 LVM CMD_LVM
set_config_with_override 1 EVMS CMD_EVMS 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 DMRAID CMD_DMRAID
set_config_with_override 1 BUSYBOX CMD_BUSYBOX "yes" set_config_with_override 1 BUSYBOX CMD_BUSYBOX "yes"
set_config_with_override 1 DEVFS CMD_UNDEFINED_CMD "no" 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}"` DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"` LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
DMRAID_BINCACHE=`cache_replace "${DMRAID_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}"` BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"` DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
@ -138,8 +135,6 @@ determine_real_args() {
DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"` DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"`
LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"` LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"`
DMRAID_BINCACHE=`arch_replace "${DMRAID_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}"` BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
@ -205,5 +200,4 @@ determine_real_args() {
fi fi
get_KV get_KV
UNIONFS_MODULES_BINCACHE=`kv_replace "${UNIONFS_MODULES_BINCACHE}"`
} }

@ -72,36 +72,6 @@ append_blkid(){
rm -rf "${TEMP}/initramfs-blkid-temp" > /dev/null 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(){ #append_suspend(){
# if [ -d "${TEMP}/initramfs-suspend-temp" ]; # if [ -d "${TEMP}/initramfs-suspend-temp" ];
# then # then
@ -454,8 +424,6 @@ create_initramfs() {
append_data 'auxilary' append_data 'auxilary'
append_data 'busybox' "${BUSYBOX}" append_data 'busybox' "${BUSYBOX}"
# append_data 'devfs' "${DEVFS}" # append_data 'devfs' "${DEVFS}"
append_data 'unionfs_modules' "${UNIONFS}"
append_data 'unionfs_tools' "${UNIONFS}"
append_data 'lvm' "${LVM}" append_data 'lvm' "${LVM}"
append_data 'dmraid' "${DMRAID}" append_data 'dmraid' "${DMRAID}"
append_data 'evms' "${EVMS}" append_data 'evms' "${EVMS}"

@ -90,24 +90,6 @@ create_base_initrd_sys() {
chmod +x "${TEMP}/initrd-temp/bin/devfsd" chmod +x "${TEMP}/initrd-temp/bin/devfsd"
fi 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 # DMRAID
if [ "${DMRAID}" -eq '1' ] if [ "${DMRAID}" -eq '1' ]
then then

@ -195,21 +195,6 @@ mount_sysfs() {
fi 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() { findnfsmount() {
if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts
@ -906,62 +891,6 @@ rundebugshell() {
fi 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() { swsusp_resume() {
### determine swap resume partition ### determine swap resume partition
local device=$(ls -l "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \ -f 6-7 | sed 's/,\ */:/') local device=$(ls -l "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \ -f 6-7 | sed 's/,\ */:/')

@ -81,33 +81,6 @@ do
looptype\=*) looptype\=*)
LOOPTYPE=`parse_opt "${x}"` 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 # Start Volume manager options
dolvm) dolvm)
USE_LVM_NORMAL=1 USE_LVM_NORMAL=1
@ -274,27 +247,16 @@ then
fi fi
fi fi
# Set up unionfs
mkdir -p ${NEW_ROOT} mkdir -p ${NEW_ROOT}
setup_unionfs CHROOT=${NEW_ROOT}
if [ "${USE_UNIONFS_NORMAL}" = '1' ]
then
CHROOT=${UNION}
else
CHROOT=${NEW_ROOT}
fi
# Run debug shell if requested # Run debug shell if requested
rundebugshell rundebugshell
if [ "${CDROOT}" = '1' ] if [ "${CDROOT}" = '1' ]
then then
if [ ! "${USE_UNIONFS_NORMAL}" = '1' ] good_msg "Making tmpfs for ${NEW_ROOT}"
then mount -t tmpfs tmpfs ${NEW_ROOT}
good_msg "Making tmpfs for ${NEW_ROOT}"
mount -t tmpfs tmpfs ${NEW_ROOT}
fi
for i in dev mnt mnt/cdrom mnt/livecd mnt/key tmp tmp/.initrd mnt/gentoo sys for i in dev mnt mnt/cdrom mnt/livecd mnt/key tmp tmp/.initrd mnt/gentoo sys
do do
@ -608,15 +570,6 @@ then
# End cdrom looptype determination and mounting if necessary # 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 # Unpacking additional packages from NFS mount
# This is useful for adding kernel modules to /lib # This is useful for adding kernel modules to /lib
# We do this now, so that additional packages can add whereever they want. # We do this now, so that additional packages can add whereever they want.
@ -634,58 +587,55 @@ then
fi fi
if [ "${USE_UNIONFS_NORMAL}" != '1' ] good_msg "Copying read-write image contents to tmpfs"
then # Copy over stuff that should be writable
good_msg "Copying read-write image contents to tmpfs" (cd ${NEW_ROOT}/${FS_LOCATION}; cp -a ${ROOT_TREES} ${NEW_ROOT})
# 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 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 fi
mkdir initrd proc tmp sys 2>/dev/null done
chmod 1777 tmp
if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ]
then
sleep 10
fi fi
mkdir initrd proc tmp sys 2>/dev/null
chmod 1777 tmp
#UML=`cat /proc/cpuinfo|grep UML|sed -e 's|model name.*: ||'` #UML=`cat /proc/cpuinfo|grep UML|sed -e 's|model name.*: ||'`
#if [ "${UML}" = 'UML' ] #if [ "${UML}" = 'UML' ]
@ -701,12 +651,6 @@ then
then then
sleep 10 sleep 10
fi fi
else
if [ "${USE_UNIONFS_NORMAL}" = '1' ]
then
union_insert_dir ${UNION} ${NEW_ROOT}
mkdir -p ${UNION}/tmp/.initrd
fi
fi fi
# Execute script on the cdrom just before boot to update things if necessary # Execute script on the cdrom just before boot to update things if necessary
@ -720,16 +664,6 @@ fi
verbose_kmsg 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' ] if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ]
then then
[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1 [ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1

@ -396,8 +396,6 @@ then
[ "${EVMS}" -eq '1' ] && print_info 1 'add "doevms" for evms support' [ "${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 'add "dodmraid" for dmraid support'
[ "${DMRAID}" -eq '1' ] && print_info 1 ' or "dodmraid=<additional options>"' [ "${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 fi
[ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR} [ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR}

@ -59,10 +59,6 @@ USECOLOR="yes"
# should run "emerge evms" first. # should run "emerge evms" first.
# EVMS="no" # EVMS="no"
# UnionFS support. Under active development. Do not use unless you are working
# on developing this feature.
# UNIONFS="no"
# Add DMRAID support. # Add DMRAID support.
# DMRAID="no" # DMRAID="no"
@ -162,14 +158,6 @@ DMRAID_DIR="dmraid/${DMRAID_VER}"
DMRAID_SRCTAR="${GK_SHARE}/pkg/dmraid-${DMRAID_VER}.tar.bz2" DMRAID_SRCTAR="${GK_SHARE}/pkg/dmraid-${DMRAID_VER}.tar.bz2"
DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.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_VER="VERSION_E2FSPROGS"
E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}" E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}"
E2FSPROGS_SRCTAR="${GK_SHARE}/pkg/e2fsprogs-${E2FSPROGS_VER}.tar.gz" E2FSPROGS_SRCTAR="${GK_SHARE}/pkg/e2fsprogs-${E2FSPROGS_VER}.tar.gz"

@ -12,7 +12,6 @@ COMPRESS_INITRD="yes"
USECOLOR="yes" USECOLOR="yes"
NOINITRDMODULES="yes" NOINITRDMODULES="yes"
BUSYBOX=1 BUSYBOX=1
UNIONFS=0
DMRAID=0 DMRAID=0
DISKLABEL=0 DISKLABEL=0

Loading…
Cancel
Save