summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/autodist.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/autodist.sh b/scripts/autodist.sh
index 68b146c195ef..985b7ecb9997 100644
--- a/scripts/autodist.sh
+++ b/scripts/autodist.sh
@@ -27,6 +27,9 @@ export CFLAGS="-O2 -mcpu=i486 -march=i486"
[ -z "${SYS_PACKAGES}" ] && SYS_PACKAGES=`ls -1 ${PORTDIR}/files/sys-*.packages | sort | tail -1`
[ -z "${KERNEL_SRC}" ] && KERNEL_SRC="/usr/src/`readlink /usr/src/linux`"
[ -z "${KERNEL_VERSION}" ] && KERNEL_VERSION="`echo ${KERNEL_SRC} | sed 's,.*-\([0-9]\.[0-9]\.[0-9]\+\(-ac[0-9]\+\)\?\)$,\1,'`"
+
+[ -z "${INITRD_USE}" ] && INITRD_USE="bootcd lvm ext3"
+
export PORTDIR
export DISTRODIR
export AUTODISTDIR
@@ -65,21 +68,20 @@ mkdir -pv ${ISOROOT}/{doc,gentoo{,/distfiles,/packages{,/All}},isolinux{,/kernel
echo ">>> Building initrd packages..."
mkdir -p ${INITRDROOT}
-ERRQUIT=yes CHECK=no USE=bootcd ROOT="${INITRDROOT}" STEPS="clean unpack compile install qmerge clean" ${PORTDIR}/scripts/autocompile.sh ${ISOINITRD_PACKAGES}
+ERRQUIT=yes CHECK=no USE="${INITRD_USE}" ROOT="${INITRDROOT}" STEPS="clean unpack compile install qmerge clean" ${PORTDIR}/scripts/autocompile.sh ${ISOINITRD_PACKAGES}
if [ ${?} != 0 ]
then
echo "Error building initrd packages, quitting"
exit 1
fi
echo ">>> Cleaning up ${INITRDROOT}/tmp"
-rm -rf ${INITRDROOT}/tmp/*
+rm -rf ${INITRDROOT}/tmp
+mkdir -p ${INITRDROOT}/tmp
+chown root.root ${INITRDROOT}/tmp
+chmod 1777 ${INITRDROOT}/tmp
echo ">>> Setting up initrd..."
find ${INITRDROOT}/etc -name "*._cfg_*" exec rm -vf {} \;
-for dir in etc{,/rc.d{,/config,/init.d,/rc{1,2,3,4,5,boot,halt}}.d}
-do
- cp -v ${PORTDIR}/files/isoinitrd/${dir}/* ${INITRDROOT}/${dir}
-done
ROOT=${INITRDROOT} rc-update autogen boot force
ROOT=${INITRDROOT} rc-update autogen normal force
ROOT=${INITRDROOT} rc-update autogen halt force