From mboxrd@z Thu Jan 1 00:00:00 1970 From: Warren Togami Subject: %s substitution Date: Thu, 18 Jun 2009 13:48:16 -0400 Message-ID: <4A3A7DE0.4060801@redhat.com> References: <4A39A9AF.6070009@redhat.com> <4A3A13A8.6050100@bfh.ch> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A3A13A8.6050100-omB+W0Dpw2o@public.gmane.org> Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: initramfs On 06/18/2009 06:15 AM, Seewer Philippe wrote: >> >> * We should however support the %s substitution in exactly the same >> way as the kernel. Looking at our current code though, it seems we >> don't. The docs don't do hostname. > > Removing hostname isn't a problem, patch below I noticed another potential problem... > 62 Name of the directory on the server to mount as root. > 63 If there is a "%s" token in the string, it will be > 64 replaced by the ASCII-representation of the client's > 65 IP address. > # Kernel replaces first %s with host name, and falls back to the ip address > # if it isn't set. Only the first %s is substituted. > if [ "${path#*%s}" != "$path" ]; then Wont this only match if the $path ends with %s? The nfsroot.txt seems to indicate it should be substituted if the %s appears anywhere in the string. I'll wait until you have an updated patch fixing both issues. Also, did you verify that the ip format you generate is identical to the "ASCII-representation of the client's IP address" as generated by the kernel? Warren Togami wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html