summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/01-chroot.sh65
-rw-r--r--scripts/02-net.sh8
2 files changed, 41 insertions, 32 deletions
diff --git a/scripts/01-chroot.sh b/scripts/01-chroot.sh
index ba5d526..5528d02 100644
--- a/scripts/01-chroot.sh
+++ b/scripts/01-chroot.sh
@@ -96,35 +96,6 @@ Chroot ()
rm ${LIVE_CHROOT}/tmp/preseed
fi
- if [ -z "${LIVE_ROOTFS}" ]
- then
- # Install packages list
- if [ ! -z "${LIVE_PACKAGE_LIST}" ]
- then
- chroots "apt-get install --yes `cat ${LIVE_PACKAGE_LIST}`"
- fi
-
- # Install extra packages
- if [ ! -z "${LIVE_PACKAGES}" ]
- then
- chroots "apt-get install --yes ${LIVE_PACKAGES}"
- fi
- fi
-
- # Copy external path into the chroot
- if [ -d "${LIVE_INCLUDE_ROOTFS}" ]
- then
- cd "${LIVE_INCLUDE_ROOTFS}"
- find . | cpio -pumd "${LIVE_CHROOT}"/
- cd "${OLDPWD}"
- fi
-
- # Execute extra command in the chroot
- if [ ! -z "${LIVE_HOOK}" ]
- then
- chroots "${LIVE_HOOK}"
- fi
-
# Add splashy and conditionally a theme
if [ ! -z "${LIVE_SPLASHY}" ]
then
@@ -151,6 +122,42 @@ Chroot ()
fi
# --- End FIXME ---
+ if [ -z "${LIVE_ROOTFS}" ]
+ then
+ if [ -z "${lIVE_INTERACTIVE}" ]
+ then
+ # Install packages list
+ if [ ! -z "${LIVE_PACKAGE_LIST}" ]
+ then
+ chroots "apt-get install --yes `cat ${LIVE_PACKAGE_LIST}`"
+ fi
+
+ # Install extra packages
+ if [ ! -z "${LIVE_PACKAGES}" ]
+ then
+ chroots "apt-get install --yes ${LIVE_PACKAGES}"
+ fi
+ else
+ # Run aptitude
+ chroots "apt-get install --yes aptitude"
+ chroots "aptitude"
+ fi
+ fi
+
+ # Copy external directory into the chroot
+ if [ -d "${LIVE_INCLUDE_ROOTFS}" ]
+ then
+ cd "${LIVE_INCLUDE_ROOTFS}"
+ find . | cpio -pumd "${LIVE_CHROOT}"/
+ cd "${OLDPWD}"
+ fi
+
+ # Execute extra command in the chroot
+ if [ ! -z "${LIVE_HOOK}" ]
+ then
+ chroots "${LIVE_HOOK}"
+ fi
+
# Clean apt packages cache
rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/*.deb
rm -f "${LIVE_CHROOT}"/var/cache/apt/archives/partial/*.deb
diff --git a/scripts/02-net.sh b/scripts/02-net.sh
index 743d8b2..1736e74 100644
--- a/scripts/02-net.sh
+++ b/scripts/02-net.sh
@@ -7,8 +7,10 @@ Net ()
if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
then
+ mkdir "${LIVE_CHROOT}"/etc/mkinitramfs
+
# Configuring initramfs for NFS
-cat >> "${LIVE_ROOT}"/chroot/etc/mkinitramfs/initramfs.conf << EOF
+cat >> "${LIVE_CHROOT}"/etc/mkinitramfs/initramfs.conf << EOF
MODULES=netboot
BOOT=nfs
EOF
@@ -27,12 +29,12 @@ EOF
then
# Creating tarball
cd "${LIVE_ROOT}" && cd .. && \
- tar cfz netboot.tar.gz "${LIVE_ROOT}" && \
+ tar cfz netboot.tar.gz `basename "${LIVE_ROOT}"` && \
mv netboot.tar.gz "${LIVE_ROOT}"
else
# Creating tarball (debug)
cd "${LIVE_ROOT}" && cd .. && \
- tar cfvz netboot.tar.gz "${LIVE_ROOT}" && \
+ tar cfvz netboot.tar.gz `basename "${LIVE_ROOT}"` && \
mv netboot.tar.gz "${LIVE_ROOT}"
fi
}