[Bug 116633] Re: cryptsetup luksFormat fails with obscure error message when device is mounted
** Branch linked: lp:ubuntu/karmic/cryptsetup -- cryptsetup luksFormat fails with obscure error message when device is mounted https://bugs.launchpad.net/bugs/116633 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 116633] Re: cryptsetup luksFormat fails with obscure error message when device is mounted
Thanks a lot for applying the patch and upload the updated version :) -- cryptsetup luksFormat fails with obscure error message when device is mounted https://bugs.launchpad.net/bugs/116633 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 116633] Re: cryptsetup luksFormat fails with obscure error message when device is mounted
fix released in gutsy ** Changed in: cryptsetup (Ubuntu) Assignee: (unassigned) = Reinhard Tartler Status: Unconfirmed = Fix Released -- cryptsetup luksFormat fails with obscure error message when device is mounted https://bugs.launchpad.net/bugs/116633 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 116633] Re: cryptsetup luksFormat fails with obscure error message when device is mounted
Here is a small patch to add a check for this to luksformat: diff -u cryptsetup-1.0.4+svn29/debian/scripts/luksformat cryptsetup-1.0.4+svn29/debian/scripts/luksformat --- cryptsetup-1.0.4+svn29/debian/scripts/luksformat +++ cryptsetup-1.0.4+svn29/debian/scripts/luksformat @@ -29,6 +29,14 @@ $device = $ARGV[0]; +open(MOUNTS, /proc/mounts); +foreach $line (MOUNTS) { +if ($line =~ $device) { + print STDERR Error: device mounted: $device\n; + exit 1; +} +} + $mkfs = /sbin/mkfs.$fs; if (! -x $mkfs) { print STDERR Error: invalid file system: $fs\n; -- cryptsetup luksFormat fails with obscure error message when device is mounted https://bugs.launchpad.net/bugs/116633 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 116633] Re: cryptsetup luksFormat fails with obscure error message when device is mounted
someone with more perl-foo than me will probably want to review the patch :) -- cryptsetup luksFormat fails with obscure error message when device is mounted https://bugs.launchpad.net/bugs/116633 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 116633] Re: cryptsetup luksFormat fails with obscure error message when device is mounted
Updated debdiff after some review from #ubuntu-devel diff -u cryptsetup-1.0.4+svn29/debian/scripts/luksformat cryptsetup-1.0.4+svn29/debian/scripts/luksformat --- cryptsetup-1.0.4+svn29/debian/scripts/luksformat +++ cryptsetup-1.0.4+svn29/debian/scripts/luksformat @@ -29,6 +29,11 @@ $device = $ARGV[0]; +open(MOUNTS, /proc/mounts); +while (MOUNTS) { +die Error: device mounted: $device\n if (/\Q$device\E/) +} + $mkfs = /sbin/mkfs.$fs; if (! -x $mkfs) { print STDERR Error: invalid file system: $fs\n; -- cryptsetup luksFormat fails with obscure error message when device is mounted https://bugs.launchpad.net/bugs/116633 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 116633] Re: cryptsetup luksFormat fails with obscure error message when device is mounted
** Tags added: patch -- cryptsetup luksFormat fails with obscure error message when device is mounted https://bugs.launchpad.net/bugs/116633 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs