[Debian-live-changes] r1395 - in dists/trunk/live-initramfs: bin
docs
Daniel Baumann
daniel at alioth.debian.org
Tue May 8 16:51:10 UTC 2007
Author: daniel
Date: 2007-05-08 16:51:09 +0000 (Tue, 08 May 2007)
New Revision: 1395
Modified:
dists/trunk/live-initramfs/bin/live-snapshot
dists/trunk/live-initramfs/docs/ChangeLog
Log:
Modified: dists/trunk/live-initramfs/bin/live-snapshot
===================================================================
--- dists/trunk/live-initramfs/bin/live-snapshot 2007-05-08 11:54:18 UTC (rev 1394)
+++ dists/trunk/live-initramfs/bin/live-snapshot 2007-05-08 16:51:09 UTC (rev 1395)
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/bin/sh
# casper-snapshot - utility to manage Debian Live systems snapshots
#
@@ -28,13 +28,12 @@
PROGRAM="`basename $0`"
VERSION=0.0.1
-
# Source live conf
if [ -e /etc/live.conf ]; then
. /etc/live.conf
else
- USERNAME=$(cat /etc/passwd | grep "999" | cut -f1 -d ':')
- HOSTNAME=$(hostname)
+ USERNAME="`cat /etc/passwd | grep '999' | cut -f1 -d ':'`"
+ HOSTNAME="`hostname`"
BUILD_SYSTEM="Debian"
fi
@@ -45,7 +44,7 @@
if [ -e "${helpers}" ]; then
. "${helpers}"
else
- echo "Error: I cannot found helper functions \"${helpers}\"."
+ echo "Error: I couldn't find helper functions \"${helpers}\"."
exit 1
fi
@@ -122,7 +121,7 @@
echo "On Debian systems, the complete text of the GNU General Public License"
echo "can be found in /usr/share/common-licenses/GPL file."
echo
- echo "Homepage: <http://live.debian.net/>"
+ echo "Homepage: <http://debian-live.alioth.debian.org/>"
exit 0
}
@@ -154,7 +153,7 @@
{
dir1="`Base_path $1`"
dir2="`Base_path $2`"
- if [ "${dir1}" == "${dir2}" ]; then
+ if [ "${dir1}" = "${dir2}" ]; then
return 0
else
return 1
@@ -231,10 +230,10 @@
DESKTOP_LINK=/home/$USERNAME/Desktop/live-snapshot
if [ -n "${SNAP_RSTRING}" ]; then
- COW=$(echo "${SNAP_RSTRING}" | cut -f1 -d ':')
- DEV=$(echo "${SNAP_RSTRING}" | cut -f2 -d ':')
- DEST=$(echo "${SNAP_RSTRING}" | cut -f3 -d ':')
-
+ COW="`echo ${SNAP_RSTRING} | cut -f1 -d ':'`"
+ DEV="`echo ${SNAP_RSTRING} | cut -f2 -d ':'`"
+ DEST="`echo ${SNAP_RSTRING} | cut -f3 -d ':'`"
+
case "${DEST}" in
*.cpio.gz)
TYPE="cpio" ;;
@@ -255,7 +254,7 @@
else
COW="${SNAP_COW}"
fi
-
+
case "${SNAP_TYPE}" in
"cpio"|"squashfs"|"ext2")
TYPE="${SNAP_TYPE}"
@@ -266,8 +265,8 @@
Usage "Error: unrecognized snapshot type"
;;
esac
- #if [ -d
- #if Is_same_mount
+ #if [ -d
+ #if Is_same_mount
fi
# check vars
@@ -284,7 +283,7 @@
if [ -n "$DEV" ]; then
umount "${MOUNTP}"
rmdir "${MOUNTP}"
- rm
+ #rm
fi
}
Modified: dists/trunk/live-initramfs/docs/ChangeLog
===================================================================
--- dists/trunk/live-initramfs/docs/ChangeLog 2007-05-08 11:54:18 UTC (rev 1394)
+++ dists/trunk/live-initramfs/docs/ChangeLog 2007-05-08 16:51:09 UTC (rev 1395)
@@ -1,3 +1,8 @@
+2007-05-08 Daniel Baumann <daniel at debian.org>
+
+ * bin/live-snapshot:
+ - Removed bashism and a few minor cleanups.
+
2007-05-07 Daniel Baumann <daniel at debian.org>
* debian/control:
More information about the Debian-live-changes
mailing list