Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0316-plymouth-remove-cryptroot-ask.sh-which-is-provided-b.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0316-plymouth-remove-cryptroot-ask.sh-which-is-provided-b.patch of Package dracut
From 991a8728d0733786dc5b89239eb8d1f98302a1b5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Mon, 22 Jul 2013 10:36:30 +0200 Subject: [PATCH] plymouth: remove cryptroot-ask.sh, which is provided by 90crypt --- modules.d/50plymouth/cryptroot-ask.sh | 73 ----------------------------------- modules.d/50plymouth/install | 1 - 2 files changed, 74 deletions(-) delete mode 100755 modules.d/50plymouth/cryptroot-ask.sh diff --git a/modules.d/50plymouth/cryptroot-ask.sh b/modules.d/50plymouth/cryptroot-ask.sh deleted file mode 100755 index b1a7465..0000000 --- a/modules.d/50plymouth/cryptroot-ask.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -# do not ask, if we already have root -[ -f /sysroot/proc ] && exit 0 - -# check if destination already exists -[ -b /dev/mapper/$2 ] && exit 0 - -# we already asked for this device -[ -f /tmp/cryptroot-asked-$2 ] && exit 0 - -. /lib/dracut-lib.sh - -# default luksname - luks-UUID -luksname=$2 - -# 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")" -else - device="$1" -fi - -if [ -f /etc/crypttab ] && ! getargs rd_NO_CRYPTTAB; then - while read name dev rest; do - # ignore blank lines and comments - if [ -z "$name" -o "${name#\#}" != "$name" ]; then - continue - fi - - # UUID used in crypttab - if [ "${dev%%=*}" = "UUID" ]; then - if [ "luks-${dev##UUID=}" = "$2" ]; then - luksname="$name" - break - fi - - # path used in crypttab - else - cdev=$(readlink -f $dev) - mdev=$(readlink -f $device) - if [ "$cdev" = "$mdev" ]; then - luksname="$name" - break - fi - fi - done < /etc/crypttab - unset name dev rest -fi - -prompt="Password [$device ($luksname)]:" -if [ ${#luksname} -gt 8 ]; then - sluksname=${sluksname##luks-} - sluksname=${luksname%%${luksname##????????}} - prompt="Password for $device ($sluksname...)" -fi - -# flock against other interactive activities -{ flock -s 9; - /bin/plymouth ask-for-password \ - --prompt "$prompt" \ - --command="/sbin/cryptsetup luksOpen -T1 $device $luksname" -} 9>/.console.lock - -unset ask device luksname - -# mark device as asked ->> /tmp/cryptroot-asked-$2 - -udevsettle - -exit 0 -# vim:ts=8:sw=4:sts=4:et diff --git a/modules.d/50plymouth/install b/modules.d/50plymouth/install index bac7b6d..7d586a2 100755 --- a/modules.d/50plymouth/install +++ b/modules.d/50plymouth/install @@ -12,5 +12,4 @@ fi inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh inst_hook emergency 00 "$moddir"/plymouth-emergency.sh -inst "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask inst readlink -- 1.8.3.1