AW: [Mono-list] Platform comparison

Brice Carpentier brice@dlfp.org
Tue, 09 Mar 2004 12:25:54 +0100


This is a multi-part message in MIME format.
--------------090603020409020203020002
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Jochen Wezel wrote:

>Hi Brice! 
>
>Please could you tell us some details on binft_misc? Where to get it? How to use/include it? A short and quicky example, maybe? Or a documentation somewhere?
>  
>
Sure !
In fact it's binfmt_misc
it's a kernel module that the most recent distributions should have 
included in their base kernel.
http://www.tat.physik.uni-tuebingen.de/~rguenth/linux/binfmt_misc.html
Once it's loaded, there's a few manipulations to register a binary with 
the module, I've attached the rc.d script that my distribution 
(archlinux - http://www.archlinux.org) uses.

>Thanks!
>Jochen
>  
>
Best regards,

-- 
Brice Carpentier aka Br|ce


--------------090603020409020203020002
Content-Type: text/plain;
 name="mono"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mono"

#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
 
case "$1" in
  start)
    stat_busy "Registering .NET IL binaries with mono"
    if [ ! -d /proc/sys/fs/binfmt_misc ]; then
      stat_die "You need support for \"misc binaries\" in your kernel!"
    fi
    mount | grep -q binfmt_misc
    if [ $? != 0 ]; then
      mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
      if [ $? != 0 ]; then
        stat_die
      fi
    fi
    echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
    stat_done
    ;;
  stop)

    stat_busy "Unregistering .NET IL binaries"
    if [ -f /proc/sys/fs/binfmt_misc/CLR ]; then
      echo '-1' > /proc/sys/fs/binfmt_misc/CLR
    fi
    stat_done
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac 

--------------090603020409020203020002--