mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-06-06 23:51:35 +00:00
add support for kubuntu livecds
This commit is contained in:
parent
8b12cea1a7
commit
8e6007b171
42
livecd.sh
42
livecd.sh
@ -1,8 +1,8 @@
|
||||
#!/bin/sh -eu
|
||||
#!/bin/bash -eu
|
||||
|
||||
#################################################################
|
||||
#### (c) Copyright 2004 Canonical Ltd. All rights reserved. ####
|
||||
#################################################################
|
||||
######################################################################
|
||||
#### (c) Copyright 2004,2005 Canonical Ltd. All rights reserved. ####
|
||||
######################################################################
|
||||
|
||||
# Depends: debootstrap, rsync, cloop-utils, python
|
||||
|
||||
@ -30,6 +30,22 @@ case $(hostname --fqdn) in
|
||||
*) MIRROR=http://archive.ubuntu.com/ubuntu;;
|
||||
esac
|
||||
|
||||
while getopts :m: name; do case $name in
|
||||
m) MIRROR="$OPTARG";;
|
||||
\?) echo bad usage >&2; exit 2;;
|
||||
\:) echo missing argument >&2; exit 2;;
|
||||
esac; done;
|
||||
shift $((OPTIND-1))
|
||||
|
||||
(( $# == 0 )) && set -- ubuntu || true
|
||||
[ "X$1" = "Xall" ] && set -- ubuntu kubuntu || true
|
||||
|
||||
for arg in "$@"; do case "$arg" in
|
||||
ubuntu|kubuntu) ;;
|
||||
*) echo bad name >&2; exit 2;;
|
||||
esac; done
|
||||
|
||||
for FS in "$@"; do
|
||||
# How much space do we leave on the filesystem for the user?
|
||||
USZ="400*1024" # 400MB for the user
|
||||
# And how many inodes? Default currently gives them > 100000
|
||||
@ -52,6 +68,16 @@ Owners: debconf
|
||||
Flags: seen
|
||||
@@EOF
|
||||
|
||||
case "$FS" in
|
||||
ubuntu)
|
||||
LIST="ubuntu-base ubuntu-desktop ubuntu-live"
|
||||
;;
|
||||
kubuntu)
|
||||
LIST="ubuntu-base kubuntu-desktop ubuntu-live"
|
||||
;;
|
||||
esac
|
||||
LIST="$LIST xresprobe laptop-detect"
|
||||
|
||||
# need to defer udev until the apt-get, since debootstrap doesn't believe
|
||||
# in diversions
|
||||
debootstrap --exclude=udev,ubuntu-base $STE $ROOT $MIRROR
|
||||
@ -102,7 +128,6 @@ mount -tproc none ${ROOT}proc
|
||||
cp ${ROOT}etc/apt/trusted.gpg ${ROOT}etc/apt/trusted.gpg.$$
|
||||
cat /etc/apt/trusted.gpg >> ${ROOT}etc/apt/trusted.gpg
|
||||
|
||||
LIST="ubuntu-base ubuntu-desktop ubuntu-live xresprobe laptop-detect"
|
||||
case $(dpkg --print-architecture) in
|
||||
amd64) LIST="$LIST linux-amd64-generic";;
|
||||
i386) LIST="$LIST linux-386";;
|
||||
@ -157,6 +182,7 @@ rm -f ${ROOT}var/lib/apt/lists/*_*
|
||||
rm -f ${ROOT}var/spool/postfix/maildrop/*
|
||||
chroot $ROOT apt-get update || true # give them fresh lists, but don't fail
|
||||
rm ${ROOT}etc/resolv.conf
|
||||
chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' > livecd.manifest
|
||||
|
||||
mkdir -p livecd.mnt
|
||||
MOUNTS="$MOUNTS $(pwd)/livecd.mnt"
|
||||
@ -170,7 +196,7 @@ SZ=2047 # XXX fix size for now
|
||||
for fsbs in 1024:65536; do
|
||||
FSBLOCK=${fsbs%:*}
|
||||
COMP=${fsbs#*:}
|
||||
IMGNAME=${IMG}-${FSBLOCK}
|
||||
IMGNAME=${IMG}-${FS}-${FSBLOCK}
|
||||
if [ ! -f ${IMGNAME} ]; then
|
||||
if [ -f old-${IMGNAME} ]; then
|
||||
cp old-${IMGNAME} new-${IMGNAME}
|
||||
@ -193,7 +219,7 @@ for fsbs in 1024:65536; do
|
||||
mv new-${IMGNAME} ${IMGNAME}
|
||||
cp ${IMGNAME} old-${IMGNAME}
|
||||
fi
|
||||
create_compressed_fs $IMGNAME $COMP > livecd.cloop-${fsbs}
|
||||
create_compressed_fs $IMGNAME $COMP > livecd.cloop-${FS}-${fsbs}
|
||||
done
|
||||
|
||||
chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' > livecd.manifest
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user