[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#694374: /etc/init.d/geli: attaches one geli device only



Package: geom
Version: 9.0+ds1-8
Severity: important
File: /etc/init.d/geli
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org

Hi,

In /etc/default/geli it is expected that multiple devices can be given
(space-delimited) in the geli_devices variable and/or via /etc/fstab.

The initscript should try to attach each of them on boot, prompting for
passphrases if necessary.  But instead it exits after one device is
attached (whether it was successful or not).  Presumably that was a mistake.

I wonder if the (tested) patch below gives the most desirable behaviour:
 exit upon the first failed geli attach.  That also means pressing
Ctrl-C will skip prompting for any further passphrases.

--- geli.orig	2012-11-24 04:40:43.012890000 +0000
+++ geli	2012-11-24 15:03:35.700650361 +0000
@@ -144,8 +144,10 @@
 				fi
 				count=$((count+1))
 			done
-			log_end_msg $RET
-			exit $RET
+			if ! [ "$RET" = 0 ]; then
+				log_end_msg $RET
+				exit $RET
+			fi
 		fi
 	done


Or maybe it would be preferable to try to mount the remaining devices
after an error is encountered.  What do others think?

Thanks.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages geom depends on:
ii  kldutils     9.0+ds1-8
ii  libbsd0      0.4.2-1
ii  libc0.1      2.13-35
ii  libgeom1     9.0+ds1-3
ii  libssl1.0.0  1.0.1c-4

geom recommends no packages.

geom suggests no packages.

-- Configuration Files:
/etc/default/geli changed [not included]

-- no debconf information


Reply to: