updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / mono-git / mono.rc.d
blob548cc2d7bed5ea9f98663b799a61f9e58a442648
1 #!/bin/bash
2 . /etc/rc.conf
3 . /etc/rc.d/functions
5 case "$1" in
6 start)
7 stat_busy "Registering .NET IL binaries with mono"
8 if [ ! -d /proc/sys/fs/binfmt_misc ]; then
9 stat_die "You need support for \"misc binaries\" in your kernel!"
11 mount | grep -q binfmt_misc
12 if [ $? != 0 ]; then
13 mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
14 if [ $? != 0 ]; then
15 stat_die
18 echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
19 stat_done
21 stop)
23 stat_busy "Unregistering .NET IL binaries"
24 if [ -f /proc/sys/fs/binfmt_misc/CLR ]; then
25 echo '-1' > /proc/sys/fs/binfmt_misc/CLR
27 stat_done
29 restart)
30 $0 stop
31 $0 start
34 echo "usage: $0 {start|stop|restart}"
35 esac