[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#128111: awe-drv: wish a init.d script



Package: awe-drv
Version: 0.4.3.1-1.2
Severity: wishlist
Tags: patch

  Hi,

  I'd like a init.d script to load my prefered soundbank at boot.
  Please include the following script to awe-drv.
  Also put "aumix" package in "Suggests" section.

     Thanks,
     Pedro

--- begin of /etc/init.d/awe-drv ---
#! /bin/sh
#
# awe-drv       loads awe32 soundbank.
#
#               Written by Pedro Zorzenon Neto <pzn@debian.org>
#
# Version:      @(#)awe-drv   0.1  07-Jan-2002  pzn@debian.org

# please edit next two lines
SBK="/full/path/to/your/favorite/soundbank.sbk"
SBKNAME="somename"

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

test -x /usr/bin/sfxload || exit 0

if [ ! -e "$SBK" ]; then
  echo "*** Please edit /etc/init.d/awe-drv to load a soundbank at boot ***"
  exit 1
fi

if [ -x /usr/bin/aumix ]; then
  if [ -x /bin/tempfile ]; then
    AUMIX="1"
  fi
fi

case "$1" in
start|restart|force-reload)
  echo -n "Loading AWE32 soundbank: "

  #save audio settings and mute before changing sbk
  if [ "$AUMIX" ]; then
     tmp=`tempfile` || exit 1
     aumix -q -v0 > $tmp || exit 1
  fi

  #loads soundbank
  echo -n $SBKNAME
  sfxload $SBK || exit 1
  
  #restore audio settings
  if [ "$AUMIX" ]; then
    aumix -L -f $tmp >/dev/null 2>&1
    rm -f $tmp
  fi
  
  echo "."
  ;;
stop)
  ;;
*)
  echo "Usage: /etc/init.d/awe-drv {start|stop|restart|force-reload}"
  exit 1
esac

exit 0
--- end of /etc/init.d/awe-drv ---

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux mantis 2.2.19 #1 Sat Oct 20 18:09:49 EST 2001 i686
Locale: LANG=C, LC_CTYPE=pt_BR

Versions of packages awe-drv depends on:
ii  libawe0.4                    0.4.3.1-1.2 AWE32 shared library
ii  libc6                        2.2.4-7     GNU C Library: Shared libraries an
ii  patch                        2.5.4-6     Apply a diff file to an original



Reply to: