summaryrefslogtreecommitdiff
path: root/src/scripts/13chroot.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:39 +0200
committerDaniel Baumann <daniel@debian.org>2007-09-23 10:04:39 +0200
commitaf04c39b8b9a20d70e7123c57ec175e1b34d7d94 (patch)
treeeae1bc5312b8d6fa8dc5048b172923a01730026b /src/scripts/13chroot.sh
parent9a5955a79f907075d0cde61db6f7d2d605ab3b4a (diff)
downloadlive-build-af04c39b8b9a20d70e7123c57ec175e1b34d7d94.zip
live-build-af04c39b8b9a20d70e7123c57ec175e1b34d7d94.tar.gz
Adding live-package 0.99.20-1.
Diffstat (limited to 'src/scripts/13chroot.sh')
-rw-r--r--src/scripts/13chroot.sh64
1 files changed, 51 insertions, 13 deletions
diff --git a/src/scripts/13chroot.sh b/src/scripts/13chroot.sh
index 06df0b6..5a5298e 100644
--- a/src/scripts/13chroot.sh
+++ b/src/scripts/13chroot.sh
@@ -126,12 +126,39 @@ EOF
Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST_CLONED}` aptitude install --assume-yes"
fi
+ # Install aptitude tasks
+ if [ -n "${LIVE_TASKS}" ]
+ then
+ for TASK in ${LIVE_TASKS}
+ do
+ Chroot_exec "aptitude install --assume-yes ${TASK}"
+ done
+ fi
+
# Install packages list
if [ -n "${LIVE_PACKAGE_LIST}" ]
then
- grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
- Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` aptitude install --assume-yes"
- rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
+ if [ "${LIVE_PACKAGE_LIST}" = "everything" ]
+ then
+ #for FILE in "${LIVE_CHROOT}"/var/lib/apt/lists/*_Packages
+ #do
+ # awk '/Package: / { print $2 }' "${FILE}" | grep -v ".*-dbg$" >> "${LIVE_CHROOT}"/root/everything
+ #done
+
+ #Chroot_exec "xargs --arg-file=/root/everything aptitude install --assume-yes"
+ #rm -f "${LIVE_CHROOT}"/root/everything
+
+ # FIXME
+
+ for SECTION in admin base comm devel doc editors electronics embedded games gnome graphics hamradio interpreters kde libs libdevel mail math misc net news oldlibs otherosfs perl python science shells sound tex text utils web x11
+ do
+ Chroot_exec "aptitude install --assume-yes ~s${SECTION}"
+ done
+ else
+ grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
+ Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` aptitude install --assume-yes"
+ rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
+ fi
fi
# Install extra packages
@@ -140,15 +167,6 @@ EOF
Chroot_exec "aptitude install --assume-yes ${LIVE_PACKAGES}"
fi
- # Install aptitude tasks
- if [ -n "${LIVE_TASKS}" ]
- then
- for TASK in ${LIVE_TASKS}
- do
- Chroot_exec "aptitude install --assume-yes ${TASK}"
- done
- fi
-
# Copy external directory into the chroot
if [ -d "${LIVE_INCLUDE_CHROOT}" ]
then
@@ -178,6 +196,26 @@ EOF
# Save package list
Chroot_exec "dpkg --get-selections" > "${LIVE_ROOT}"/packages.txt
+ # Disable daemons
+ if [ "${LIVE_DAEMONS}" = "no" ]
+ then
+ # Disable all
+ for FILE in "${LIVE_CHROOT}"/etc/init.d/*
+ do
+ Chroot_exec "update-rc.d -f `basename ${FILE}` remove"
+ done
+
+ # Re-enable all required (taken from -f standard chroot)
+ for PACKAGE in casper console-common cron dpkg ifupdown initscripts kbd klogd libc6 libdevmapper1.02 libselinux1 libsepol1 login makedev module-init-tools netbase openbsd-inetd procps sudo sysklogd udev util-linux
+ do
+ # Re-configure if existing
+ if [ -f "${LIVE_CHROOT}"/var/lib/dpkg/info/${PACKAGE}.postinst ]
+ then
+ Chroot_exec "/var/lib/dpkg/info/${PACKAGE}.postinst configure"
+ fi
+ done
+ fi
+
# Add filesystem.manifest
Chroot_exec "dpkg-query -W \*" | awk '$2 ~ /./ {print $1 " " $2 }' > "${LIVE_ROOT}"/filesystem.manifest
@@ -193,7 +231,7 @@ EOF
if [ "${LIVE_FLAVOUR}" = "minimal" ]
then
- rm -f "${LIVE_CHROOT}"/var/lib/apt/lists/*
+ rm -rf "${LIVE_CHROOT}"/var/lib/apt/lists/*
rm -f "${LIVE_CHROOT}"/var/lib/dpkg/available-old
rm -f "${LIVE_CHROOT}"/var/lib/dpkg/diversions-old
rm -f "${LIVE_CHROOT}"/var/lib/dpkg/statoverride-old