Adding upstream version 3.0~a2. upstream/3.0_a2
authorDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:11:28 +0000 (17:11 +0100)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:11:28 +0000 (17:11 +0100)
13 files changed:
VERSION
manpages/de/live-boot.de.7
manpages/de/live-snapshot.de.1
manpages/en/live-boot.7
manpages/en/live-snapshot.1
manpages/old/live-snapshot.it.1.txt [deleted file]
manpages/po/de/live-boot.7.po
manpages/po/de/live-snapshot.1.po
manpages/pot/live-boot.7.pot
manpages/pot/live-snapshot.1.pot
scripts/live
scripts/live-bottom/23networking
scripts/live-premount/select_eth_device

diff --git a/VERSION b/VERSION
index cfb3a5a..3ccf2a7 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0~a1
+3.0~a2
index fd51e64..a2ed194 100644 (file)
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-BOOT 7 10.08.2010 3.0~a1 "Debian Live Projekt"
+.TH LIVE\-BOOT 7 01.09.2010 3.0~a2 "Debian Live Projekt"
 
 .SH NAME
 \fBlive\-boot\fP \- System Boot Skripte
index a000b8c..01a4635 100644 (file)
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-BOOT 1 10.08.2010 3.0~a1 "Debian Live Projekt"
+.TH LIVE\-BOOT 1 01.09.2010 3.0~a2 "Debian Live Projekt"
 
 .SH NAME
 \fBlive\-snapshot\fP \- simple script to ease persistence usage
index f5328da..09de308 100644 (file)
@@ -1,4 +1,4 @@
-.TH LIVE\-BOOT 7 2010\-08\-10 3.0~a1 "Debian Live Project"
+.TH LIVE\-BOOT 7 2010\-09\-01 3.0~a2 "Debian Live Project"
 
 .SH NAME
 \fBlive\-boot\fR \- System Boot Scripts
index e05fdd8..b73c6aa 100644 (file)
@@ -1,4 +1,4 @@
-.TH LIVE\-BOOT 1 2010\-08\-10 3.0~a1 "Debian Live Project"
+.TH LIVE\-BOOT 1 2010\-09\-01 3.0~a2 "Debian Live Project"
 
 .SH NAME
 \fBlive\-snapshot\fR \- simple script to ease persistence usage
diff --git a/manpages/old/live-snapshot.it.1.txt b/manpages/old/live-snapshot.it.1.txt
deleted file mode 100644 (file)
index 2370de7..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-live-snapshot(1)
-================
-:man source: 1.157.3
-:man manual: Debian Live
-
-Name
-----
-live-snapshot - uno script per facilitare l'uso della persistenza sui sistemi live
-
-Synopsis
---------
-live-snapshot [-c|--cow **DIRECTORY**s] [-d|--device **DEVICE**] [-e|--exclude-list **FILE**] [-o|--output **FILE**] [-t|--type **TYPE**]
-
-live-snapshot [-r|--resync-string **STRING**]
-
-live-snapshot [-h|--help]
-
-live-snapshot [-u|--usage]
-
-live-snapshot [-v|--version]
-
-Description
------------
-
-live-snapshot `e uno script che pu`o essere usato per costruire un file immagine formattato
-correttamente per essere usato da live-initramfs(7); viene inoltre usato dallo script di
-init di live-initramfs in uscita per sincronizzare i device di snapshot riconosciuti al boot.
-
-Options
--------
-
-  -c, --cow **DIRECTORY**::
-
-specifica la directory da clonare nel file immagine. Il valore di default `e
-lo stesso default usato da live-initramfs per la sua directory COW (copy on
-write, un tempo situata in "/live/cow") ed `e sufficiente per gli usi comuni.
-Pu`o essere utile tuttavia specificare "/home" e come tipo "ext2" per
-preparare un file immagine adatto per essere montato da live-initramfs come
-"/home" al boot.
-
-  -d, --device **DEVICE**::
-
-seleziona il device dove il file/partizione di snapshot o persistenza dovr`a
-essere sistemato. Se il device non ha un filesystem, ne verr`a creato uno
-automaticamente, di tipo ext2 ed etichettato (label) in base al valore
-specificato nell'opzione "--output" o con un default. Se non viene specificato
-nessun device, verr`a usato un "tmpfs" linkato sul desktop dell'utente, in
-modo che port`a essere mosso dove si vuole.
-
-  -e, --exclude-list **FILE**::
-
-un file contenente una lista di file e percorsi che NON devono essere salvati.
-Questa lista verr`a inclusa nello snapshot per essere riutilizzata.
-
-  -o, --output **FILE**::
-
-il nome del file o l'etichetta (label) da usare per il file o la partizione di
-snapshot. Se non specificata, live-snapshot cercher\`a un file all'interno
-del device oppure user`a l'intera partizione.
-
-  -r, --resync-string **STRING**::
-
-usato internamente nelle sincronizzazioni dallo script di init di
-live-initramfs. Il formato pu\`o cambiare, usatelo a vostro rischio.
-
-  -f, --refresh::
-
-scatena la stessa operazione che verrebbe fatta al reboot o all'halt della
-macchina, provando a fare il resync degli snapshot trovati al boot, usabile
-per salvare le modifiche in vista di un crash o di una mancanza di corrente.
-
-  -t, --type **TYPE**::
-
-il tipo pu`o essere "cpio", "squashfs" o "ext2".
-
-  -h, --help::
-
-mostra l'aiuto ed esce
-
-  -u, --usage::
-
-mostra l'utilizzo ed esce
-
-  -v, --version::
-
-da informazioni sulla versione ed esce
-
-Files
------
-
-  /etc/live-snapshot.list
-
-Facoltativo, se presente cambia completamente il funzionamento di live-snapshot; solo i files e le directory elencate verranno effettivamente inclusi nello snapshot.
-Funziona attualmente solo con gli snapshot di tipo "cpio" e "partizione intera".
-
-  /etc/live-snapshot.exclude_list
-
-Facoltativo, se presente verrà utilizzato per filtrare i file da includere negli snapshot. Tutte i file che conterranno le stringhe elecate (come "grep -F -v") non verranno salvati da live-snapshot.
-Funziona attualmente solo con gli snapshot di tipo "cpio", "partizione intera" e "squashfs"; è utile per filtrare contenuti poco significativi come i file temporanei e la cache.
-
-See also
---------
-
-live-initramfs(8)
-
-Questo programma fa parte di live-initramfs.
-
-Bugs
-----
-
-Riportate i bug sul pacchetto live-initramfs
-link:http://packages.qa.debian.org/live-initramfs[http://packages.qa.debian.org/live-initramfs].
-
-Homepage
---------
-
-Ulteriori informazioni su progetto Debian Live possono essere trovate su
-link:http://debian-live.alioth.debian.org/[http://debian-live.alioth.debian.org/] e
-link:http://wiki.debian.org/DebianLive/[http://wiki.debian.org/DebianLive/].
-
-Authors
--------
-
-live-initramfs `e mantenuto da Daniel Baumann <daniel@debian.org> per il
-progetto Debian. live-initramfs `e un fork di
-link:http://packages.ubuntu.com/casper[casper]. casper `e stato scritto
-originariamente da Tollef Fog Heen <tfheen@canonical.com> e Matt Zimmerman
-<mdz@canonical.com>.
index 7786800..2d8de5f 100644 (file)
@@ -4,7 +4,7 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: live-boot 3.0~a1\n"
+"Project-Id-Version: live-boot 3.0~a2\n"
 "POT-Creation-Date: 2010-08-10 02:01+0300\n"
 "PO-Revision-Date: 2010-05-24 12:34+0300\n"
 "Last-Translator: Daniel Baumann <daniel@debian.org>\n"
@@ -24,14 +24,14 @@ msgstr "LIVE-BOOT"
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2010-08-10"
-msgstr "10.08.2010"
+msgid "2010-09-01"
+msgstr "01.09.2010"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "3.0~a1"
-msgstr "3.0~a1"
+msgid "3.0~a2"
+msgstr "3.0~a2"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
index 5d72e82..316d431 100644 (file)
@@ -4,7 +4,7 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: live-boot 3.0~a1\n"
+"Project-Id-Version: live-boot 3.0~a2\n"
 "POT-Creation-Date: 2010-08-10 02:01+0300\n"
 "PO-Revision-Date: 2010-05-24 12:34+0300\n"
 "Last-Translator: Daniel Baumann <daniel@debian.org>\n"
@@ -24,14 +24,14 @@ msgstr "LIVE-BOOT"
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2010-08-10"
-msgstr "10.08.2010"
+msgid "2010-09-01"
+msgstr "01.09.2010"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "3.0~a1"
-msgstr "3.0~a1"
+msgid "3.0~a2"
+msgstr "3.0~a2"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
index 836bde9..974a6fd 100644 (file)
@@ -7,13 +7,14 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-boot VERSION\n"
-"POT-Creation-Date: 2010-08-10 02:01+0300\n"
+"POT-Creation-Date: 2010-09-01 18:28+0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: ENCODING"
+"Content-Transfer-Encoding: 8bit\n"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
@@ -24,13 +25,13 @@ msgstr ""
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2010-08-10"
+msgid "2010-09-01"
 msgstr ""
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "3.0~a1"
+msgid "3.0~a2"
 msgstr ""
 
 #. type: TH
index ce1ac78..bd8c239 100644 (file)
@@ -7,13 +7,14 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-boot VERSION\n"
-"POT-Creation-Date: 2010-08-10 02:01+0300\n"
+"POT-Creation-Date: 2010-09-01 18:28+0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: ENCODING"
+"Content-Transfer-Encoding: 8bit\n"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
@@ -24,13 +25,13 @@ msgstr ""
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2010-08-10"
+msgid "2010-09-01"
 msgstr ""
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "3.0~a1"
+msgid "3.0~a2"
 msgstr ""
 
 #. type: TH
index a17eb42..0e9b0aa 100755 (executable)
@@ -68,6 +68,10 @@ Arguments ()
                                export DEFCONSOLE
                                ;;
 
+                       BOOTIF=*)
+                               BOOTIF="${x#BOOTIF=}"
+                               ;;
+
                        debug)
                                DEBUG="Yes"
                                export DEBUG
@@ -577,10 +581,61 @@ do_netsetup ()
        udevadm trigger
        udevadm settle
 
+       [ -n "$ETHDEV_TIMEOUT" ] || ETHDEV_TIMEOUT=15
+       echo "Using timeout of $ETHDEV_TIMEOUT seconds for network configuration."
+
        if [ -z "${NETBOOT}" ] && [ -z "${FETCH}" ] && \
           [ -z "${HTTPFS}" ] && [ -z "${FTPFS}" ]
        then
 
+
+       # support for Syslinux IPAPPEND parameter
+       # it sets the BOOTIF variable on the kernel parameter
+
+       if [ -n "${BOOTIF}" ]
+       then
+               # pxelinux sets BOOTIF to a value based on the mac address of the
+               # network card used to PXE boot, so use this value for DEVICE rather
+               # than a hard-coded device name from initramfs.conf. this facilitates
+               # network booting when machines may have multiple network cards.
+               # pxelinux sets BOOTIF to 01-$mac_address
+
+               # strip off the leading "01-", which isn't part of the mac
+               # address
+               temp_mac=${BOOTIF#*-}
+
+               # convert to typical mac address format by replacing "-" with ":"
+               bootif_mac=""
+               IFS='-'
+               for x in $temp_mac
+               do
+                       if [ -z "$bootif_mac" ]
+                       then
+                               bootif_mac="$x"
+                       else
+                               bootif_mac="$bootif_mac:$x"
+                       fi
+               done
+               unset IFS
+
+               # look for devices with matching mac address, and set DEVICE to
+               # appropriate value if match is found.
+
+               for device in /sys/class/net/*
+               do
+                       if [ -f "$device/address" ]
+                       then
+                               current_mac=$(cat "$device/address")
+
+                               if [ "$bootif_mac" = "$current_mac" ]
+                               then
+                                       DEVICE=${device##*/}
+                                       break
+                               fi
+                       fi
+               done
+       fi
+
        # if ethdevice was not specified on the kernel command line
        # make sure we try to get a working network configuration
        # for *every* present network device (except for loopback of course)
@@ -599,9 +654,6 @@ do_netsetup ()
                devlist="$devlist $device"
        done
 
-       [ -n "$ETHDEV_TIMEOUT" ] || ETHDEV_TIMEOUT=15
-       echo "Using timeout of $ETHDEV_TIMEOUT seconds for network configuration."
-
        # this is tricky (and ugly) because ipconfig sometimes just hangs/runs into
        # an endless loop; iff execution fails give it two further tries, that's
        # why we use '$devlist $devlist $devlist' for the other for loop
@@ -625,45 +677,54 @@ do_netsetup ()
        done
 
        else
-       ipconfig ${DEVICE} | tee /netboot.config
-       fi
-
-       # source relevant ipconfig output
-       OLDHOSTNAME=${HOSTNAME}
-       . /tmp/net-${DEVICE}.conf
-       [ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
-       export HOSTNAME
-
-       if [ -n "${DEVICE}" ]
-       then
-               HWADDR="$(cat /sys/class/net/${DEVICE}/address)"
+               for interface in ${DEVICE}; do
+                       ipconfig -t "$ETHDEV_TIMEOUT" ${interface} | tee /netboot-${interface}.config
+                       [ -e /tmp/net-${interface}.conf ] && . /tmp/net-${interface}.conf
+                       if [ "$IPV4ADDR" != "0.0.0.0" ]
+                       then
+                               break
+                       fi
+               done
        fi
 
-       if [ ! -e "/etc/resolv.conf" ]
-       then
-               echo "Creating /etc/resolv.conf"
+       for interface in ${DEVICE}; do
+               # source relevant ipconfig output
+               OLDHOSTNAME=${HOSTNAME}
+               [ -e /tmp/net-${interface}.conf ] && . /tmp/net-${interface}.conf
+               [ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
+               export HOSTNAME
 
-               if [ -n "${DNSDOMAIN}" ]
+               if [ -n "${interface}" ]
                then
-                       echo "domain ${DNSDOMAIN}" > /etc/resolv.conf
-                       echo "search ${DNSDOMAIN}" > /etc/resolv.conf
+                       HWADDR="$(cat /sys/class/net/${interface}/address)"
                fi
 
-               for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1}
-               do
-                       echo "nameserver $i" >> /etc/resolv.conf
-               done
-       fi
+               if [ ! -e "/etc/resolv.conf" ]
+               then
+                       echo "Creating /etc/resolv.conf"
 
-       # Check if we have a network device at all
-       if ! ls /sys/class/net/"$DEVICE" > /dev/null 2>&1 && \
-          ! ls /sys/class/net/eth0 > /dev/null 2>&1 && \
-          ! ls /sys/class/net/wlan0 > /dev/null 2>&1 && \
-          ! ls /sys/class/net/ath0 > /dev/null 2>&1 && \
-          ! ls /sys/class/net/ra0 > /dev/null 2>&1
-       then
-               panic "No supported network device found, maybe a non-mainline driver is required."
-       fi
+                       if [ -n "${DNSDOMAIN}" ]
+                       then
+                               echo "domain ${DNSDOMAIN}" > /etc/resolv.conf
+                               echo "search ${DNSDOMAIN}" > /etc/resolv.conf
+                       fi
+
+                       for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1}
+                       do
+                               echo "nameserver $i" >> /etc/resolv.conf
+                       done
+               fi
+
+               # Check if we have a network device at all
+               if ! ls /sys/class/net/"$interface" > /dev/null 2>&1 && \
+                  ! ls /sys/class/net/eth0 > /dev/null 2>&1 && \
+                  ! ls /sys/class/net/wlan0 > /dev/null 2>&1 && \
+                  ! ls /sys/class/net/ath0 > /dev/null 2>&1 && \
+                  ! ls /sys/class/net/ra0 > /dev/null 2>&1
+               then
+                       panic "No supported network device found, maybe a non-mainline driver is required."
+               fi
+       done
 }
 
 do_netmount()
@@ -1813,6 +1874,12 @@ mountroot ()
                mount --move /live/image /root/live/image
        fi
 
+       # aufs2 in kernel versions around 2.6.33 has a regression:
+       # directories can't be accessed when read for the first the time,
+       # causing a failure for example when accessing /var/lib/fai
+       # when booting FAI, this simple workaround solves it
+       ls /root/* >/dev/null 2>&1
+
        maybe_break live-bottom
        log_begin_msg "Running /scripts/live-bottom\n"
 
index 871d8c0..f023729 100755 (executable)
@@ -61,7 +61,7 @@ then
                ifgateway="$(echo ${ifline} | cut -f4 -d ',')"
 
 cat >> "${IFFILE}" << EOF
-auto ${ifname}
+allow-hotplug ${ifname}
 iface ${ifname} inet static
     address ${ifaddress}
     netmask ${ifnetmask}
@@ -90,7 +90,7 @@ else
                        i="$(basename ${interface})"
 
 cat >> "${IFFILE}" << EOF
-auto ${i}
+allow-hotplug ${i}
 iface ${i} inet ${method}
 
 EOF
@@ -138,7 +138,7 @@ fi
 #              grep -q "iface ${i}" ${IFFILE} && continue
 #
 #cat >> "${IFFILE}" << EOF
-#auto ${i}
+#allow-hotplug ${i}
 #iface ${i} inet dhcp
 #
 #EOF
index dfeac3d..fe86313 100755 (executable)
@@ -68,6 +68,7 @@ for ARGUMENT in $(cat /proc/cmdline); do
     esac
 done
 
+found_eth_dev=""
 while true; do
        echo -n "Looking for a connected Ethernet interface ..."
 
@@ -85,13 +86,17 @@ while true; do
                                2>/dev/null)
                        # link detected
                        if [ "$carrier" = 1 ]; then
-                               echo " found $interface."
+                               echo "Connected $interface found"
                                # inform initrd's init script :
-                               echo "DEVICE=$interface" >> /conf/param.conf
-                               exit 0
+                               found_eth_dev="$found_eth_dev $interface"
                        fi
                done
-               # wait a bit
-               sleep 1
+               if [ -n "$found_eth_dev" ]; then
+                       echo "DEVICE='$found_eth_dev'" >> /conf/param.conf
+                       exit 0
+               else
+                       # wait a bit
+                       sleep 1
+               fi
        done
 done