From d07fc8ec507981bca3ac6606e5f68cae65c25d54 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Tue, 13 Dec 2005 22:16:51 +0000 Subject: [PATCH] patch from cjwatson to extract multiple initrds on ppc --- livecd.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/livecd.sh b/livecd.sh index 976251e5..24630bb6 100755 --- a/livecd.sh +++ b/livecd.sh @@ -277,8 +277,17 @@ deb-src ${SECSRCMIRROR} ${STE}-security ${COMP} echo set postfix/mailname | chroot ${ROOT} /usr/bin/debconf-communicate postfix fi chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' > livecd.${FS}.manifest - KVER=`chroot ${ROOT} dpkg -l linux-image-2\*|grep ^i|awk '{print $2}'|sed 's/linux-image-//'` - cp ${ROOT}/boot/initrd.img-"$KVER" livecd.${FS}.initrd + KVERS=`chroot ${ROOT} dpkg -l linux-image-2\*|grep ^i|awk '{print $2}'|sed 's/linux-image-//'` + for KVER in ${KVERS}; do + SUBARCH="${KVER#*-*-}" + chroot ${ROOT} update-initramfs -k "${KVER}" -u + cp ${ROOT}/boot/initrd.img-"${KVER}" livecd.${FS}.initrd-"${SUBARCH}" + done + if [ "${KVERS% *}" = "$KVERS" ]; then + # only one kernel + SUBARCH="${KVERS#*-*-}" + ln -s livecd.${FS}.initrd-"${SUBARCH}" livecd.${FS}.initrd + fi mkdir -p livecd.mnt MOUNTS="$MOUNTS $(pwd)/livecd.mnt"