From 0b7e7606d03618626d51e31652521307c8267720 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 6 Nov 2006 23:50:45 +0100 Subject: [PATCH] * Use different exit codes for different code parts, and quote $ISO, thanks - Richard Hartmann! * Remove unused configure lines in debian/rules. --- debian/changelog | 7 +++++++ debian/rules | 14 ++------------ grml2usb | 12 ++++++------ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index c0501ff..74f8d87 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml2usb (0.6-2) unstable; urgency=low + + * Use different exit codes for different code parts, and quote + $ISO, thanks - Richard Hartmann! + + -- Michael Prokop Mon, 6 Nov 2006 23:48:46 +0100 + grml2usb (0.6-1) unstable; urgency=low * Allow overwriting of $TMPMNT. diff --git a/debian/rules b/debian/rules index 01b49f8..3b6a2d0 100755 --- a/debian/rules +++ b/debian/rules @@ -9,29 +9,20 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - - build: build-stamp -build-stamp: configure-stamp +build-stamp: dh_testdir # Add here commands to compile the package. - touch build-stamp clean: dh_testdir dh_testroot - rm -f build-stamp configure-stamp + rm -f build-stamp # Add here commands to clean up after the build process. - dh_clean install: build @@ -43,7 +34,6 @@ install: build # Add here commands to install the package into debian/grml2usb. install -m 755 grml2usb debian/grml2usb/usr/sbin/ - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. diff --git a/grml2usb b/grml2usb index 1a69cb4..f6815ef 100755 --- a/grml2usb +++ b/grml2usb @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mit Okt 04 22:52:03 CEST 2006 [mika] +# Latest change: Mon Nov 06 23:48:26 CET 2006 [mika] ################################################################################ # colors {{{ @@ -49,7 +49,7 @@ LANGUAGE='C' LC_ALL='C' PROGRAMNAME=${0##*/} - VERSION='0.6' + VERSION='0.7' ISO="$1" DEVICE="$2" [ -n "$TMPMNT" ] || TMPMNT='/mnt/test' @@ -62,7 +62,7 @@ bailout(){ echo "Exiting - umounting /mnt/test and $DEVICE" umount /mnt/test 2>/dev/null umount $DEVICE 2>/dev/null - exit 1 + exit 2 } usage() @@ -135,12 +135,12 @@ mount_device(){ mount_iso(){ echo -n "Mounting ${ISO} to ${TMPMNT}: " debugit "debug: mount -o loop ${ISO} ${TMPMNT}" - if mount -o loop ${ISO} ${TMPMNT} ; then + if mount -o loop "${ISO}" ${TMPMNT} ; then echo "${WHITE}done${NORMAL}" else echo 1>&2 "${RED}Problem? You got an error saying 'mount: could not find any free loop device'? Possible solution: losetup -d /dev/loop/0${NORMAL}" - exit 1 + exit 3 fi } @@ -184,7 +184,7 @@ Try to call it manually via 'syslinux /dev/sda1' if you installed grml to /dev/s trap bailout 1 2 3 15 if [[ $# != 2 ]]; then - usage ; exit 1 + usage ; exit 4 fi if [ -n "$UNINSTALL" ] ; then -- 2.1.4