First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 168691
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jakob Truelsen <antialize@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
halt.patch A patch that fixes the problem in most cases patch Jakob Truelsen 2007-02-28 09:03 0000 402 bytes Details | Diff
halt.patch Patch for halt.sh patch Jakob Truelsen 2007-02-28 15:34 0000 311 bytes Details | Diff
truecrypt-4.2a-r3.patch A patch for the ebuild patch Jakob Truelsen 2007-02-28 15:35 0000 393 bytes Details | Diff
truecrypt-4.2a-stop.sh The stop part og the addon text/plain Jakob Truelsen 2007-02-28 15:36 0000 254 bytes Details
truecrypt-stop.sh truecrypt-stop.sh text/plain Alon Bar-Lev (RETIRED) 2007-03-01 17:21 0000 263 bytes Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 168691 depends on: Show dependency tree
Bug 168691 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-02-28 09:01 0000
If a truecrypt drive is mounted... / cannot be remounted as read only (similar
to dm-crypt).. This yields improper halt..

Reproducible: Always

Steps to Reproduce:
1. Mount a file with truecrypt
2. Shutdown

Actual Results:  
Bad shutdown

Expected Results:  
God shutdown

truecrypt -d

------- Comment #1 From Jakob Truelsen 2007-02-28 09:03:25 0000 -------
Created an attachment (id=111526) [edit]
A patch that fixes the problem in most cases

This fixes the problem if there are no nested mounts (and who would make them?)

------- Comment #2 From SpanKY 2007-02-28 14:54:40 0000 -------
this is not how we want to do things anymore

truecrypt should implement at least a stop addon which we would call via
`stop_addon truecrypt`

see the dm-crypt addons as an example

------- Comment #3 From Jakob Truelsen 2007-02-28 15:34:04 0000 -------
Created an attachment (id=111575) [edit]
Patch for halt.sh

A better patch for halt.sh

------- Comment #4 From Jakob Truelsen 2007-02-28 15:35:18 0000 -------
Created an attachment (id=111576) [edit]
A patch for the ebuild

Make the ebuild install the addon

------- Comment #5 From Jakob Truelsen 2007-02-28 15:36:22 0000 -------
Created an attachment (id=111577) [edit]
The stop part og the addon

Make truecrypt "dismount" its mappings

------- Comment #6 From Alon Bar-Lev (RETIRED) 2007-02-28 18:31:03 0000 -------
SpanKY: I don't understand exactly what you wish us to do here... It seems not
wise to patch the halt script...
Maybe it should dynamically find the addons?

------- Comment #7 From SpanKY 2007-03-01 06:45:06 0000 -------
the addons belong with the respective ebuilds ... so you need to
review/approve/merge the proposed addon here before we update baselayout

yes, it should prob be a bit more dynamic in baselayout, but we'll worry about
that later ... 1.12.x will include an explicit call to stop_addon

------- Comment #8 From Alon Bar-Lev (RETIRED) 2007-03-01 17:21:24 0000 -------
Created an attachment (id=111713) [edit]
truecrypt-stop.sh

OK, added to portage, truecrypt-4.2a-r3.
With minor modifications...

------- Comment #9 From Roy Marples (RETIRED) 2007-03-02 21:08:07 0000 -------
(In reply to comment #7)
> yes, it should prob be a bit more dynamic in baselayout, but we'll worry about
> that later ... 1.12.x will include an explicit call to stop_addon

I'm hopeful that we can have them as init scripts with baselayout-2. I'm not
saying that's a design goal, but in theory it should be possible for everything
including udev/devfs to be an init script.

------- Comment #10 From Alon Bar-Lev (RETIRED) 2007-04-02 11:12:20 0000 -------
basesystem: Can you please add your side?

------- Comment #11 From Roy Marples (RETIRED) 2007-04-02 11:57:50 0000 -------
Added to our svn repo.

------- Comment #12 From Alon Bar-Lev (RETIRED) 2007-06-13 09:18:50 0000 -------
uberlord: When can I close this one?

------- Comment #13 From Alon Bar-Lev (RETIRED) 2007-06-23 09:17:38 0000 -------
base-system: please decide when we can close this issue.

------- Comment #14 From Thorsten Kampe 2007-08-10 11:58:46 0000 -------
The addon script (or truecrypt) is buggy. When no truecrypt volumes are
mounted, halt.sh shows the failed umounting of the non-existing truecrypt
volumes like this in red [!!].

Obviously it is no error when no truecrypt volumes are mounted.

------- Comment #15 From Alon Bar-Lev (RETIRED) 2007-08-10 12:19:04 0000 -------
Please suggest how to solve this...
As the only bug may be:
/usr/bin/truecrypt -d
And by your report this returns none zero if no mount is available...

Is there any other command that can return if any is mounted? So we may execute
the above only if something is mounted?

------- Comment #16 From Jakob Truelsen 2007-08-10 13:03:36 0000 -------
one can do
truecrypt -l 2>&1 | grep -q  "No volumes mapped" || truecrypt -d

though it will not display any errormessages from truecrypt -1 but that is prob
ok

------- Comment #17 From Thorsten Kampe 2007-08-10 13:52:10 0000 -------
I think it would make more sense to see if truecrypt gives different error
codes depending on whether there are real errors or just no volumes to unmount.
And only pass the real errors to halt.sh

------- Comment #18 From Alon Bar-Lev (RETIRED) 2007-08-10 21:55:39 0000 -------
Jakob:
Can you please try:
truecrypt -l 2>&1 && truecrypt -d

------- Comment #19 From Alon Bar-Lev (RETIRED) 2007-08-11 00:24:04 0000 -------
Opps...

Jakob:
Can you please try:
truecrypt -l > /dev/null 2>&1 && truecrypt -d

------- Comment #20 From Jakob Truelsen 2007-08-11 07:42:27 0000 -------
(In reply to comment #19)
> Opps...
> 
> Jakob:
> Can you please try:
> truecrypt -l > /dev/null 2>&1 && truecrypt -d
> 

As you can se from the following, the one with grep that I proposed, works, The
one you proposed does not

geneshaft jakobt # truecrypt volume.tc /mnt/stuff/
geneshaft jakobt # truecrypt -l 2>&1 | grep -q  "No volumes mapped" ||
truecrypt -d; echo $?
0
geneshaft jakobt # truecrypt -l 2>&1 | grep -q  "No volumes mapped" ||
truecrypt -d; echo $?
0
geneshaft jakobt # truecrypt volume.tc /mnt/stuff/
geneshaft jakobt # truecrypt -l > /dev/null 2>&1 && truecrypt -d; echo $?
0
geneshaft jakobt # truecrypt -l > /dev/null 2>&1 && truecrypt -d; echo $?
1


------- Comment #21 From Jakob Truelsen 2007-08-11 07:49:10 0000 -------
One could also do
! truecrypt -l > /dev/null 2>&1  || truecrypt -d; echo $?

But that would indicate that all went well also if some error occured in
"truecrypt -l"

------- Comment #22 From Alon Bar-Lev (RETIRED) 2007-08-11 08:46:26 0000 -------
OK.
Added the last.
Thanks.

Please re-emerge the package.

I am also closing this as it seems baselayout now activate this one... :)

First Last Prev Next    No search results available      Search page      Enter new bug