#!/bin/sh
#
# windows	Allow users to run Windows(tm) applications by just clicking
#		on them (or typing ./file.exe)
#
# chkconfig: 2345 99 10
# description: Allow users to run Windows(tm) applications by just clicking \
# on them (or typing ./file.exe)
#
# (c) 2000 Red Hat, Inc.
#
case "$1" in
  start)
    /sbin/modprobe binfmt_misc &>/dev/null
    echo ':windows:M::MZ::/usr/bin/wine:' >/proc/sys/fs/binfmt_misc/register
    echo ':windowsPE:M::PE::/usr/bin/wine:' >/proc/sys/fs/binfmt_misc/register
    ;;
  stop)
    echo "-1" >/proc/sys/fs/binfmt_misc/windows
    echo "-1" >/proc/sys/fs/binfmt_misc/windowsPE
    ;;
  *)
    echo "Usage: $0 {start|stop}"
esac
