* [PATCH] Cryptroot-ask.sh: Remove duplicate code
@ 2014-02-09 15:17 Till Maas
[not found] ` <1391959023-8840-1-git-send-email-opensource-44rtNO6TQJOzQB+pC5nmwQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Till Maas @ 2014-02-09 15:17 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Till Maas
Remove duplicate code introduced with commit
9b5e2e8574577cd4ec1e3645255060f749490537.
---
modules.d/90crypt/cryptroot-ask.sh | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
index 1c3e792..2c8bba0 100755
--- a/modules.d/90crypt/cryptroot-ask.sh
+++ b/modules.d/90crypt/cryptroot-ask.sh
@@ -10,24 +10,6 @@ NEWROOT=${NEWROOT:-"/sysroot"}
. /lib/dracut-lib.sh
-# default luksname - luks-UUID
-luksname=$2
-
-# check if destination already exists
-[ -b /dev/mapper/luksname ] && exit 0
-
-# we already asked for this device
-asked_file=/tmp/cryptroot-asked-$luksname
-[ -f $asked_file ] && exit 0
-
-# load dm_crypt if it is not already loaded
-[ -d /sys/module/dm_crypt ] || modprobe dm_crypt
-
-. /lib/dracut-crypt-lib.sh
-
-# fallback to passphrase
-ask_passphrase=1
-
# if device name is /dev/dm-X, convert to /dev/mapper/name
if [ "${1##/dev/dm-}" != "$1" ]; then
device="/dev/mapper/$(dmsetup info -c --noheadings -o name "$1")"
@@ -73,7 +55,8 @@ fi
[ -b /dev/mapper/$luksname ] && exit 0
# we already asked for this device
-[ -f /tmp/cryptroot-asked-$luksname ] && exit 0
+asked_file=/tmp/cryptroot-asked-$luksname
+[ -f $asked_file ] && exit 0
# load dm_crypt if it is not already loaded
[ -d /sys/module/dm_crypt ] || modprobe dm_crypt
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1391959023-8840-1-git-send-email-opensource-44rtNO6TQJOzQB+pC5nmwQ@public.gmane.org>]
* Re: [PATCH] Cryptroot-ask.sh: Remove duplicate code [not found] ` <1391959023-8840-1-git-send-email-opensource-44rtNO6TQJOzQB+pC5nmwQ@public.gmane.org> @ 2014-02-10 10:03 ` Harald Hoyer [not found] ` <52F8A40D.2080905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Harald Hoyer @ 2014-02-10 10:03 UTC (permalink / raw) To: Till Maas, initramfs-u79uwXL29TY76Z2rM5mHXA On 02/09/2014 04:17 PM, Till Maas wrote: > Remove duplicate code introduced with commit > 9b5e2e8574577cd4ec1e3645255060f749490537. > --- > modules.d/90crypt/cryptroot-ask.sh | 21 ++------------------- > 1 file changed, 2 insertions(+), 19 deletions(-) > > diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh > index 1c3e792..2c8bba0 100755 > --- a/modules.d/90crypt/cryptroot-ask.sh > +++ b/modules.d/90crypt/cryptroot-ask.sh > @@ -10,24 +10,6 @@ NEWROOT=${NEWROOT:-"/sysroot"} > > . /lib/dracut-lib.sh > > -# default luksname - luks-UUID > -luksname=$2 > - > -# check if destination already exists > -[ -b /dev/mapper/luksname ] && exit 0 > - > -# we already asked for this device > -asked_file=/tmp/cryptroot-asked-$luksname > -[ -f $asked_file ] && exit 0 > - > -# load dm_crypt if it is not already loaded > -[ -d /sys/module/dm_crypt ] || modprobe dm_crypt > - > -. /lib/dracut-crypt-lib.sh > - > -# fallback to passphrase > -ask_passphrase=1 > - > # if device name is /dev/dm-X, convert to /dev/mapper/name > if [ "${1##/dev/dm-}" != "$1" ]; then > device="/dev/mapper/$(dmsetup info -c --noheadings -o name "$1")" > @@ -73,7 +55,8 @@ fi > [ -b /dev/mapper/$luksname ] && exit 0 > > # we already asked for this device > -[ -f /tmp/cryptroot-asked-$luksname ] && exit 0 > +asked_file=/tmp/cryptroot-asked-$luksname > +[ -f $asked_file ] && exit 0 > > # load dm_crypt if it is not already loaded > [ -d /sys/module/dm_crypt ] || modprobe dm_crypt > ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <52F8A40D.2080905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] Cryptroot-ask.sh: Remove duplicate code [not found] ` <52F8A40D.2080905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2014-02-10 15:23 ` Harald Hoyer 0 siblings, 0 replies; 3+ messages in thread From: Harald Hoyer @ 2014-02-10 15:23 UTC (permalink / raw) To: Till Maas, initramfs-u79uwXL29TY76Z2rM5mHXA On 02/10/2014 11:03 AM, Harald Hoyer wrote: > On 02/09/2014 04:17 PM, Till Maas wrote: >> Remove duplicate code introduced with commit >> 9b5e2e8574577cd4ec1e3645255060f749490537. >> --- >> modules.d/90crypt/cryptroot-ask.sh | 21 ++------------------- >> 1 file changed, 2 insertions(+), 19 deletions(-) >> What I meant is: Thanks! Pushed. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-10 15:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-09 15:17 [PATCH] Cryptroot-ask.sh: Remove duplicate code Till Maas
[not found] ` <1391959023-8840-1-git-send-email-opensource-44rtNO6TQJOzQB+pC5nmwQ@public.gmane.org>
2014-02-10 10:03 ` Harald Hoyer
[not found] ` <52F8A40D.2080905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-10 15:23 ` Harald Hoyer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox