Commit Graph

21 Commits (b80ee080937ce364f7324c297f23e40af6d88892)

Author SHA1 Message Date
Harald Hoyer 09356085b6 ci: enable shellcheck for everything 2021-03-31 11:31:17 +02:00
Harald Hoyer 2d98cb6f63 fix(crypt-loop): shellcheck for modules.d/91crypt-loop 2021-03-29 10:53:56 +02:00
Harald Hoyer 9a52c3fdb0 style: shfmt reformat
reproducible with:

```
$ shfmt_version=3.0.1
$ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt
$ chmod u+x shfmt
$ ./shfmt -w .
```
2021-03-13 20:10:43 +01:00
Steven Brudenell c427603cd1 Include both and in luks key name. 2017-08-03 21:47:06 -04:00
Steven Brudenell e2b877a18b Change mntp->keydev in loopback key luks name. 2017-08-03 21:47:06 -04:00
Steven Brudenell 690b24f02f Support crypto loop keys in initrd. 2017-08-03 21:47:05 -04:00
Harald Hoyer 2187b3d097 crypt-loop: cleanup cleanup procedures
Using initqueue --finished to cleanup stuff is not what the
initqueue/finished hook was meant for.

Move stuff to the real cleanup hook.
2017-07-28 10:43:39 +02:00
Harald Hoyer 8c5d18c2cb Merge pull request #44 from MrStaticVoid/fix-crypt-loop-info-log-level
crypt-loop: Fix decrypt when running at info log level
2015-06-02 11:49:25 +02:00
James Lee 833e0f9e83 crypt-loop: Always include 'loop' kernel module
When the 'loop' kernel module isn't loaded in a running system, it gets
excluded from the hostonly initrd.  Given that the crypt-loop dracut
module has to be loaded explicitly anyway, it makes sense to always
include the requisite loop kernel module.
2015-03-26 02:17:34 -04:00
James Lee c902aba0d4 crypt-loop: Fix decrypt when running at info log level
When booting with 'rd.info', the 'info' statements in the crypt-loop
module's 'loop_decrypt' function are output to stdout along with the key
that gets piped into the 'cryptsetup' command, which causes the crypt
device unlocking to fail.

There are two possible simple solutions to this problem:

1. Redirect the info messages to stderr (just add '>&2' at the end of
the info statements).

or

2. Remove the info statements altogether.

I have tested both and they both work, but this commit implements #2.
The existing info messages are long (they overflow 80 characters
easily) and redundant (the password prompt clearly indicates what is
happening), and just generally not useful.  Given that no one has
reported or fixed this bug in the three years that this module has
existed, no one will miss these info messages.

The commit also changes an error message in the same function to be more
descriptive.
2015-03-25 23:31:24 -04:00
Harald Hoyer 863e18b4cd crypt-loop/module-setup.sh: make module-setup.sh executable 2015-03-24 16:03:47 +01:00
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Harald Hoyer 30e6e809ed Factor out all the "type -V" commands
Add new functions require_binaries() and require_any_binary() to be used
in the check() section of module-setup.sh.

These functions print a warning line telling the user, which binary is
missing for the specific dracut module.

This unifies the way of checking for binaries and makes the life of an
initramfs creator easier, if he wants to find out why a specific dracut
module is not included in the initramfs.
2014-02-06 16:45:20 +01:00
Hannes Reinecke 1c89fd148d Fixup script permissions
Scripts with a shebang should be marked as executable.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Harald Hoyer 8bcfd683bd */module-setup.sh: add comments for dracut called functions 2013-10-08 10:37:56 +02:00
Harald Hoyer af11946054 dracut-functions.sh: inst_multiple == dracut_install 2013-08-07 10:33:15 +02:00
Harald Hoyer 8099e7b1ba crypt-loop/module-setup.sh: install loop kernel module 2013-05-29 13:31:54 +02:00
Harald Hoyer 41eba87b32 dracut_need_initqueue 2013-03-06 17:29:11 +01:00
Leho Kraav e88e3b2797 91crypt-loop: replace basename calls with string matching 2012-07-25 10:31:43 +02:00
Leho Kraav df68781fca 91crypt-loop: use initqueue for cleanup strategy 2012-07-25 10:31:43 +02:00
Leho Kraav f855f9daaf 91crypt-loop: open root device with a key inside encrypted loop container 2012-07-25 10:31:43 +02:00