Skip to contentSkip to conversation

Fail to boot if mediacheck fails (#817419)

PATCH In review Brian C. Lane 3 participants 3 messages May 9, 2012 – May 10, 2012 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fail to boot if mediacheck fails (#817419)

From: "Brian C. Lane" <[email protected]>

The return value of checkisomd5 was being ignored.

---
 modules.d/90dmsquash-live/dmsquash-live-root.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
modules.d/90dmsquash-live/dmsquash-live-root.sh +1 -1
index 2aaec28..fdbd6f5 100755
@@ -33,7 +33,7 @@ fi
 getarg rd.live.check check || check=""
 if [ -n "$check" ]; then
     [ -x /bin/plymouth ] && /bin/plymouth --hide-splash
-    checkisomd5 --verbose $livedev || :
+    checkisomd5 --verbose $livedev
     if [ $? -ne 0 ]; then
         die "CD check failed!"
         exit 1
Signature · 1 line
1.7.7.6
#2 lore raw
In reply to a message not in the archive

Am 09.05.2012 20:15, schrieb Brian C. Lane:

Quoted 12 lines

From: "Brian C. Lane" <[email protected]>

The return value of checkisomd5 was being ignored.

---
 modules.d/90dmsquash-live/dmsquash-live-root.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
modules.d/90dmsquash-live/dmsquash-live-root.sh +0 -0
index 2aaec28..fdbd6f5 100755

modules.d/90dmsquash-live/dmsquash-live-root.sh fi · line 39

Quoted 8 lines
modules.d/90dmsquash-live/dmsquash-live-root.sh +1 -1
@@ -33,7 +33,7 @@ fi
 getarg rd.live.check check || check=""
 if [ -n "$check" ]; then
     [ -x /bin/plymouth ] && /bin/plymouth --hide-splash
-    checkisomd5 --verbose $livedev || :
+    checkisomd5 --verbose $livedev
     if [ $? -ne 0 ]; then
         die "CD check failed!"
         exit 1

So, it was wrong from the beginning on... rofl..

commit c56b63d1bd06e3eaf149502d7c46c59a5978fd44

Author: Jeremy Katz <[email protected]>
Date:   Wed Jul 22 16:06:29 2009 -0400

Support checking the iso

Support checking the iso image with checkisomd5 if available

#4 lore raw
In reply to a message not in the archive
Quoted 8 lines · Harald Hoyer

Am 09.05.2012 20:15, schrieb Brian C. Lane:

modules.d/90dmsquash-live/dmsquash-live-root.sh fi · line 36

Quoted 4 lines

The return value of checkisomd5 was being ignored.

modules.d/90dmsquash-live/dmsquash-live-root.sh +1 -1
-    checkisomd5 --verbose $livedev || :
+    checkisomd5 --verbose $livedev

So, it was wrong from the beginning on... rofl..

And the "fix" is still not the best. There should be an _option_ to "perform the check, but ignore the result". The user may want to try booting anyway. implantisomd5 generates separate checksums for 20 separate areas. If checkisomd5 indicates that exactly one area is bad, and it is number 19 of 20 [from the beginning], then continuing to boot may be a very reasonable choice.