mconf()  {

  cat  <<  EOF
options	snd	device_mode=0660 cards_limit=1

alias	char-major-116		snd
alias	char-major-14		soundcore

#alias	snd-card-0		snd-card-$CARD
alias	snd-card-0		snd-$CARD
alias	sound-slot-0		snd-card-0

alias   /dev/dsp                sound-service-0-3
alias   /dev/mixer              sound-service-0-0
alias	sound-service-0-0	snd-mixer-oss
alias	sound-service-0-1	snd-seq-oss
alias	sound-service-0-3	snd-pcm-oss
alias	sound-service-0-8	snd-seq-oss
alias	sound-service-0-12	snd-pcm-oss

# post-install	snd-card-0	/usr/sbin/alsactl  restore
EOF

}

if  [  !  -f   /etc/modules.d/alsa  ];  then
  mkdir   -p   /etc/modules.d
  mconf   >    /etc/modules.d/alsa
else
  #Up until at least 0.9beta10, it were snd-card-.., since beta12 it's snd-
  #I got the feeling it's an about turn of a previous change in the 0.9 series
  sedit "s/snd-card-$CARD/snd-$CARD/" /etc/modules.d/alsa
  echo "Please note, there could be some changes needed  for those upgrading"
  echo "with multiple sound cards & tuned /etc/modules.d/alsa"
fi

MOD="/etc/modules.conf"
INC="include  /etc/modules.d/alsa"

grep    -q  "$INC"      $MOD  ||
echo        "$INC"  >>  $MOD
depmod  -a
