[PATCH 7/7] defaultenv-2: add symbolic link support to boot/nfs

Sascha Hauer s.hauer at pengutronix.de
Tue Aug 28 04:47:41 EDT 2012


On Fri, Aug 24, 2012 at 07:06:56AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> ---
>  defaultenv-2/base/boot/nfs |   55 +++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 52 insertions(+), 3 deletions(-)
> 
> diff --git a/defaultenv-2/base/boot/nfs b/defaultenv-2/base/boot/nfs
> index 248f975..a33a21c 100644
> --- a/defaultenv-2/base/boot/nfs
> +++ b/defaultenv-2/base/boot/nfs
> @@ -43,6 +43,18 @@ if [ -n "${global.dhcp.bootfile}" ]; then
>  	mount -t nfs "${eth0.serverip}:${mnt}" "${path}"
>  
>  	global.bootm.image="${path}/${bootfile}"
> +
> +	if [ -L "${global.bootm.image}" ]; then
> +		readlink -f "${global.bootm.image}" bootfile_symlink
> +
> +		dirname -V "${bootfile_symlink}" mnt
> +		basename "${bootfile_symlink}" bootfile
> +
> +		umount "${path}"
> +		mount -t nfs "${eth0.serverip}:${mnt}" "${path}"
> +
> +		global.bootm.image="${path}/${bootfile}"
> +	fi

There is something wrong here. I do not understand what you do here, but
symlinks are not supposed to bash on them with dirname/basename until
you get something which fits your needs.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list