2009/8/24 Daniel Baumann <dan...@debian.org>: > Rui Miguel Bernardo wrote: >> Have fun, > > ... included it in examples/hooks (and removed useless whitespaces at > EOL), thanks ;) > > Regards, > Daniel
Your welcome :) I didn't expect this to get into the examples hooks, so here are some improvements to make this hook more worthy of being included in examples. The hook was working but some instructions/comments and output are confusing and/or wrong. I've took some time trying to improve them (sorry for my limited english, not my mother language) and included most of the instructions in one of the scripts because the hook itself, which has the instructions, isn't saved in the built live system, leaving the user without any instructions how to use the hook. Also added more checks and missing commands and some more details. The size of the hook is almost illegal in certain countries, so I'm holding myself not to add more stuff in it, but maybe it's needed. Complete list of changes Correcting some rough edges in lukshome hook: * several rephrasing to clarify/correct things because some wording was ambiguous/wrong. * changed instructions to use a mounted partition when creating the file. In the previous instructions the present directory was used and if it was $HOME, then the file was created in the live memory (aufs/unionfs). Ofcourse using memory to create the file would limit the size of the file to the size of free memory. * moved part of the instructions to inside create-lukshome-file.sh so the user can see them because the hook itself is not saved in the built live system. * added a check to see if /mnt directory is empty. * added some missing "umounts" and "cryptsetup remove" in some error checks. * removed the proposal of copying from another mounted /home/ directory. It could be confusing to the user. The user should do it later, with the live system booted with lukshome boot option, which should be the next thing he/her will do anyway. * renamed variable ERROR_LEVEL to EXIT_CODE (sounded too much a redmond batch file). I think it's better now. Maybe it's not. I could try to make less changes if needed. No patch file because I haven't git installed and from running diff I see it would be a 14 KB patch. Have fun, Rui M. P. Bernardo
losetup-lukshome.sh
Description: Bourne shell script