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

Re: initramfs-tools 0.98



On Tue, 2010-08-17 at 16:42 +0200, maximilian attems wrote:
> It contains several worthwile fixes for Squeeze and
> most importantly full fills the new initramfs policy.
> please unblock.

A quick question on the diff:

+# Common case: /sbin/init is present
+if [ ! -x "${rootmnt}/sbin/init" ]; then
+       # ... if it's not available search for valid init
+       if [ -z "${init}" ] ; then
+               for inittest in /sbin/init /etc/init /bin/init /bin/sh; do
+                       if validate_init "${inittest}"; then
+                               init="$inittest"
+                               break
+                       fi
+               done
+       fi
+
+       # No init on rootmount
+       if ! validate_init "${init}" ; then
+               panic "No init found. Try passing init= bootarg."
+       fi
 fi

So far as I can see, if /sbin/init is present and executable, but $init
is set to something else, then the init which will be executed is not
checked via validate_init().  If so then should the "no init on
rootmount" block be moved outside of the if block?

Regards,

Adam


Reply to: