Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 338876

Summary: sys-fs/cryptsetup: allow for multiple rcscripts
Product: Gentoo Linux Reporter: Wolfram <wolfram>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: minor CC: thomas.bettler
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 350399    
Attachments: Patch for dmcrypt start script which allows to use different configs
Patch for dmcrypt start script which allows to use different configs
Patch for dmcrypt stop script which allows to use different configs
Shellscript which generates patched rcscripts versions and installs them into /opt
Fixed version of start script patch
Fixed version of stop script patch
Improved rcscripts patch

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