Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 202211 Details for
Bug 282626
sys-fs/cryptsetup don't require specifying loop device for loop file based mappings
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixed names of files in patch
cryptsetup.patch (text/plain), 2.65 KB, created by
Zeev Tarantov
on 2009-08-25 00:10:51 UTC
(
hide
)
Description:
fixed names of files in patch
Filename:
MIME Type:
Creator:
Zeev Tarantov
Created:
2009-08-25 00:10:51 UTC
Size:
2.65 KB
patch
obsolete
>--- 1.0.6-r2-dm-crypt-start.sh.orig >+++ 1.0.6-r2-dm-crypt-start.sh >@@ -24,8 +24,8 @@ > cryptsetup isLuks ${source} 2>/dev/null > foo="$?" > if [ "${foo}" -eq 0 ]; then >- ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup." >- return >+ ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup." >+ return > fi > target=${swap} > # swap contents do not need to be preserved between boots, luks not required. >@@ -35,17 +35,30 @@ > else > return > fi >- if [ -z "$source" ] && [ ! -e "$source" ]; then >- ewarn "source \"${source}\" for ${target} missing, skipping..." >- return >- fi > > if [[ -n ${loop_file} ]] ; then > dev="/dev/mapper/${target}" >- ebegin " Setting up loop device ${source}" >- /sbin/losetup ${source} ${loop_file} >+ >+ if [ -z "$source" ] && [ ! -e "$source" ]; then >+ ebegin " Setting up loop device for ${loop_file} " >+ source=$(/sbin/losetup -f -v ${loop_file} | grep 'Loop device is ' | sed -e 's/Loop device is //') >+ if [ -z "$source" ] && [ ! -e "$source" ]; then >+ ewarn " failed to setup loop device" >+ else >+ einfo " used loop device ${source}" >+ fi >+ else >+ ebegin " Setting up loop device ${source}" >+ /sbin/losetup ${source} ${loop_file} >+ fi > fi > >+ if [ -z "$source" ] && [ ! -e "$source" ]; then >+ ewarn "source \"${source}\" for ${target} missing, skipping..." >+ cryptfs_status=1 >+ return >+ fi >+ > # cryptsetup: > # luksOpen <device> <name> # <device> is $source > # create <name> <device> # <name> is $target >--- 1.0.5-dm-crypt-stop.sh.orig >+++ 1.0.5-dm-crypt-stop.sh >@@ -22,13 +22,14 @@ > eend $? "Failed to remove dm-crypt mapping for: ${target}" > done > >- if [[ -n $(/bin/egrep -e "^(source=)./dev/loop*" /etc/conf.d/dmcrypt) ]] ; then >+ if [[ -n $(/bin/egrep -e "^(loop_file=)" /etc/conf.d/dmcrypt) ]] ; then > einfo "Taking down any dm-crypt loop devices" >- /bin/egrep -e "^(source)" /etc/conf.d/dmcrypt | while read sourceline >+ /bin/egrep -e "^(loop_file)" /etc/conf.d/dmcrypt | while read loopfileline > do >- source= >- eval ${sourceline} >- if [[ -n $(echo ${source} | grep /dev/loop) ]] ; then >+ loop_file= >+ eval ${loopfileline} >+ source=$(/sbin/losetup -j ${loop_file} | sed -e "s/:.*//" | grep /dev/loop) >+ if [ -n "${source}" ] ; then > ebegin " Taking down ${source}" > /sbin/losetup -d ${source} > eend $? " Failed to remove loop" >--- 1.0.6-dmcrypt.confd.orig >+++ 1.0.6-dmcrypt.confd >@@ -90,5 +90,5 @@ > > ## Loopback file example > #mount='crypt-loop-home' >-#source='/dev/loop0' >+#source='/dev/loop0' # if omitted, losetup -f is used > #loop_file='/mnt/crypt/home'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 282626
:
202208
| 202211