From 65c4409a123cfd128a1c49f6c4b8c335f0cbd9af Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 30 Apr 2010 18:08:29 +0200 Subject: [PATCH] Merging casper 1.182. --- bin/live-new-uuid | 29 ++++++++++++++++++++--------- docs/ChangeLog.casper | 13 +++++++++++++ 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/bin/live-new-uuid b/bin/live-new-uuid index 97cc7d4..2e29f6a 100755 --- a/bin/live-new-uuid +++ b/bin/live-new-uuid @@ -31,10 +31,10 @@ set -e help() { echo - echo "USAGE: $0 initrd.gz " + echo "USAGE: $0 initrd.{l,g}z " echo - echo "initrd.gz is the absolute path to the original gzipped initramfs" - echo " is the destination directory for the new gzipped initramfs" + echo "initrd.{l,g}z is the absolute path to the original gzipped or lzmaed initramfs" + echo " is the destination directory for the new compressed initramfs" echo " is the destination directory for the new live-uuid-TYPE " echo echo "if either path is absent, they will end up in the current directory " @@ -50,10 +50,21 @@ CWD=`pwd` TEMPDIR=`mktemp -d /tmp/uuid-XXXXXX` TYPE=`uname -r | cut -d '-' -f 3` +if echo "$1" | grep ".lz$" >/dev/null; then + COMPRESSOR="lzma" + SUFFIX=".lz" +elif echo "$1" | grep ".gz$" >/dev/null; then + COMPRESSOR="gzip" + SUFFIX=".gz" +else + echo "Unsupported archive type." + exit 2 +fi + if [ -z "$2" ] || [ ! -d "$2" ] || [ "$2" = "." ]; then - GZIPDIR="$CWD" + COMPRESS_DIR="$CWD" else - GZIPDIR="$2" + COMPRESS_DIR="$2" fi if [ -z "$3" ] || [ ! -d "$3" ] || [ "$3" = "." ]; then @@ -63,13 +74,13 @@ else fi cd "$TEMPDIR" -zcat "$1" | cpio -id +$COMPRESSOR -cd "$1" -S "$SUFFIX" | cpio -id uuidgen -r > conf/uuid.conf -find . | cpio --quiet --dereference -o -H newc | gzip > "$GZIPDIR/initrd.gz" +find . | cpio --quiet --dereference -o -H newc | $COMPRESSOR -9c > "$COMPRESS_DIR/initrd$SUFFIX" if [ "$(ls "$LIVEDIR/live-uuid"-* >/dev/null 2>&1 | wc -l)" = 1 ]; then - cp conf/uuid.conf "$LIVEDIR/live-uuid"-* + cp conf/uuid.conf "$LIVEDIR/live-uuid"-* else - cp conf/uuid.conf "$LIVEDIR/live-uuid-$TYPE" + cp conf/uuid.conf "$LIVEDIR/live-uuid-$TYPE" fi cd "$CWD" rm -rf "$TEMPDIR" diff --git a/docs/ChangeLog.casper b/docs/ChangeLog.casper index b1b7abe..4a4c088 100644 --- a/docs/ChangeLog.casper +++ b/docs/ChangeLog.casper @@ -1,3 +1,16 @@ +casper (1.182) karmic; urgency=low + + [ Evan Dandrea ] + * Busybox sed does not preserve ownership, so chown after using it. + + [ Colin Watson ] + * Set AutomaticLogin=$USERNAME, not =ubuntu (thanks, arky; LP: #401321). + + [ Mario Limonciello ] + * Add support for lzma type archives to casper-new-uuid. + + -- Mario Limonciello Mon, 20 Jul 2009 17:36:55 -0500 + casper (1.181) karmic; urgency=low * Insert a version number in the name field for ubiquity's desktop file -- 2.1.4