Sync with Debian 1.154.8-1
authorMichael Prokop <mika@grml.org>
Thu, 5 Feb 2009 09:42:00 +0000 (10:42 +0100)
committerMichael Prokop <mika@grml.org>
Thu, 5 Feb 2009 09:42:00 +0000 (10:42 +0100)
12 files changed:
Makefile
bin/live-new-uuid
debian/changelog
debian/patches/00list
docs/parameters.txt
manpages/live-initramfs.en.7.txt
scripts/live
scripts/live-bottom/10adduser
scripts/live-bottom/20xconfig
scripts/live-bottom/21xvidemode
scripts/live-bottom/23networking
scripts/live-helpers

index b9a9e6d..40ce7af 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ test:
        fi
 
 build:
+       $(MAKE) -C manpages
 
 install: test build
        # Installing configuration
@@ -126,6 +127,7 @@ update:
                "http://svn.debian.org/viewsvn/*checkout*/d-i/trunk/packages/localechooser/languagelist"
 
 clean:
+       $(MAKE) -C manpages clean
 
 distclean:
 
index 4a6afa6..97cc7d4 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # -*- coding: utf-8 -*-
 #
-# «casper-new-uuid» - Creates and injects new UUIDs for casper disks
+# «live-new-uuid» - Creates and injects new UUIDs for live disks
 #
-# Create new UUIDs for disks to prevent conflicts and booting the wrong casper
+# Create new UUIDs for disks to prevent conflicts and booting the wrong live
 # directory.  Particularly useful in creating recovery disks that need to be
 # able to also work with recovery partitioning schemes.
 #
@@ -31,14 +31,14 @@ set -e
 
 help() {
  echo
- echo "USAGE: $0 initrd.gz <path-to-new-initrd.gz> <path-to-new-casper-uuid> "
+ echo "USAGE: $0 initrd.gz <path-to-new-initrd.gz> <path-to-new-live-uuid> "
  echo
  echo "initrd.gz is the absolute path to the original gzipped initramfs"
  echo "<path-to-new-initrd.gz> is the destination directory for the new gzipped initramfs"
- echo "<path-to-new-casper-uuid> is the destination directory for the new casper-uuid-TYPE "
+ echo "<path-to-new-live-uuid> 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 "
- echo "TYPE is determined by an already existing casper-uuid-* or by 'uname -s'"
+ echo "TYPE is determined by an already existing live-uuid-* or by 'uname -s'"
 }
 
 if [ "$#" = "0" ] || [ "x$1" = x-h ] || [ "x$1" = x--help ]; then
@@ -57,19 +57,19 @@ else
 fi
 
 if [ -z "$3" ] || [ ! -d "$3" ] || [ "$3" = "." ]; then
-       CASPERDIR="$CWD"
+       LIVEDIR="$CWD"
 else
-       CASPERDIR="$3"
+       LIVEDIR="$3"
 fi
 
 cd "$TEMPDIR"
 zcat "$1" | cpio -id
 uuidgen -r > conf/uuid.conf
 find . | cpio --quiet --dereference -o -H newc | gzip > "$GZIPDIR/initrd.gz"
-if [ "$(ls "$CASPERDIR/casper-uuid"-* >/dev/null 2>&1 | wc -l)" = 1 ]; then
-    cp conf/uuid.conf "$CASPERDIR/casper-uuid"-*
+if [ "$(ls "$LIVEDIR/live-uuid"-* >/dev/null 2>&1 | wc -l)" = 1 ]; then
+    cp conf/uuid.conf "$LIVEDIR/live-uuid"-*
 else
-    cp conf/uuid.conf "$CASPERDIR/casper-uuid-$TYPE"
+    cp conf/uuid.conf "$LIVEDIR/live-uuid-$TYPE"
 fi
 cd "$CWD"
 rm -rf "$TEMPDIR"
index e64a348..8e494f3 100644 (file)
@@ -1,3 +1,25 @@
+live-initramfs (1.154.8-1grml.01) unstable; urgency=low
+
+  * Disable 04_fix_no_medium_found_error.dpatch (fixed upstream).
+  * Sync with Debian 1.154.8-1 (mentioning just the relevant changes):
+    [ Daniel Baumann ]
+    * Adding note about URL limitations in live-initramfs manpage when
+      using fetch parameter.
+    * Replacing casper with live in live-new-uuid.
+    * Added missing variable quoting that lead to broken root persistence, thanks
+      to Thierry Walrant <debian.tgc@walrant.net> (Closes: #512656).
+    * Adding patch from Thierry Walrant <debian.tgc@walrant.net> to allow setting
+      a path for the persistence files through persistent-path boot parameter
+      (Closes: #512661).
+    * Adding persistent-path to parameter list and manpage.
+    * Actually building/cleaning manpages through targets in Makefile.
+    * Also checking for wicd in 23networking, thanks to Ben Armstrong
+      <synrg@debian.org>.
+    * Don't redirect output of fstype detection to standard out, thanks to Ronny
+      Standtke <Ronny.Standtke@gmx.net>.
+
+ -- Michael Prokop <mika@grml.org>  Thu, 05 Feb 2009 10:34:14 +0100
+
 live-initramfs (1.154.4-1grml.02) unstable; urgency=low
 
   * Apply patch by Michael Schierl <schierlm@gmx.de> for bootoption
@@ -122,7 +144,7 @@ live-initramfs (1.136.3-2~grml.02) unstable; urgency=low
     git commit 0c14aa2e625bc1bb43947f2c0d04b876900cd51e].
   * Get rid of debian/patches/05_get_rid_of_wrong_debug_message.dpatch
     and resync other patches as well.
-  * Copy /etc/grml_version to initrd. 
+  * Copy /etc/grml_version to initrd.
 
  -- Michael Prokop <mika@grml.org>  Sat, 16 Aug 2008 10:25:54 +0200
 
index 6065f92..83f28be 100644 (file)
@@ -1,7 +1,6 @@
 01_add_rsync.dpatch
 02_more_verbose_toram.dpatch
 03_grml_version_file_hook.dpatch
-04_fix_no_medium_found_error.dpatch
 05_boot_failure_message_grml.dpatch
 06_support_fromiso_isofrom.dpatch
 07_support_findiso.dpatch
index fd05339..921e0c4 100644 (file)
@@ -39,6 +39,7 @@ live swapon
 live nouser
 live noxautoconfig
 live persistent[=nofiles]
+live persistent-path=PATH
 live {preseed/file|file}=FILE
 live package/question=VALUE
 live quickreboot
index de8a67c..ecf9db5 100644 (file)
@@ -54,7 +54,15 @@ Makes initramfs boot process more verbose.
   fetch=*URL*::
 
 Another form of netboot by downloading a squashfs image from a given url,
-copying to ram and booting it.
+copying to ram and booting it. Due to current limitations in busyboxs wget
+and DNS resolution, an URL can not contain a hostname but an IP only.
+
+Not working: http://example.com/path/to/your_filesystem.squashfs
+Working: http://1.2.3.4/path/to/your_filesystem.squashfs
+
+Also note that therefore it's currently not possible to fetch an image from a
+namebased virtualhost of an httpd if it is sharing the ip with the main httpd
+instance.
 
   hostname=*HOSTNAME*, username=*USER*, userfullname=*USERFULLNAME*::
 
@@ -208,6 +216,12 @@ informations. If "nofiles" is specified, only filesystems with matching labels
 will be searched; no filesystems will be traversed looking for archives or image
 files. This results in shorter boot times.
 
+  persistent-path=PATH
+
+live-initramfs will look for persistency files in the root directory of a partition,
+with this parameter, the path can be configured so that you can have multiple
+directories on the same partition to store persistency files.
+
   {preseed/file|file}=**FILE**::
 
 A path to a file present on the rootfs could be used to preseed debconf
index d06dd20..bf90781 100755 (executable)
@@ -340,6 +340,11 @@ Arguments ()
                                export PERSISTENT
                                ;;
 
+                       persistent-path=*)
+                               PERSISTENT_PATH="${ARGUMENT#persistent-path=}"
+                               export PERSISTENT_PATH
+                               ;;
+
                        nopersistent)
                                NOPERSISTENT="Yes"
                                export NOPERSISTENT
index 4c0fe80..9295070 100755 (executable)
@@ -58,7 +58,7 @@ set passwd/username
 set passwd/user-uid
 EOF
 
-if ! grep "${USERNAME}" /root/etc/passwd
+if ! grep -qs "${USERNAME}" /root/etc/passwd
 then
        echo "The default user (${USERNAME}) is not present,"
        first_user=$(grep '^[^:]*:[^:]*:[12]\?[0-9][0-9][0-9][0-9]:' /root/etc/passwd | head -1 | cut -f1 -d ':')
index 947b7ec..f6a3f8d 100755 (executable)
@@ -82,7 +82,7 @@ ${setmodel}
 ${setoptions}
 EOF
 
-DEBUG_XORG_PACKAGE=1 DEBUG_XORG_DEBCONF=1 live-reconfigure /root xserver-xorg 2>&1 \
+live-reconfigure /root xserver-xorg 2>&1 \
        | grep -v "overwriting possibly-customised configuration" \
        | grep -v "file; backup in /etc/X11/xorg.conf"
 umount /root/sys
index ead3a6c..489fc5c 100755 (executable)
@@ -30,6 +30,8 @@ then
        exit 0
 fi
 
+[ -n "$XVIDEOMODE" ] || exit
+
 . /scripts/live-functions
 
 log_begin_msg "Configuring X video modes"
@@ -38,8 +40,15 @@ log_begin_msg "Configuring X video modes"
 
 . /live.vars
 
-if [ -n "$XVIDEOMODE" ]
+if [ $(cat /root/etc/debian_version | sed 's|\..*$||') -ge 4 ]
 then
+       # lenny or newer
+       if [ -x "$(which xrandr 2>/dev/null)" ]
+       then
+               echo "xrandr -s ${XVIDEOMODE} || /bin/true" >> /root/etc/X11/Xsession.d/21xvidemode
+       fi
+else
+       # etch
        mount -o bind /sys /root/sys
        mount -o bind /proc /root/proc
        mount -o bind /dev /root/dev
index 6a66996..72aaf12 100755 (executable)
@@ -90,7 +90,7 @@ else
        fi
 
        # iterate the physical interfaces and add them to the interfaces list
-       if [ "${method}" != dhcp ] || [ ! -x /root/usr/sbin/NetworkManager ]
+       if [ "${method}" != dhcp ] || ([ ! -x /root/usr/sbin/NetworkManager ] && [ ! -x /root/usr/sbin/wicd ])
        then
                for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*
                do
index f6b8b8b..8970834 100644 (file)
@@ -77,7 +77,7 @@ get_fstype ()
            return
        fi
 
-       eval $(fstype ${1} 2>/dev/null)
+       eval $(fstype ${1} 2>/dev/null)
 
        if [ "${FSTYPE}" != "unknown" ]
        then
@@ -206,7 +206,7 @@ setup_loop ()
                        dev=$(sys2dev "${loopdev}")
                        options=''
 
-                       if [ -n ${readonly} ]
+                       if [ -n "${readonly}" ]
                        then
                                if losetup --help 2>&1 | grep -q -- "-r\b"
                                then
@@ -299,6 +299,13 @@ find_cow_device ()
        cow_backing="/${pers_label}-backing"
        black_listed_devices="${2}"
 
+       if [ -z "${PERSISTENT_PATH}" ]
+       then
+               pers_fpath=${cow_backing}/${pers_label}
+       else
+               pers_fpath=${cow_backing}/${PERSISTENT_PATH}/${pers_label}
+       fi
+
        for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd)
        do
                for dev in $(subdevices "${sysblock}")
@@ -332,9 +339,9 @@ find_cow_device ()
                                                break
                                        fi
 
-                                       if [ -f "${cow_backing}/${pers_label}" ]
+                                       if [ -f "${pers_fpath}" ]
                                        then
-                                               echo $(setup_loop "${cow_backing}/${pers_label}" "loop" "/sys/block/loop*")
+                                               echo $(setup_loop "${pers_fpath}" "loop" "/sys/block/loop*")
                                                return 0
                                        else
                                                umount ${cow_backing}