Here is an init-script for mono that will register .NET-binaries with /usr/bin/mono so you can remove that ugly .exe-extension from the binaries and install them in /usr/bin just like native programs, instead of running them with "mono program.exe".
Created attachment 10875 [details] /etc/init.d/mono
reassigned to foser
it looks good to me. A few questions. Can you explain exactly how it works, especially the syntax of the echo line used. I suppose MZ is the indentifier for .NET binaries used. Is that tight enough ? Is it possible to unregister the .NET handler ? in essence, is it possible to implement a stop function ? Thirdly i would like this script run from a conf.d setting where we can select which runtime to use, so we can (currently) use it for both mono and dotgnu.
If you compiled "MISC binaries" in your kernel you get an empty directory /proc/sys/fs/binfmt_misc on which a binfmt_misc filesystem has to be mounted. Then you can register handles through the proc-interface. I don't know how to unregister though.. Some info on how binfmt_misc works can be found here: http://www.tat.physik.uni-tuebingen.de/~rguenth/linux/binfmt_misc.html The echo-line I just took from this page: http://www.gotmono.com/docs/installation/linux.html#kernel_support
I played around with that script and added the possibility to choose what interpreter to use and added a stop() function. I think those two files should be added to the mono and pnet ebuild (without a default setting for the runtime so that it doesn't harm anything if you merge both etc. ?). Comments ? ;)
Created attachment 11760 [details] /etc/conf.d/dotnet
Created attachment 11761 [details] /etc/init.d/dotnet
I added the script with some minor enhancements to pnet-0.5.6-r2, mono-0.23-r1 (stable) and mono-0.24-r1 (~)
resolved / fixed seems to be fine with everybody :)
thnx scandium for the good work