[Xorp-hackers] Hi,all. Is this a bug or just a mistake config?

cheng wan wancheng82 at gmail.com
Tue Dec 1 17:09:27 PST 2009


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 bms at incunabulum.net
>
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20091202/e7a251e5/attachment.html 


More information about the Xorp-hackers mailing list