Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338876 - sys-fs/cryptsetup: allow for multiple rcscripts
Summary: sys-fs/cryptsetup: allow for multiple rcscripts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 350399
  Show dependency tree
 
Reported: 2010-09-27 04:18 UTC by Wolfram
Modified: 2011-01-07 23:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for dmcrypt start script which allows to use different configs (dm-crypt-start.sh,8.19 KB, text/plain)
2010-09-27 05:21 UTC, Wolfram
Details
Patch for dmcrypt start script which allows to use different configs (dm-crypt-start.patch,2.01 KB, text/plain)
2010-09-27 05:23 UTC, Wolfram
Details
Patch for dmcrypt stop script which allows to use different configs (dm-crypt-stop.patch,1.31 KB, text/plain)
2010-09-27 05:23 UTC, Wolfram
Details
Shellscript which generates patched rcscripts versions and installs them into /opt (dmc_p,507 bytes, text/plain)
2010-09-27 05:26 UTC, Wolfram
Details
Fixed version of start script patch (dm-crypt-start.patch,2.01 KB, text/plain)
2010-09-27 05:43 UTC, Wolfram
Details
Fixed version of stop script patch (dm-crypt-stop.patch,1.31 KB, text/plain)
2010-09-27 05:44 UTC, Wolfram
Details
Improved rcscripts patch (dmcrypt-rc.patch,2.70 KB, text/plain)
2010-09-29 04:01 UTC, Wolfram
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram 2010-09-27 04:18:11 UTC
I have /tmp, /home and swap volume encrypted with cryptsetup.
/tmp and swap are using random encryption keys, so only key for /home/ volume should be entered. Also I want to have my machine accessible via ssh even after power failure and reboot, so I want to run cryptsetup for swap and /tmp at boot runlevel and run cryptsetup for /home at default runlevel.

I've copied /etc/init.d/dmcrypt to /etc/init.d/dmcrypt_deferred and created separate config /etc/conf.d/dmcrypt_deferred but then I've found that /etc/init.d/dmcrypt uses scripts /lib/rcscripts/addons/dm-crypt-start.sh and /lib/rcscripts/addons/dm-crypt-stop.sh which have hardcoded value "etc/conf.d/dmcrypt"

I think that these scripts should use ${SVCNAME} to determine which config from conf.d to use.

So, I've created quick path which I'll attach to this issue later.








Reproducible: Always

Steps to Reproduce:
Comment 1 Wolfram 2010-09-27 05:21:42 UTC
Created attachment 248738 [details]
Patch for dmcrypt start script which allows to use different configs
Comment 2 Wolfram 2010-09-27 05:23:09 UTC
Created attachment 248740 [details]
Patch for dmcrypt start script which allows to use different configs

I'm awfully sorry, attachment #1 [details] contains wrong file
Comment 3 Wolfram 2010-09-27 05:23:33 UTC
Created attachment 248742 [details]
Patch for dmcrypt stop script which allows to use different configs
Comment 4 Wolfram 2010-09-27 05:25:33 UTC
I've attached patches for rcscripts which allow to create symlinks like

ln -s /etc/init.d/dmcrypt /etc/init.d/dmcrypt.deferred 

and use different configs for them, like /etc/conf.d/dmcrypt and /etc/conf.d/dmcrypt.deferred
Comment 5 Wolfram 2010-09-27 05:26:47 UTC
Created attachment 248744 [details]
Shellscript which generates patched rcscripts versions and installs them into /opt
Comment 6 Wolfram 2010-09-27 05:43:52 UTC
Created attachment 248747 [details]
Fixed version of start script patch
Comment 7 Wolfram 2010-09-27 05:44:33 UTC
Created attachment 248749 [details]
Fixed version of stop script patch
Comment 8 SpanKY gentoo-dev 2010-09-27 18:36:23 UTC
does the splash lines also need ${SVCNAME%.*} ?  seems like those should stick with ${SVCNAME}.

i dont think the line that is for baselayout-1 compat needs changing either.

the rest looks fine i guess.
Comment 9 Wolfram 2010-09-28 15:52:56 UTC
Ok, I agree with your comments.

So, is it possible that my or similar patches will be applied?
Comment 10 SpanKY gentoo-dev 2010-09-28 16:47:19 UTC
post updated patches incorporating my feedback and i'll merge them
Comment 11 Wolfram 2010-09-29 04:01:27 UTC
Created attachment 248944 [details]
Improved rcscripts patch
Comment 12 SpanKY gentoo-dev 2010-09-30 01:34:57 UTC
thanks, ive added that to cryptsetup-1.1.3-r1