* [git.ipfire.org] IPFire 2.x development tree branch, thirteen, updated. f6057233ecd1e417fefec08a6b8bfc9fa5e7f25b
@ 2012-11-03 16:05 git
0 siblings, 0 replies; only message in thread
From: git @ 2012-11-03 16:05 UTC (permalink / raw)
To: ipfire-scm
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-03 16:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-03 16:05 [git.ipfire.org] IPFire 2.x development tree branch, thirteen, updated. f6057233ecd1e417fefec08a6b8bfc9fa5e7f25b git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox