Thank you very much, Bruce.
I will trace and try to find why the EPERM.is returned.
Thanks for the script info in LiveCD.
I have not thought before.
Will update the info if I have progress.

Robin

2009/12/1 Bruce Simpson [email protected]
>
>
> You're trying to use a shell output redirection ('>>') from a Router
> Manager template file directly. This is probably going to break.
>
> RouterManager just happens to use RunShellCommand from libxorp for *most*
> of the template program actions. This is purely how it happens to be
> implemented right now, and it isn't invoked that way in all cases; please
> refer to the source code.
>
> Have you ktrace'd or struss'd to discover exactly why EPERM ('Permission
> denied') is being returned when your file cannot be created on 'commit'?
>
> If all you are trying to do is to implement some non-volatile storage, in
> the form of a file holding some state, you are probably better off wrapping
> that inside your commands; i.e. write a script which knows where the storage
> is, rather than trying to use shell redirection, which may not behave how
> you expect it to.
>
> For an example of this approach, please refer to the LiveCD / LiveUSB image
> scripts under svn/trunk/other/LiveCD.
>
> In tools/tools/nanobsd/Files/sbin/usb_save is a POSIX shell script, invoked
> by the Router Manager, which knows where its storage is.
> In tools/tools/nanobsd/liveusb.nano are some hooks, in the shell function
> cust_xorp_conf(), which append these commands to the misc.cmds template
> file.
>
> thanks,
> BMS
>
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to