summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-08-10 01:57:53 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:58:08 +0100
commit52dcef518bdb95605670b8dc12257057bf7a2dc0 (patch)
tree638f1c1ebb55ebcc0363eca6076bc7c379e568cf /bin
parent432f4b1dfead12040d21d15fd2f3ecc033ac5ca3 (diff)
downloadlive-boot-52dcef518bdb95605670b8dc12257057bf7a2dc0.tar.gz
live-boot-52dcef518bdb95605670b8dc12257057bf7a2dc0.zip
Adding debian version 3.0~a1-1.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/live-snapshot12
-rwxr-xr-xbin/live-system49
-rwxr-xr-xbin/live-toram120
3 files changed, 6 insertions, 175 deletions
diff --git a/bin/live-snapshot b/bin/live-snapshot
index eccabbc..08e5fd6 100755
--- 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.
#
-# Copyright (C) 2006-2011 Marco Amadori <marco.amadori@gmail.com>
+# Copyright (C) 2006-2008 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
@@ -39,7 +39,7 @@ fi
. /usr/share/initramfs-tools/scripts/live-helpers
-LIVE_CONF="/etc/live/boot.d/snapshot.conf"
+LIVE_CONF="/etc/live.conf"
if [ -r "${LIVE_CONF}" ]
then
@@ -125,12 +125,12 @@ Version ()
{
echo "${PROGRAM}"
echo
- echo "Copyright (C) 2006-2011 Marco Amadori <marco.amadori@gmail.com>"
+ echo "Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>"
echo "Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>"
echo
echo "This program is free software; you can redistribute it and/or modify"
echo "it under the terms of the GNU General Public License as published by"
- echo "the Free Software Foundation; either version 3 of the License, or"
+ echo "the Free Software Foundation; either version 2 of the License, or"
echo "(at your option) any later version."
echo
echo "This program is distributed in the hope that it will be useful,"
@@ -143,7 +143,7 @@ Version ()
echo "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
echo
echo "On Debian systems, the complete text of the GNU General Public License"
- echo "can be found in /usr/share/common-licenses/GPL-3 file."
+ echo "can be found in /usr/share/common-licenses/GPL-2 file."
echo
echo "Homepage: <http://debian-live.alioth.debian.org/>"
@@ -242,7 +242,7 @@ Defaults ()
# Parse resync string
if [ -n "${SNAP_RESYNC_STRING}" ]
then
- SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | sed -r -e 's#^([^:]*).*$#'"${DEF_SNAP_COW}"'\1#')
+ SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | sed -e 's|^/root\([^:.]*\).*$|'"${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}"
diff --git a/bin/live-system b/bin/live-system
deleted file mode 100755
index 026ab64..0000000
--- a/bin/live-system
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-
-# Redirect stdout to stderr
-exec 1>&2
-
-case "${1}" in
- -h|--help|-u|--usage)
- echo "live-system - determine if running system is a live system"
- echo
- echo "Usage: ${0} [-v|--verbose]"
-
- exit 2
- ;;
-
- -v|--verbose)
- _VERBOSE="true"
- ;;
-esac
-
-[ "${_VERBOSE}" ] && echo -n "Checking for live-system... "
-
-if [ ! -e /proc/cmdline ]
-then
- echo "E: /proc/cmdline - No such file."
- exit 2
-fi
-
-if grep -qs boot=live /proc/cmdline
-then
- [ "${_VERBOSE}" ] && echo -n " yes, this is a live system"
-
- if [ -d /live/image/install ]
- then
- if ls /live/image/install/pool/main/l/live-installer/live-installer_*.udeb > /dev/null 2>&1
- then
- [ "${_VERBOSE}" ] && echo " with live-installer support."
- else
- [ "${_VERBOSE}" ] && echo " without live-installer support."
- fi
- else
- [ "${_VERBOSE}" ] && echo "without installer support."
- fi
-
- exit 0
-else
- [ "${_VERBOSE}" ] && echo " no, this is not a live system."
-
- exit 1
-fi
diff --git a/bin/live-toram b/bin/live-toram
deleted file mode 100755
index b7740a2..0000000
--- a/bin/live-toram
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/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