public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, thirteen, updated. f6057233ecd1e417fefec08a6b8bfc9fa5e7f25b
Date: Sat, 03 Nov 2012 17:05:59 +0100	[thread overview]
Message-ID: <20121103160559.BBEE0200C8@argus.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2611 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, thirteen has been updated
       via  f6057233ecd1e417fefec08a6b8bfc9fa5e7f25b (commit)
      from  534fb55f9d0a212c5d857eb3eccabe5c08df1ba1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f6057233ecd1e417fefec08a6b8bfc9fa5e7f25b
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date:   Sat Nov 3 17:05:13 2012 +0100

    installer: remove whitespaces from target drivestring.

-----------------------------------------------------------------------

Summary of changes:
 src/install+setup/install/mountdest.sh |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

Difference in files:
diff --git a/src/install+setup/install/mountdest.sh b/src/install+setup/install/mountdest.sh
index 068659c..f2c4b53 100644
--- a/src/install+setup/install/mountdest.sh
+++ b/src/install+setup/install/mountdest.sh
@@ -95,7 +95,8 @@ for path in /sys/block/*; do
 		continue
 	fi
 
-	if [ $(cat /sys/block/${device}/size) == 0 ]; then
+	device_size=$(cat /sys/block/${device}/size)
+	if [ "${device_size}" = "0" ]; then
 		echo "  is empty - skipping"
 		continue
 	fi
@@ -104,14 +105,18 @@ for path in /sys/block/*; do
 	echo "  OK, this is it..."
 	echo -n "${device_}" > /tmp/dest_device
 
+	# Disk size to GiB.
+	device_size=$(( ${device_size} / 2097152 ))
+
 	# Build string with drive details
-	echo -n "/dev/${device_} (" > /tmp/dest_device_info
-	# size is in sectors (512 Bytes)
-	let DISK_SIZE=$(cat /sys/block/${device}/size)/2097152
-	echo -n "$DISK_SIZE GB - " >> /tmp/dest_device_info
-	echo -n "$(cat /sys/block/${device}/device/vendor) " >> /tmp/dest_device_info
-	echo -n "$(cat /sys/block/${device}/device/model) " >> /tmp/dest_device_info
-	echo -n "$(cat /sys/block/${device}/device/rev))" >> /tmp/dest_device_info
+	device_str="/dev/${device_} - ${device_size} GiB -"
+	device_str="${device_str} $(cat /sys/block/${device}/device/vendor)"
+	device_str="${device_str} $(cat /sys/block/${device}/device/model)"
+
+	# Remove all whitespace.
+	device_str=$(echo ${device_str})
+
+	echo -n "${device_str}" > /tmp/dest_device_info
 
 	# Exit code table:
 	#  1: sda


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2012-11-03 16:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121103160559.BBEE0200C8@argus.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox