Cleanup indentation

ubuntu/precise
LaMont Jones 20 years ago
parent 3239d7ae18
commit 6343ab4564

@ -64,7 +64,7 @@ done
for FS in "$@"; do for FS in "$@"; do
ROOT=$(pwd)/chroot-livecd/ # trailing / is CRITICAL ROOT=$(pwd)/chroot-livecd/ # trailing / is CRITICAL
IMG=livecd.fsimg IMG=livecd.${FS}.fsimg
MOUNTS="${ROOT}dev/pts ${ROOT}dev/shm ${ROOT}.dev ${ROOT}dev ${ROOT}proc" MOUNTS="${ROOT}dev/pts ${ROOT}dev/shm ${ROOT}.dev ${ROOT}dev ${ROOT}proc"
DEV="" DEV=""
@ -72,12 +72,12 @@ for FS in "$@"; do
mkdir -p ${ROOT}var/cache/debconf mkdir -p ${ROOT}var/cache/debconf
cat << @@EOF > ${ROOT}var/cache/debconf/config.dat cat << @@EOF > ${ROOT}var/cache/debconf/config.dat
Name: debconf/frontend Name: debconf/frontend
Template: debconf/frontend Template: debconf/frontend
Value: Noninteractive Value: Noninteractive
Owners: debconf Owners: debconf
Flags: seen Flags: seen
@@EOF @@EOF
case "$FS" in case "$FS" in
ubuntu) ubuntu)
@ -105,31 +105,31 @@ for FS in "$@"; do
# /bin/true won't cut it for mkinitrd, need to have -o support. # /bin/true won't cut it for mkinitrd, need to have -o support.
cat << @@EOF > ${ROOT}/usr/sbin/mkinitrd cat << @@EOF > ${ROOT}/usr/sbin/mkinitrd
#!/usr/bin/python #!/usr/bin/python
import sys import sys
for i in range(len(sys.argv)): for i in range(len(sys.argv)):
if sys.argv[i]=='-o': if sys.argv[i]=='-o':
open(sys.argv[i+1],"w") open(sys.argv[i+1],"w")
@@EOF @@EOF
chmod 755 ${ROOT}usr/sbin/mkinitrd chmod 755 ${ROOT}usr/sbin/mkinitrd
trap "cleanup" 0 1 2 3 15 trap "cleanup" 0 1 2 3 15
# Make a good /etc/kernel-img.conf for the kernel packages # Make a good /etc/kernel-img.conf for the kernel packages
cat << @@EOF >> ${ROOT}etc/kernel-img.conf cat << @@EOF >> ${ROOT}etc/kernel-img.conf
do_symlinks = yes do_symlinks = yes
relative_links = yes relative_links = yes
do_bootloader = no do_bootloader = no
do_bootfloppy = no do_bootfloppy = no
do_initrd = yes do_initrd = yes
link_in_boot = no link_in_boot = no
@@EOF @@EOF
cat << @@EOF > ${ROOT}etc/locale.gen cat << @@EOF > ${ROOT}etc/locale.gen
en_US.UTF-8 UTF-8 en_US.UTF-8 UTF-8
en_GB.UTF-8 UTF-8 en_GB.UTF-8 UTF-8
en_ZA.UTF-8 UTF-8 en_ZA.UTF-8 UTF-8
@@EOF @@EOF
mkdir -p ${ROOT}proc mkdir -p ${ROOT}proc
mount -tproc none ${ROOT}proc mount -tproc none ${ROOT}proc
@ -169,22 +169,22 @@ for FS in "$@"; do
# And make this look more pristene # And make this look more pristene
cleanup cleanup
cat << @@EOF > ${ROOT}etc/apt/sources.list cat << @@EOF > ${ROOT}etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu $STE main restricted deb http://archive.ubuntu.com/ubuntu $STE main restricted
deb-src http://archive.ubuntu.com/ubuntu $STE main restricted deb-src http://archive.ubuntu.com/ubuntu $STE main restricted
## Uncomment the following two lines to add software from the 'universe' ## Uncomment the following two lines to add software from the 'universe'
## repository. ## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to ## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in ## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security ## universe WILL NOT receive any review or updates from the Ubuntu security
## team. ## team.
# deb http://archive.ubuntu.com/ubuntu $STE universe # deb http://archive.ubuntu.com/ubuntu $STE universe
# deb-src http://archive.ubuntu.com/ubuntu $STE universe # deb-src http://archive.ubuntu.com/ubuntu $STE universe
deb http://security.ubuntu.com/ubuntu ${STE}-security main restricted deb http://security.ubuntu.com/ubuntu ${STE}-security main restricted
deb-src http://security.ubuntu.com/ubuntu ${STE}-security main restricted deb-src http://security.ubuntu.com/ubuntu ${STE}-security main restricted
@@EOF @@EOF
mv ${ROOT}etc/apt/trusted.gpg.$$ ${ROOT}etc/apt/trusted.gpg mv ${ROOT}etc/apt/trusted.gpg.$$ ${ROOT}etc/apt/trusted.gpg
# get rid of the .debs - we don't need them. # get rid of the .debs - we don't need them.
@ -193,7 +193,7 @@ for FS in "$@"; do
rm -f ${ROOT}var/spool/postfix/maildrop/* rm -f ${ROOT}var/spool/postfix/maildrop/*
chroot $ROOT apt-get update || true # give them fresh lists, but don't fail chroot $ROOT apt-get update || true # give them fresh lists, but don't fail
rm ${ROOT}etc/resolv.conf rm ${ROOT}etc/resolv.conf
chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' > livecd.manifest chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' > livecd.${FS}.manifest
mkdir -p livecd.mnt mkdir -p livecd.mnt
MOUNTS="$MOUNTS $(pwd)/livecd.mnt" MOUNTS="$MOUNTS $(pwd)/livecd.mnt"
@ -207,7 +207,7 @@ for FS in "$@"; do
for fsbs in 1024:65536; do for fsbs in 1024:65536; do
FSBLOCK=${fsbs%:*} FSBLOCK=${fsbs%:*}
COMP=${fsbs#*:} COMP=${fsbs#*:}
IMGNAME=${IMG}-${FS}-${FSBLOCK} IMGNAME=${IMG}-${FSBLOCK}
if [ ! -f ${IMGNAME} ]; then if [ ! -f ${IMGNAME} ]; then
if [ -f old-${IMGNAME} ]; then if [ -f old-${IMGNAME} ]; then
cp old-${IMGNAME} new-${IMGNAME} cp old-${IMGNAME} new-${IMGNAME}
@ -230,7 +230,6 @@ for FS in "$@"; do
mv new-${IMGNAME} ${IMGNAME} mv new-${IMGNAME} ${IMGNAME}
cp ${IMGNAME} old-${IMGNAME} cp ${IMGNAME} old-${IMGNAME}
fi fi
create_compressed_fs $IMGNAME $COMP > livecd.cloop-${FS}-${fsbs} create_compressed_fs $IMGNAME $COMP > livecd.${FS}.cloop-${fsbs}
done done
done done

Loading…
Cancel
Save