projects
/
live-boot-grml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d25b8fb
)
Adding upstream version 3.0~a6.
upstream/3.0_a6
author
Daniel Baumann
<daniel@debian.org>
Wed, 9 Mar 2011 16:11:33 +0000
(17:11 +0100)
committer
Daniel Baumann
<daniel@debian.org>
Wed, 9 Mar 2011 16:11:33 +0000
(17:11 +0100)
VERSION
patch
|
blob
|
history
bin/live-snapshot
patch
|
blob
|
history
manpages/de/live-boot.de.7
patch
|
blob
|
history
manpages/de/live-snapshot.de.1
patch
|
blob
|
history
manpages/en/live-boot.7
patch
|
blob
|
history
manpages/en/live-snapshot.1
patch
|
blob
|
history
manpages/po/de/live-boot.7.po
patch
|
blob
|
history
manpages/po/de/live-snapshot.1.po
patch
|
blob
|
history
manpages/pot/live-boot.7.pot
patch
|
blob
|
history
manpages/pot/live-snapshot.1.pot
patch
|
blob
|
history
scripts/live
patch
|
blob
|
history
diff --git
a/VERSION
b/VERSION
index
97c929b
..
7855bab
100644
(file)
--- a/
VERSION
+++ b/
VERSION
@@
-1
+1
@@
-3.0~a
5
+3.0~a
6
diff --git
a/bin/live-snapshot
b/bin/live-snapshot
index
08e5fd6
..
991e704
100755
(executable)
--- a/
bin/live-snapshot
+++ b/
bin/live-snapshot
@@
-7,7
+7,7
@@
# for reuse in another live-boot session.
# Look at the manpage for more informations.
#
# for reuse in another live-boot session.
# Look at the manpage for more informations.
#
-# Copyright (C) 2006-20
08
Marco Amadori <marco.amadori@gmail.com>
+# Copyright (C) 2006-20
10
Marco Amadori <marco.amadori@gmail.com>
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
@@
-39,7
+39,7
@@
fi
. /usr/share/initramfs-tools/scripts/live-helpers
. /usr/share/initramfs-tools/scripts/live-helpers
-LIVE_CONF="/etc/live.conf"
+LIVE_CONF="/etc/live
/boot.d/snapshot
.conf"
if [ -r "${LIVE_CONF}" ]
then
if [ -r "${LIVE_CONF}" ]
then
@@
-242,7
+242,7
@@
Defaults ()
# Parse resync string
if [ -n "${SNAP_RESYNC_STRING}" ]
then
# Parse resync string
if [ -n "${SNAP_RESYNC_STRING}" ]
then
- SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | sed -
e 's|^/root\([^:.]*\).*$|'"${DEF_SNAP_COW}"'\1|
')
+ SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | sed -
r -e 's#^([^:]*).*$#'"${DEF_SNAP_COW}"'\1#
')
SNAP_DEV=$(echo "${SNAP_RESYNC_STRING}" | cut -f2 -d ':')
SNAP_MNT=$(echo "${SNAP_RESYNC_STRING}" | cut -f3 -d ':')
DEST="${MOUNTP}/${SNAP_MNT}"
SNAP_DEV=$(echo "${SNAP_RESYNC_STRING}" | cut -f2 -d ':')
SNAP_MNT=$(echo "${SNAP_RESYNC_STRING}" | cut -f3 -d ':')
DEST="${MOUNTP}/${SNAP_MNT}"
diff --git
a/manpages/de/live-boot.de.7
b/manpages/de/live-boot.de.7
index
f533597
..
3a9ecc8
100644
(file)
--- a/
manpages/de/live-boot.de.7
+++ b/
manpages/de/live-boot.de.7
@@
-3,7
+3,7
@@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH LIVE\-BOOT 7
06.09.2010 3.0~a5
"Debian Live Projekt"
+.TH LIVE\-BOOT 7
14.09.2010 3.0~a6
"Debian Live Projekt"
.SH NAME
\fBlive\-boot\fP \- System Boot Skripte
.SH NAME
\fBlive\-boot\fP \- System Boot Skripte
diff --git
a/manpages/de/live-snapshot.de.1
b/manpages/de/live-snapshot.de.1
index
b067e09
..
d102fbd
100644
(file)
--- a/
manpages/de/live-snapshot.de.1
+++ b/
manpages/de/live-snapshot.de.1
@@
-3,7
+3,7
@@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH LIVE\-BOOT 1
06.09.2010 3.0~a5
"Debian Live Projekt"
+.TH LIVE\-BOOT 1
14.09.2010 3.0~a6
"Debian Live Projekt"
.SH NAME
\fBlive\-snapshot\fP \- simple script to ease persistence usage
.SH NAME
\fBlive\-snapshot\fP \- simple script to ease persistence usage
diff --git
a/manpages/en/live-boot.7
b/manpages/en/live-boot.7
index
f424f25
..
06915d6
100644
(file)
--- a/
manpages/en/live-boot.7
+++ b/
manpages/en/live-boot.7
@@
-1,4
+1,4
@@
-.TH LIVE\-BOOT 7 2010\-09\-
06 3.0~a5
"Debian Live Project"
+.TH LIVE\-BOOT 7 2010\-09\-
14 3.0~a6
"Debian Live Project"
.SH NAME
\fBlive\-boot\fR \- System Boot Scripts
.SH NAME
\fBlive\-boot\fR \- System Boot Scripts
diff --git
a/manpages/en/live-snapshot.1
b/manpages/en/live-snapshot.1
index
d2c82cc
..
3220f49
100644
(file)
--- a/
manpages/en/live-snapshot.1
+++ b/
manpages/en/live-snapshot.1
@@
-1,4
+1,4
@@
-.TH LIVE\-BOOT 1 2010\-09\-
06 3.0~a5
"Debian Live Project"
+.TH LIVE\-BOOT 1 2010\-09\-
14 3.0~a6
"Debian Live Project"
.SH NAME
\fBlive\-snapshot\fR \- simple script to ease persistence usage
.SH NAME
\fBlive\-snapshot\fR \- simple script to ease persistence usage
diff --git
a/manpages/po/de/live-boot.7.po
b/manpages/po/de/live-boot.7.po
index
a305617
..
fe6797b
100644
(file)
--- a/
manpages/po/de/live-boot.7.po
+++ b/
manpages/po/de/live-boot.7.po
@@
-4,8
+4,8
@@
#
msgid ""
msgstr ""
#
msgid ""
msgstr ""
-"Project-Id-Version: live-boot 3.0~a
5
\n"
-"POT-Creation-Date: 2010-09-
06 15:17
+0300\n"
+"Project-Id-Version: live-boot 3.0~a
6
\n"
+"POT-Creation-Date: 2010-09-
14 08:52
+0300\n"
"PO-Revision-Date: 2010-05-24 12:34+0300\n"
"Last-Translator: Daniel Baumann <daniel@debian.org>\n"
"Language-Team: none\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
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
-msgid "2010-09-
06
"
-msgstr "
06
.09.2010"
+msgid "2010-09-
14
"
+msgstr "
14
.09.2010"
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
-msgid "3.0~a
5
"
-msgstr "3.0~a
5
"
+msgid "3.0~a
6
"
+msgstr "3.0~a
6
"
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
diff --git
a/manpages/po/de/live-snapshot.1.po
b/manpages/po/de/live-snapshot.1.po
index
c1108be
..
d4b4764
100644
(file)
--- a/
manpages/po/de/live-snapshot.1.po
+++ b/
manpages/po/de/live-snapshot.1.po
@@
-4,8
+4,8
@@
#
msgid ""
msgstr ""
#
msgid ""
msgstr ""
-"Project-Id-Version: live-boot 3.0~a
5
\n"
-"POT-Creation-Date: 2010-09-
06 15:17
+0300\n"
+"Project-Id-Version: live-boot 3.0~a
6
\n"
+"POT-Creation-Date: 2010-09-
14 08:52
+0300\n"
"PO-Revision-Date: 2010-05-24 12:34+0300\n"
"Last-Translator: Daniel Baumann <daniel@debian.org>\n"
"Language-Team: none\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
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
-msgid "2010-09-
06
"
-msgstr "
06
.09.2010"
+msgid "2010-09-
14
"
+msgstr "
14
.09.2010"
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
-msgid "3.0~a
5
"
-msgstr "3.0~a
5
"
+msgid "3.0~a
6
"
+msgstr "3.0~a
6
"
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
diff --git
a/manpages/pot/live-boot.7.pot
b/manpages/pot/live-boot.7.pot
index
e6b4c14
..
b1d7e91
100644
(file)
--- a/
manpages/pot/live-boot.7.pot
+++ b/
manpages/pot/live-boot.7.pot
@@
-7,7
+7,7
@@
msgid ""
msgstr ""
"Project-Id-Version: live-boot VERSION\n"
msgid ""
msgstr ""
"Project-Id-Version: live-boot VERSION\n"
-"POT-Creation-Date: 2010-09-
06 15:17
+0300\n"
+"POT-Creation-Date: 2010-09-
14 08:52
+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"
"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
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
-msgid "2010-09-
06
"
+msgid "2010-09-
14
"
msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
-msgid "3.0~a
5
"
+msgid "3.0~a
6
"
msgstr ""
#. type: TH
msgstr ""
#. type: TH
diff --git
a/manpages/pot/live-snapshot.1.pot
b/manpages/pot/live-snapshot.1.pot
index
e8b6d2a
..
3e8f6e3
100644
(file)
--- a/
manpages/pot/live-snapshot.1.pot
+++ b/
manpages/pot/live-snapshot.1.pot
@@
-7,7
+7,7
@@
msgid ""
msgstr ""
"Project-Id-Version: live-boot VERSION\n"
msgid ""
msgstr ""
"Project-Id-Version: live-boot VERSION\n"
-"POT-Creation-Date: 2010-09-
06 15:17
+0300\n"
+"POT-Creation-Date: 2010-09-
14 08:52
+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"
"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
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
-msgid "2010-09-
06
"
+msgid "2010-09-
14
"
msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-snapshot.1:1
#, no-wrap
-msgid "3.0~a
5
"
+msgid "3.0~a
6
"
msgstr ""
#. type: TH
msgstr ""
#. type: TH
diff --git
a/scripts/live
b/scripts/live
index
d34279d
..
18881af
100755
(executable)
--- a/
scripts/live
+++ b/
scripts/live
@@
-957,6
+957,8
@@
do_snap_copy ()
if [ -b "${fromdev}" ]
then
if [ -b "${fromdev}" ]
then
+ log_success_msg "Copying snapshot ${fromdev} to ${todir}..."
+
# look for free mem
if [ -n "${HOMEMOUNTED}" -a "${snap_type}" = "HOME" ]
then
# look for free mem
if [ -n "${HOMEMOUNTED}" -a "${snap_type}" = "HOME" ]
then
@@
-994,9
+996,8
@@
do_snap_copy ()
return 0
else
return 0
else
- return 1
-
log_warning_msg "Unable to find the snapshot ${snap_type} medium"
log_warning_msg "Unable to find the snapshot ${snap_type} medium"
+ return 1
fi
}
fi
}
@@
-1026,6
+1027,16
@@
try_snap ()
snapdata="${1}"
snap_mount="${2}"
snap_type="${3}"
snapdata="${1}"
snap_mount="${2}"
snap_type="${3}"
+ snap_relpath="${4}"
+
+ if [ -z "${snap_relpath}" ]
+ then
+ # root snapshot, default usage
+ snap_relpath="/"
+ else
+ # relative snapshot (actually used just for "/home" snapshots)
+ snap_mount="${2}${snap_relpath}"
+ fi
if [ -n "${snapdata}" ] && [ ! -b "${snapdata}" ]
then
if [ -n "${snapdata}" ] && [ ! -b "${snapdata}" ]
then
@@
-1063,8
+1074,16
@@
try_snap ()
cpioargs='--unconditional --make-directories'
fi
cpioargs='--unconditional --make-directories'
fi
- cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse 2>/dev/null
- RES="$?"
+ if [ -s "${snapback}/${snapfile}" ]
+ then
+ BEFOREDIR="$(pwd)"
+ cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | $cpiopath $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse 2>/dev/null
+ RES="$?"
+ cd "${BEFOREDIR}"
+ else
+ log_warning_msg "${snapback}/${snapfile} is empty, adding it for sync on reboot."
+ RES="0"
+ fi
if [ "${RES}" != "0" ]
then
if [ "${RES}" != "0" ]
then
@@
-1096,7
+1115,7
@@
try_snap ()
if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"
then
if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"
then
- log_warning_msg "Impossible to include the ${snap_type} Snapshot"
+ log_warning_msg "Impossible to include the ${snap_type} Snapshot
(i)
"
return 1
else
if [ -n "${snapfile}" ]
return 1
else
if [ -n "${snapfile}" ]
@@
-1106,11
+1125,11
@@
try_snap ()
fi
fi
else
fi
fi
else
- log_warning_msg "Impossible to include the ${snap_type} Snapshot"
+ log_warning_msg "Impossible to include the ${snap_type} Snapshot
(o)
"
return 1
fi
return 1
fi
- echo "export ${snap_type}SNAP=
"/cow${snap_mount#$rootmnt}":${snapdev}:${snapfile}" >> /etc/live
.conf # for resync on reboot/halt
+ echo "export ${snap_type}SNAP=
${snap_relpath}:${snapdev}:${snapfile}" >> snapshot
.conf # for resync on reboot/halt
return 0
}
return 0
}
@@
-1448,7
+1467,7
@@
setup_unionfs ()
# Look for other snapshots to copy in
try_snap "${root_snapdata}" "${rootmnt}" "ROOT"
# This second type should be removed when snapshot grow smarter
# Look for other snapshots to copy in
try_snap "${root_snapdata}" "${rootmnt}" "ROOT"
# This second type should be removed when snapshot grow smarter
- try_snap "${home_snapdata}" "${rootmnt}
/home" "HOME
"
+ try_snap "${home_snapdata}" "${rootmnt}
" "HOME" "/home
"
fi
if [ -n "${SHOWMOUNTS}" ]
fi
if [ -n "${SHOWMOUNTS}" ]
@@
-1857,6
+1876,18
@@
mountroot ()
# when booting FAI, this simple workaround solves it
ls /root/* >/dev/null 2>&1
# when booting FAI, this simple workaround solves it
ls /root/* >/dev/null 2>&1
+ # copy snapshot configuration if exists
+ if [ -f snapshot.conf ]
+ then
+ log_begin_msg "Copying snapshot.conf to ${rootmnt}/etc/live/boot.d"
+ if [ ! -d "${rootmnt}/etc/live/boot.d" ]
+ then
+ mkdir -p "${rootmnt}/etc/live/boot.d"
+ fi
+ cp snapshot.conf "${rootmnt}/etc/live/boot.d/"
+ log_end_msg
+ fi
+
maybe_break live-bottom
log_begin_msg "Running /scripts/live-bottom\n"
maybe_break live-bottom
log_begin_msg "Running /scripts/live-bottom\n"