Bug 483269 - Can't set up encrypted swap.
Can't set up encrypted swap.
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-30 11:41 EST by Valdis Kletnieks
Modified: 2014-03-16 23:17 EDT (History)
2 users (show)

See Also:
Fixed In Version: 8.86.3-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-20 17:04:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Possible patch to fix the problem (843 bytes, application/octet-stream)
2009-01-30 11:41 EST, Valdis Kletnieks
no flags Details

  None (edit)
Description Valdis Kletnieks 2009-01-30 11:41:26 EST
Created attachment 330486 [details]
Possible patch to fix the problem

Description of problem:
There's a bug in init_crypto{} in /etc/rc.sysinit, as follows:
        else
            [ -z "$key" ] && plymouth --hide-splash
            /sbin/cryptsetup $params ${key:+-d $key} create "$dst" "$src" <&1 2>
/dev/null && success || failure
            [ -z "$key" ] && plymouth --show-splash
        fi
        rc=$?
        if [ $rc -ne 0 ]; then
            ret=1
            continue
        fi

This *used* to work, but with the recent addition of the two 'plymouth' calls around cryptsetup, the value of $? is no longer capturing cryptsetup, but
the line after it.  The 'rc=$?' needs to be moved up after the cryptsetup, and probably added in several other places in the preceding lines.  I've attached a potential patch for the issue.


Version-Release number of selected component (if applicable):
initscripts-8.89-1.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Bill Nottingham 2009-03-20 17:04:47 EDT
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=23985b14531dab30732b743938b1b1d3ccdd314b

Also cherry-picked to the F-10 branch for a future update.
Comment 2 Fedora Update System 2009-04-02 14:04:25 EDT
initscripts-8.86.1-1 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/initscripts-8.86.1-1
Comment 3 Fedora Update System 2009-04-03 00:16:06 EDT
initscripts-8.86.2-1 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/initscripts-8.86.2-1
Comment 4 Fedora Update System 2009-04-22 16:22:36 EDT
initscripts-8.86.3-1 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.