Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Dengler <martin@martindengler.com>2009-06-23 20:50:51 (GMT)
committer Martin Dengler <martin@martindengler.com>2009-06-23 20:52:49 (GMT)
commit06b60eafb190c135109ce36da1f235b798b0499c (patch)
tree175b116642b4a1407b068233341fe87f2b4d1c76
parent74da5965fc79b04d83699f4b13ed41a3db76cc4b (diff)
don't need to checkMBR() for loop devices
livecd-iso-to-disk.sh doesn't do the right thing w.r.t. loop devices and MBR detection. I don't think this is intentional, but it currently requires loop devices to start with an MBR, by virtue of getdisk() being a NOOP for loop devices and checkMBR assuming that the disk must need an MBR. checkMBR() should just ignore loop devices like other key functions do.
-rwxr-xr-xlivecd-iso-to-disk.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/livecd-iso-to-disk.sh b/livecd-iso-to-disk.sh
index 672e6db..0efef58 100755
--- a/livecd-iso-to-disk.sh
+++ b/livecd-iso-to-disk.sh
@@ -93,6 +93,9 @@ resetMBR() {
}
checkMBR() {
+ if [[ "$DEV" =~ "/dev/loop*" ]]; then
+ return 0
+ fi
getdisk $1
bs=$(mktemp /tmp/bs.XXXXXX)