View | Details | Raw Unified | Return to bug 258222
Collapse All | Expand All

(-)src/modules/RootPart.ycp (-6 / +7 lines)
Lines 73-79 Link Here
73
     *
73
     *
74
     * Keys/values are:
74
     * Keys/values are:
75
     *
75
     *
76
     *   `type     The type, one of "mount", "swap" or "loop".
76
     *   `type     The type, one of "mount", "swap" or "crypt".
77
     *
77
     *
78
     *   `device   The device.
78
     *   `device   The device.
79
     *
79
     *
Lines 219-231 Link Here
219
			y2error("Cannot deactivate swap %1", device);
219
			y2error("Cannot deactivate swap %1", device);
220
		    }
220
		    }
221
		}
221
		}
222
		else if (type == "loop")
222
		else if (type == "crypt")
223
		{
223
		{
224
		    string device = info[`device]:"";
224
		    string dmname = info[`device]:"";
225
		    dmname = "cr_" + substring( dmname, findlastof( dmname, "/" )+1 );
225
		    // FIXME? is it safe?
226
		    // FIXME? is it safe?
226
		    if (WFM::Execute(.local.bash, "losetup -d " + device) != 0)
227
		    if (WFM::Execute(.local.bash, "cryptsetup remove " + dmname) != 0)
227
		    {
228
		    {
228
			y2error("Cannot deactivate loopback device %1", device);
229
			y2error("Cannot remove dm device %1", dmname);
229
		    }
230
		    }
230
		}
231
		}
231
	    }
232
	    }
Lines 818-824 Link Here
818
				    "passno" : 0,
819
				    "passno" : 0,
819
				    "vfstype": vfstype ];
820
				    "vfstype": vfstype ];
820
		    fstab = prepend (fstab, add_fs);
821
		    fstab = prepend (fstab, add_fs);
821
		    AddMountedPartition ($[`type : "loop", `device : device]);
822
		    AddMountedPartition ($[`type : "crypt", `device : device]);
822
		    again = false;
823
		    again = false;
823
		}
824
		}
824
	      }
825
	      }

Return to bug 258222