Adding upstream version 2.0.2. upstream/2.0.2
authorDaniel Baumann <daniel@debian.org>
Thu, 2 Sep 2010 16:27:12 +0000 (18:27 +0200)
committerDaniel Baumann <daniel@debian.org>
Thu, 2 Sep 2010 16:27:12 +0000 (18:27 +0200)
13 files changed:
Makefile
VERSION
bin/live-toram [new file with mode: 0755]
hooks/live
manpages/de/live-boot.de.7
manpages/de/live-snapshot.de.1
manpages/en/live-boot.7
manpages/en/live-snapshot.1
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-bottom/23networking

index d38a949..966a6bd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ build:
 install:
        # Installing executables
        mkdir -p $(DESTDIR)/sbin
-       cp bin/live-new-uuid bin/live-snapshot bin/live-swapfile $(DESTDIR)/sbin
+       cp bin/live-new-uuid bin/live-snapshot bin/live-swapfile bin/live-toram $(DESTDIR)/sbin
 
        mkdir -p $(DESTDIR)/usr/share/live-boot
        cp bin/live-preseed bin/live-reconfigure local/languagelist $(DESTDIR)/usr/share/live-boot
diff --git a/VERSION b/VERSION
index 38f77a6..e9307ca 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0.1
+2.0.2
diff --git a/bin/live-toram b/bin/live-toram
new file mode 100755 (executable)
index 0000000..b7740a2
--- /dev/null
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+set -e
+
+# Read cmdline
+for _PARAMETER in $(cat /proc/cmdline)
+do
+       case "${_PARAMETER}" in
+               module=*)
+                       _MODULE="${_PARAMETER#module=}"
+                       ;;
+       esac
+done
+
+# Assemble filesystems
+if [ -z "${_MODULE}" ]
+then
+       _FILESYSTEMS="/live/image/live/filesystem.squashfs"
+else
+       for _FILESYSTEM in _MODULE
+       do
+               _FILESYSTEMS="${_FILESYSTEMS} /live/image/live/${_FILESYSTEM}"
+       done
+fi
+
+# Exit if system is not debian live
+if [ ! -d /live/image ]
+then
+       echo "E: live-toram only works on Debian Live systems."
+
+       exit 1
+fi
+
+# Exit if filesystem not accessible
+for _FILESYSTEM in ${_FILESYSTEMS}
+do
+       if [ ! -r ${_FILESYSTEM} ]
+       then
+               echo "E: ${_FILESYSTEM}: No such file"
+               echo "I: live-toram already run?"
+
+               exit 1
+       fi
+done
+
+# Exit if user is unprivileged
+if [ "$(id -u)" -ne 0 ]
+then
+       echo "E: need root privileges"
+
+       exit 1
+fi
+
+# Exit if not enough free memory
+_SIZE=0
+
+for _FILESYSTEM in ${_FILESYSTEMS}
+do
+       _SIZE="$((${_SIZE} + $(du ${_FILESYSTEM} | awk '{ print $1 }')))"
+       _MEMORY="$(awk '/MemFree/ { print $2 }' /proc/meminfo)"
+done
+
+case ${@} in
+       -f|--force)
+               echo "W: Ignoring memory constrains as requested"
+               ;;
+
+       *)
+               if [ $_MEMORY -lt $_SIZE ]
+               then
+                       echo "E: not enough free memory available."
+                       echo "I: images need ${_SIZE}kB, free memory is ${_MEMORY}kB."
+
+                       exit 1
+               fi
+               ;;
+esac
+
+# Copying image to memory
+echo "P: Copying images to memory."
+echo "P: This may take a while..."
+
+# FIXME: doesn't work with multiple filesystems
+for _FILESYSTEM in ${_FILESYSTEMS}
+do
+       if [ ! -x "$(which rsync 2>/dev/null)" ]
+       then
+               rsync -a --progress ${_FILESYSTEM} /tmp/live
+       else
+               cp -av ${_FILESYSTEM} /tmp/live
+       fi
+
+LANGUAGE=C LANG=C LC_ALL=C perl << EOF
+open LOOP, '</dev/loop0' or die $!;
+open DEST, '</tmp/live' or die $!;
+ioctl(LOOP, 0x4C06, fileno(DEST)) or die $!
+close LOOP;
+close DEST;
+EOF
+
+done
+
+# Unmounting live media
+_DEVICE="$(awk '/\/live\/image / { print $1 }' /proc/mounts)"
+
+if [ -d /live/image ]
+then
+       umount /live/image
+       rmdir --ignore-fail-on-non-empty /live/image || true
+fi
+
+# Ejecting live media if it is not an optical device
+if [ "$(expr substr ${_DEVICE} 1 2)" != "sd" ] && \
+   ! readlink /sys/block/$(expr substr ${_DEVICE} 6 3) | grep -q usb
+then
+       if [ ! -x "$(which rsync 2>/dev/null)" ]
+       then
+               eject -p -m ${_DEVICE} >/dev/null 2>&1
+       fi
+fi
index 34d6eab..e77c88b 100755 (executable)
@@ -61,7 +61,7 @@ cp /usr/share/initramfs-tools/scripts/live-helpers "${DESTDIR}"/scripts
 # klibc dependencies
 for FILE in /lib/libacl* /lib/libblkid* /lib/libuuid* /lib/libdevmapper* /lib/libattr*
 do
-       if [ ! -e "${DESTDIR}"/"${FILE}" ]
+       if [ ! -e "${DESTDIR}"/"${FILE}" ] && ls ${FILE} > /dev/null 2>&1
        then
                cp -a "${FILE}" "${DESTDIR}"/"${FILE}"
        fi
index 7bb396f..180da36 100644 (file)
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-BOOT 7 01.09.2010 2.0.1 "Debian Live Projekt"
+.TH LIVE\-BOOT 7 02.09.2010 2.0.2 "Debian Live Projekt"
 
 .SH NAME
 \fBlive\-boot\fP \- System Boot Skripte
@@ -243,9 +243,9 @@ directory with a tmpfs on the original path.
 .SH "SIEHE AUCH"
 \fIlive\-snapshot\fP(1)
 .PP
-\fIlive\-config\fP(7)
+\fIlive\-build\fP(7)
 .PP
-\fIlive\-helper\fP(7)
+\fIlive\-config\fP(7)
 
 .SH HOMEPAGE
 Weitere Informationen ueber live\-boot und das Debian Live Projekt koennen
index 5801fd5..a529e18 100644 (file)
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-BOOT 1 01.09.2010 2.0.1 "Debian Live Projekt"
+.TH LIVE\-BOOT 1 02.09.2010 2.0.2 "Debian Live Projekt"
 
 .SH NAME
 \fBlive\-snapshot\fP \- simple script to ease persistence usage
@@ -87,9 +87,9 @@ directory with a tmpfs on the original path.
 .SH "SIEHE AUCH"
 \fIlive\-boot\fP(1)
 .PP
-\fIlive\-config\fP(7)
+\fIlive\-build\fP(7)
 .PP
-\fIlive\-helper\fP(7)
+\fIlive\-config\fP(7)
 
 .SH HOMEPAGE
 Weitere Informationen ueber live\-boot und das Debian Live Projekt koennen
index 5f5a357..4d27a19 100644 (file)
@@ -1,4 +1,4 @@
-.TH LIVE\-BOOT 7 2010\-09\-01 2.0.1 "Debian Live Project"
+.TH LIVE\-BOOT 7 2010\-09\-02 2.0.2 "Debian Live Project"
 
 .SH NAME
 \fBlive\-boot\fR \- System Boot Scripts
@@ -143,9 +143,9 @@ This saves expensive writes and speeds up operations on volatile data such as we
 .SH SEE ALSO
 \fIlive\-snapshot\fR(1)
 .PP
-\fIlive\-config\fR(7)
+\fIlive\-build\fR(7)
 .PP
-\fIlive\-helper\fR(7)
+\fIlive\-config\fR(7)
 
 .SH HOMEPAGE
 More information about live\-boot and the Debian Live project can be found on the homepage at <\fIhttp://live.debian.net/\fR> and in the manual at <\fIhttp://live.debian.net/manual/\fR>.
index 224b6c9..70b6a70 100644 (file)
@@ -1,4 +1,4 @@
-.TH LIVE\-BOOT 1 2010\-09\-01 2.0.1 "Debian Live Project"
+.TH LIVE\-BOOT 1 2010\-09\-02 2.0.2 "Debian Live Project"
 
 .SH NAME
 \fBlive\-snapshot\fR \- simple script to ease persistence usage
@@ -52,9 +52,9 @@ This saves expensive writes and speeds up operations on volatile data such as we
 .SH SEE ALSO
 \fIlive\-boot\fR(1)
 .PP
-\fIlive\-config\fR(7)
+\fIlive\-build\fR(7)
 .PP
-\fIlive\-helper\fR(7)
+\fIlive\-config\fR(7)
 
 .SH HOMEPAGE
 More information about live\-boot and the Debian Live project can be found on the homepage at <\fIhttp://live.debian.net/\fR> and in the manual at <\fIhttp://live.debian.net/manual/\fR>.
index c575f31..246b83f 100644 (file)
@@ -4,8 +4,8 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: live-boot 2.0.1\n"
-"POT-Creation-Date: 2010-09-01 18:24+0300\n"
+"Project-Id-Version: live-boot 2.0.2\n"
+"POT-Creation-Date: 2010-09-02 18:25+0300\n"
 "PO-Revision-Date: 2010-05-24 12:34+0300\n"
 "Last-Translator: Daniel Baumann <daniel@debian.org>\n"
 "Language-Team: none\n"
@@ -24,14 +24,14 @@ msgstr "LIVE-BOOT"
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2010-09-01"
-msgstr "01.09.2010"
+msgid "2010-09-02"
+msgstr "02.09.2010"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2.0.1"
-msgstr "2.0.1"
+msgid "2.0.2"
+msgstr "2.0.2"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
@@ -771,13 +771,13 @@ msgstr "I<live-snapshot>(1)"
 
 #. type: Plain text
 #: en/live-boot.7:147 en/live-snapshot.1:56
-msgid "I<live-config>(7)"
-msgstr "I<live-config>(7)"
+msgid "I<live-build>(7)"
+msgstr "I<live-build>(7)"
 
 #. type: Plain text
 #: en/live-boot.7:149 en/live-snapshot.1:58
-msgid "I<live-helper>(7)"
-msgstr "I<live-helper>(7)"
+msgid "I<live-config>(7)"
+msgstr "I<live-config>(7)"
 
 #. type: SH
 #: en/live-boot.7:150 en/live-snapshot.1:59
index cc84ef0..aaedd01 100644 (file)
@@ -4,8 +4,8 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: live-boot 2.0.1\n"
-"POT-Creation-Date: 2010-09-01 18:24+0300\n"
+"Project-Id-Version: live-boot 2.0.2\n"
+"POT-Creation-Date: 2010-09-02 18:25+0300\n"
 "PO-Revision-Date: 2010-05-24 12:34+0300\n"
 "Last-Translator: Daniel Baumann <daniel@debian.org>\n"
 "Language-Team: none\n"
@@ -24,14 +24,14 @@ msgstr "LIVE-BOOT"
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2010-09-01"
-msgstr "01.09.2010"
+msgid "2010-09-02"
+msgstr "02.09.2010"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2.0.1"
-msgstr "2.0.1"
+msgid "2.0.2"
+msgstr "2.0.2"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
@@ -127,13 +127,13 @@ msgstr "SIEHE AUCH"
 
 #. type: Plain text
 #: en/live-boot.7:147 en/live-snapshot.1:56
-msgid "I<live-config>(7)"
-msgstr "I<live-config>(7)"
+msgid "I<live-build>(7)"
+msgstr "I<live-build>(7)"
 
 #. type: Plain text
 #: en/live-boot.7:149 en/live-snapshot.1:58
-msgid "I<live-helper>(7)"
-msgstr "I<live-helper>(7)"
+msgid "I<live-config>(7)"
+msgstr "I<live-config>(7)"
 
 #. type: SH
 #: en/live-boot.7:150 en/live-snapshot.1:59
index 1b54650..803bacd 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-boot VERSION\n"
-"POT-Creation-Date: 2010-09-01 18:24+0300\n"
+"POT-Creation-Date: 2010-09-02 18:25+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"
@@ -25,13 +25,13 @@ msgstr ""
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2010-09-01"
+msgid "2010-09-02"
 msgstr ""
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2.0.1"
+msgid "2.0.2"
 msgstr ""
 
 #. type: TH
@@ -766,12 +766,12 @@ msgstr ""
 
 #. type: Plain text
 #: en/live-boot.7:147 en/live-snapshot.1:56
-msgid "I<live-config>(7)"
+msgid "I<live-build>(7)"
 msgstr ""
 
 #. type: Plain text
 #: en/live-boot.7:149 en/live-snapshot.1:58
-msgid "I<live-helper>(7)"
+msgid "I<live-config>(7)"
 msgstr ""
 
 #. type: SH
index b3ea6b2..dfe6d4d 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-boot VERSION\n"
-"POT-Creation-Date: 2010-09-01 18:24+0300\n"
+"POT-Creation-Date: 2010-09-02 18:25+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"
@@ -25,13 +25,13 @@ msgstr ""
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2010-09-01"
+msgid "2010-09-02"
 msgstr ""
 
 #. type: TH
 #: en/live-boot.7:1 en/live-snapshot.1:1
 #, no-wrap
-msgid "2.0.1"
+msgid "2.0.2"
 msgstr ""
 
 #. type: TH
@@ -128,12 +128,12 @@ msgstr ""
 
 #. type: Plain text
 #: en/live-boot.7:147 en/live-snapshot.1:56
-msgid "I<live-config>(7)"
+msgid "I<live-build>(7)"
 msgstr ""
 
 #. type: Plain text
 #: en/live-boot.7:149 en/live-snapshot.1:58
-msgid "I<live-helper>(7)"
+msgid "I<live-config>(7)"
 msgstr ""
 
 #. type: SH
index f023729..8c856c6 100755 (executable)
@@ -51,14 +51,14 @@ udevadm settle
 
 if [ -z "${NETBOOT}" -a -n "${STATICIP}" -a "${STATICIP}" != "frommedia" ]
 then
-       parsed=$(echo "${STATICIP}" | sed -e 's/:/ /g')
+       parsed=$(echo "${STATICIP}" | sed -e 's/,/ /g')
 
        for ifline in ${parsed}
        do
-               ifname="$(echo ${ifline} | cut -f1 -d ',')"
-               ifaddress="$(echo ${ifline} | cut -f2 -d ',')"
-               ifnetmask="$(echo ${ifline} | cut -f3 -d ',')"
-               ifgateway="$(echo ${ifline} | cut -f4 -d ',')"
+               ifname="$(echo ${ifline} | cut -f1 -d ':')"
+               ifaddress="$(echo ${ifline} | cut -f2 -d ':')"
+               ifnetmask="$(echo ${ifline} | cut -f3 -d ':')"
+               ifgateway="$(echo ${ifline} | cut -f4 -d ':')"
 
 cat >> "${IFFILE}" << EOF
 allow-hotplug ${ifname}