[SCM] live-tools branch, debian-next, updated. debian/3.0.4-1-1-gc53cbbb

Daniel Baumann daniel at debian.org
Fri Jul 27 15:06:35 UTC 2012


The following commit has been merged in the debian-next branch:
commit c53cbbbabe780be42c1dbe83fa6abb2321029790
Author: Daniel Baumann <daniel at debian.org>
Date:   Thu Jul 26 17:33:41 2012 +0200

    Adding live-update-initramfs script.

diff --git a/bin/live-update-initramfs b/bin/live-update-initramfs
new file mode 100755
index 0000000..3deb61c
--- /dev/null
+++ b/bin/live-update-initramfs
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+## live-tools(7) - System Support Scripts
+## Copyright (C) 2006-2012 Daniel Baumann <daniel at debian.org>
+##
+## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+set -e
+
+# rw is guaranteed to be first.
+if [ -w /cdrom ] && grep -q ' /cdrom rw[, ]' /proc/self/mountinfo
+then
+	# live-media is writable
+
+	# Updating initramfs
+	/usr/sbin/update-initramfs.initramfs-tools "${@}"
+
+	if [ -e /initrd.img ]
+	then
+		_DIRECTORY=""
+	else
+		_DIRECTORY="/boot"
+	fi
+
+	# Copying kernel and initrd to live media
+	if [ -e /cdrom/live/initrd.lz ]
+	then
+		zcat "${_DIRECTORY}/initrd.img" | lzma -9c > /cdrom/live/initrd.lz.new
+		mv /cdrom/live/initrd.lz.new /cdrom/live/initrd.lz
+	else
+		cp "${_DIRECTORY}/initrd.img" /cdrom/live/initrd.gz.new
+		mv /cdrom/live/initrd.gz.new /cdrom/live/initrd.gz
+	fi
+
+	cp "${_DIRECTORY}/vmlinuz" /cdrom/live/vmlinuz.new
+	mv /cdrom/live/vmlinuz.new /cdrom/live/vmlinuz
+else
+	# live-media is read-only
+
+	echo "I: update-initramfs is disabled (live system is running on read-only media)."
+
+	exit 0
+fi
diff --git a/debian/live-tools.links b/debian/live-tools.links
index 7dc9344..1ad9b69 100644
--- a/debian/live-tools.links
+++ b/debian/live-tools.links
@@ -6,5 +6,10 @@
 /usr/share/man/de/man7/live-tools.7.gz	/usr/share/man/de/man1/live-toram.1.gz
 /usr/share/man/de/man7/live-tools.7.gz	/usr/share/man/de/man1/live-uptime.1.gz
 
+# initramfs-tools: update-initramfs
+/usr/bin/live-update-initramfs		/usr/sbin/update-initramfs
+/usr/share/man/man7/live-tools.7.gz	/usr/share/man/man8/update-initramfs.8.gz
+
+# procps: uptime
 /usr/bin/live-uptime			/usr/bin/uptime
 /usr/share/man/man7/live-tools.7.gz	/usr/share/man/man1/uptime.1.gz
diff --git a/debian/live-tools.postrm b/debian/live-tools.postrm
index aa860ef..a94a350 100644
--- a/debian/live-tools.postrm
+++ b/debian/live-tools.postrm
@@ -4,6 +4,11 @@ set -e
 
 case "${1}" in
 	remove)
+		# initramfs-tools: update-initramfs
+		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/sbin/update-initramfs.initramfs-tools /usr/sbin/update-initramfs
+		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/share/man/man8/update-initramfs.initramfs-tools.8.gz /usr/share/man/man8/update-initramfs.8.gz
+
+		# procps: uptime
 		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/bin/uptime.procps /usr/bin/uptime
 		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/share/man/man1/uptime.procps.1.gz /usr/share/man/man1/uptime.1.gz
 		;;
diff --git a/debian/live-tools.preinst b/debian/live-tools.preinst
index 9945fe7..56820c8 100644
--- a/debian/live-tools.preinst
+++ b/debian/live-tools.preinst
@@ -4,6 +4,11 @@ set -e
 
 case "${1}" in
 	install|upgrade)
+		# initramfs-tools: update-initramfs
+		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/sbin/update-initramfs.initramfs-tools /usr/sbin/update-initramfs
+		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/share/man/man8/update-initramfs.initramfs-tools.8.gz /usr/share/man/man8/update-initramfs.8.gz
+
+		# procps: uptime
 		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/bin/uptime.procps /usr/bin/uptime
 		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/share/man/man1/uptime.procps.1.gz /usr/share/man/man1/uptime.1.gz
 		;;
diff --git a/manpages/de/live-tools.de.7 b/manpages/de/live-tools.de.7
index 81af9d0..9a1e51b 100644
--- a/manpages/de/live-tools.de.7
+++ b/manpages/de/live-tools.de.7
@@ -11,7 +11,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-TOOLS 7 24.07.2012 3.0.4\-1 "Debian Live Projekt"
+.TH LIVE\-TOOLS 7 26.07.2012 3.0.4\-1 "Debian Live Projekt"
 
 .SH NAME
 \fBlive\-tools\fP \- System Support Skripte
@@ -22,6 +22,8 @@
 .SH TOOLS
 \fBlive\-tools\fP enthält derzeit folgende Tools.
 
+.IP \fBlive\-update\-initramfs\fP 4
+schreibt aktualisierte initramfs Images auf das Live Medium.
 .IP \fBlive\-toram\fP 4
 kopiert das laufende System in RAM um das Live Medium auszuwerfen.
 .IP \fBlive\-system\fP 4
diff --git a/manpages/en/live-tools.7 b/manpages/en/live-tools.7
index 6ddd7d2..dade409 100644
--- a/manpages/en/live-tools.7
+++ b/manpages/en/live-tools.7
@@ -6,7 +6,7 @@
 .\" under certain conditions; see COPYING for details.
 .\"
 .\"
-.TH LIVE\-TOOLS 7 2012\-07\-24 3.0.4-1 "Debian Live Project"
+.TH LIVE\-TOOLS 7 2012\-07\-26 3.0.4-1 "Debian Live Project"
 
 .SH NAME
 \fBlive\-tools\fR \- System Support Scripts
@@ -17,6 +17,8 @@
 .SH TOOLS
 \fBlive\-tools\fR currently contains the following tools.
 
+.IP "\fBlive\-update\-initramfs\fR" 4
+writes out updated initramfs images to the live media.
 .IP "\fBlive\-toram\fR" 4
 copies running system to RAM in order to eject the live media.
 .IP "\fBlive\-system\fR" 4
diff --git a/manpages/po/de/live-tools.7.po b/manpages/po/de/live-tools.7.po
index fb79c68..a18aa04 100644
--- a/manpages/po/de/live-tools.7.po
+++ b/manpages/po/de/live-tools.7.po
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-tools 3.0.4-1\n"
-"POT-Creation-Date: 2012-07-24 21:44+0300\n"
+"POT-Creation-Date: 2012-07-26 17:41+0300\n"
 "PO-Revision-Date: 2010-05-24 09:59+0300\n"
 "Last-Translator: Daniel Baumann <daniel at debian.org>\n"
 "Language-Team: none\n"
@@ -24,8 +24,8 @@ msgstr "LIVE-TOOLS"
 #. type: TH
 #: en/live-tools.7:9
 #, no-wrap
-msgid "2012-07-24"
-msgstr "24.07.2012"
+msgid "2012-07-26"
+msgstr "26.07.2012"
 
 #. type: TH
 #: en/live-tools.7:9
@@ -76,72 +76,83 @@ msgstr "B<live-tools> enthält derzeit folgende Tools."
 #. type: IP
 #: en/live-tools.7:20
 #, no-wrap
+msgid "B<live-update-initramfs>"
+msgstr "B<live-update-initramfs>"
+
+#. type: Plain text
+#: en/live-tools.7:22
+msgid "writes out updated initramfs images to the live media."
+msgstr "schreibt aktualisierte initramfs Images auf das Live Medium."
+
+#. type: IP
+#: en/live-tools.7:22
+#, no-wrap
 msgid "B<live-toram>"
 msgstr "B<live-toram>"
 
 #. type: Plain text
-#: en/live-tools.7:22
+#: en/live-tools.7:24
 msgid "copies running system to RAM in order to eject the live media."
 msgstr "kopiert das laufende System in RAM um das Live Medium auszuwerfen."
 
 #. type: IP
-#: en/live-tools.7:22
+#: en/live-tools.7:24
 #, no-wrap
 msgid "B<live-system>"
 msgstr "B<live-system>"
 
 #. type: Plain text
-#: en/live-tools.7:24
+#: en/live-tools.7:26
 msgid "determines if running system is a debian-live based system."
 msgstr "bestimmt ob das laufende System ein Debian Live basiertes System ist."
 
 #. type: IP
-#: en/live-tools.7:24
+#: en/live-tools.7:26
 #, no-wrap
 msgid "B<live-uptime>"
 msgstr "B<live-uptime>"
 
 #. type: Plain text
-#: en/live-tools.7:26
+#: en/live-tools.7:28
 msgid "tells how long the system has been running (works with LXC)."
 msgstr ""
 "gibt die aktuelle Dauer wie lange das System läuft aus (funktioniert mit "
 "LXC)."
 
 #. type: SH
-#: en/live-tools.7:27
+#: en/live-tools.7:29
 #, no-wrap
 msgid "SEE ALSO"
 msgstr "SIEHE AUCH"
 
 #. type: Plain text
-#: en/live-tools.7:29
+#: en/live-tools.7:31
 msgid "I<live-boot>(7)"
 msgstr "I<live-boot>(7)"
 
 #. type: Plain text
-#: en/live-tools.7:31
+#: en/live-tools.7:33
 msgid "I<live-build>(7)"
 msgstr "I<live-build>(7)"
 
 #. type: Plain text
-#: en/live-tools.7:33
+#: en/live-tools.7:35
 msgid "I<live-config>(7)"
 msgstr "I<live-config>(7)"
 
 #. type: Plain text
-#: en/live-tools.7:35
+#: en/live-tools.7:37
 msgid "I<live-debconfig>(7)"
 msgstr "I<live-debconfig>(7)"
 
 #. type: SH
-#: en/live-tools.7:36
+#: en/live-tools.7:38
 #, no-wrap
 msgid "HOMEPAGE"
 msgstr "HOMEPAGE"
 
 #. type: Plain text
-#: en/live-tools.7:38
+#: en/live-tools.7:40
 msgid ""
 "More information about live-tools and the Debian Live project can be found "
 "on the homepage at E<lt>I<http://live.debian.net/>E<gt> and in the manual at "
@@ -152,13 +163,13 @@ msgstr ""
 "unter E<lt>I<http://live.debian.net/manual/>E<gt> gefunden werden."
 
 #. type: SH
-#: en/live-tools.7:39
+#: en/live-tools.7:41
 #, no-wrap
 msgid "BUGS"
 msgstr "FEHLER"
 
 #. type: Plain text
-#: en/live-tools.7:41
+#: en/live-tools.7:43
 msgid ""
 "Bugs can be reported by submitting a bugreport for the live-tools package in "
 "the Debian Bug Tracking System at E<lt>I<http://bugs.debian.org/>E<gt> or by "
@@ -172,13 +183,13 @@ msgstr ""
 "werden."
 
 #. type: SH
-#: en/live-tools.7:42
+#: en/live-tools.7:44
 #, no-wrap
 msgid "AUTHOR"
 msgstr "AUTOR"
 
 #. type: Plain text
-#: en/live-tools.7:43
+#: en/live-tools.7:45
 msgid ""
 "live-tools was written by Daniel Baumann E<lt>I<daniel at debian.org>E<gt>."
 msgstr ""
diff --git a/manpages/pot/live-tools.7.pot b/manpages/pot/live-tools.7.pot
index ee636c2..87602bc 100644
--- a/manpages/pot/live-tools.7.pot
+++ b/manpages/pot/live-tools.7.pot
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-config VERSION\n"
-"POT-Creation-Date: 2012-07-24 21:44+0300\n"
+"POT-Creation-Date: 2012-07-26 17:41+0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -25,7 +25,7 @@ msgstr ""
 #. type: TH
 #: en/live-tools.7:9
 #, no-wrap
-msgid "2012-07-24"
+msgid "2012-07-26"
 msgstr ""
 
 #. type: TH
@@ -77,70 +77,81 @@ msgstr ""
 #. type: IP
 #: en/live-tools.7:20
 #, no-wrap
-msgid "B<live-toram>"
+msgid "B<live-update-initramfs>"
 msgstr ""
 
 #. type: Plain text
 #: en/live-tools.7:22
-msgid "copies running system to RAM in order to eject the live media."
+msgid "writes out updated initramfs images to the live media."
 msgstr ""
 
 #. type: IP
 #: en/live-tools.7:22
 #, no-wrap
-msgid "B<live-system>"
+msgid "B<live-toram>"
 msgstr ""
 
 #. type: Plain text
 #: en/live-tools.7:24
-msgid "determines if running system is a debian-live based system."
+msgid "copies running system to RAM in order to eject the live media."
 msgstr ""
 
 #. type: IP
 #: en/live-tools.7:24
 #, no-wrap
-msgid "B<live-uptime>"
+msgid "B<live-system>"
 msgstr ""
 
 #. type: Plain text
 #: en/live-tools.7:26
+msgid "determines if running system is a debian-live based system."
+msgstr ""
+
+#. type: IP
+#: en/live-tools.7:26
+#, no-wrap
+msgid "B<live-uptime>"
+msgstr ""
+
+#. type: Plain text
+#: en/live-tools.7:28
 msgid "tells how long the system has been running (works with LXC)."
 msgstr ""
 
 #. type: SH
-#: en/live-tools.7:27
+#: en/live-tools.7:29
 #, no-wrap
 msgid "SEE ALSO"
 msgstr ""
 
 #. type: Plain text
-#: en/live-tools.7:29
+#: en/live-tools.7:31
 msgid "I<live-boot>(7)"
 msgstr ""
 
 #. type: Plain text
-#: en/live-tools.7:31
+#: en/live-tools.7:33
 msgid "I<live-build>(7)"
 msgstr ""
 
 #. type: Plain text
-#: en/live-tools.7:33
+#: en/live-tools.7:35
 msgid "I<live-config>(7)"
 msgstr ""
 
 #. type: Plain text
-#: en/live-tools.7:35
+#: en/live-tools.7:37
 msgid "I<live-debconfig>(7)"
 msgstr ""
 
 #. type: SH
-#: en/live-tools.7:36
+#: en/live-tools.7:38
 #, no-wrap
 msgid "HOMEPAGE"
 msgstr ""
 
 #. type: Plain text
-#: en/live-tools.7:38
+#: en/live-tools.7:40
 msgid ""
 "More information about live-tools and the Debian Live project can be found "
 "on the homepage at E<lt>I<http://live.debian.net/>E<gt> and in the manual at "
@@ -148,13 +159,13 @@ msgid ""
 msgstr ""
 
 #. type: SH
-#: en/live-tools.7:39
+#: en/live-tools.7:41
 #, no-wrap
 msgid "BUGS"
 msgstr ""
 
 #. type: Plain text
-#: en/live-tools.7:41
+#: en/live-tools.7:43
 msgid ""
 "Bugs can be reported by submitting a bugreport for the live-tools package in "
 "the Debian Bug Tracking System at E<lt>I<http://bugs.debian.org/>E<gt> or by "
@@ -163,13 +174,13 @@ msgid ""
 msgstr ""
 
 #. type: SH
-#: en/live-tools.7:42
+#: en/live-tools.7:44
 #, no-wrap
 msgid "AUTHOR"
 msgstr ""
 
 #. type: Plain text
-#: en/live-tools.7:43
+#: en/live-tools.7:45
 msgid ""
 "live-tools was written by Daniel Baumann E<lt>I<daniel at debian.org>E<gt>."
 msgstr ""

-- 
live-tools



More information about the debian-live-changes mailing list