On Fri, 29 May 2015 at 19:47:43 +0200, Guilhem Moulin wrote:
> I believe the issue it that the init-premount script sets $IPOPTS while
> ‘configure_networking’ uses $IP to pick and configure interfaces.

Forget about that.  IP is assigned properly by the ‘init’ script, and
IPOPTS isn't used anywhere.  So the whole for loop could be removed, and
replaced by a test on $IP.

That said I think the proper way to use dropbear without the cryptroot
remote unlocking feature would be to follow Simon McVittie's suggestion
[0] and split the dropbear package as follows:

  * dropbear-bin (executable, private libraries if any)
  * dropbear (init integration goo) Depends: dropbear-bin
  * dropbear-initramfs Depends: dropbear-bin, Suggests: dropbear

-- 
Guilhem.

[0] https://lists.debian.org/debian-devel/2015/05/msg00685.html
--- a/usr/share/initramfs-tools/scripts/init-premount/dropbear
+++ b/usr/share/initramfs-tools/scripts/init-premount/dropbear
@@ -13,22 +13,14 @@
 	;;
 esac
 
-. /scripts/functions
+[ "$IP" != off -a "$IP" != none -a -x /sbin/dropbear ] || exit 0
 
-[ -x /sbin/dropbear ] || exit 0
+. /scripts/functions
 
 log_begin_msg "Starting dropbear"
 
 . /conf/initramfs.conf
 
-for x in $(cat /proc/cmdline); do
-	case "$x" in
-		ip=*)
-			IPOPTS="${x#ip=}"
-			;;
-	esac
-done
-
 configure_networking &
 
 mkdir -p /var/run

Attachment: signature.asc
Description: Digital signature

Reply via email to