[Netkit.users] shell-style expansion of paths in lab.conf

Massimo Rimondini rimondin at dia.uniroma3.it
Mon Jun 14 15:37:00 CEST 2010


Dear Ashish,

ok, things start getting clearer.

Filesystem paths are internally converted to absolute paths when needed.
The point is that the "need" is recognized based on the starting
character of the path being "/" or not. Therefore, a path like
"$HOME/my_dir/fs" would improperly be expanded as
"/path/to/current/directory/$HOME/my_dir/fs" because it starts with a
"$" instead of a "/". A quick workaround, as you have found on your own,
is to force the path to be absolute. Therefore,
"/$HOME/mystuff/my-modified-netkit-fs" would also work well in your case.

Regards,
Massimo.




On 06/11/2010 05:59 PM, Ashish Agarwal wrote:
> We discovered that the following works without using the patch:
>
>     pc1[model-fs]=/./$HOME/mystuff/my-modified-netkit-fs
>
> The /. is required for some reason, but not for the kernel's path. The
> following is okay:
>
>     pc1[kernel]=$HOME/mystuff/my-modified-kernel
>
>
>
> On Fri, Jun 11, 2010 at 5:07 AM, Massimo Rimondini
> <rimondin a dia.uniroma3.it <mailto:rimondin a dia.uniroma3.it>> wrote:
>
>     Dear Ashish,
>
>     there is no way to apply shell expansion to the contents of
>     lab.conf using standard Netkit tools, but you can by applying the
>     attached patch to your $NETKIT_HOME/bin/lcommon.
>
>     Please notice that, due to the way the shell performs expansion,
>     the tilde will still fail to be correctedly interpreted when used
>     in conjunction with long command-line options. Therefore, in order
>     to obtain what you need, you would use instead:
>
>>     pc1[m]=~/mystuff/my-modified-netkit-fs
>
>
>     or:
>
>>     pc1[model-fs]=$HOME/mystuff/my-modified-netkit-fs
>
>     Regards,
>     Massimo.
>
>
>     On 06/10/2010 08:49 PM, Ashish Agarwal wrote:
>>     I'd like to include the following line in a lab.conf file:
>>
>>     pc1[model-fs]=~/mystuff/my-modified-netkit-fs
>>
>>     However, it appears that Netkit does not expand the tilde. The
>>     above line works fine if I instead write the fully expanded path.
>>     Is there anyway to get the above to work?
>>
>>     Thank you.
>>
>>
>>     _______________________________________________
>>     Netkit.users mailing list
>>     Netkit.users a list.dia.uniroma3.it <mailto:Netkit.users a list.dia.uniroma3.it>
>>     http://list.dia.uniroma3.it/mailman/listinfo/netkit.users
>>       
>
>     _______________________________________________
>     Netkit.users mailing list
>     Netkit.users a list.dia.uniroma3.it
>     <mailto:Netkit.users a list.dia.uniroma3.it>
>     http://list.dia.uniroma3.it/mailman/listinfo/netkit.users
>
>
>
> _______________________________________________
> Netkit.users mailing list
> Netkit.users a list.dia.uniroma3.it
> http://list.dia.uniroma3.it/mailman/listinfo/netkit.users
>   
-------------- parte successiva --------------
Un allegato HTML ? stato rimosso...
URL: http://list.dia.uniroma3.it/pipermail/netkit.users/attachments/20100614/d505cfd9/attachment.htm 


More information about the Netkit.users mailing list