"Fossies" - the Fresh Open Source Software Archive

Member "usr/lib/oss/scripts/restore_drv.sh" (14 Feb 2014, 1186 Bytes) of archive /linux/misc/oss-linux-v4.2-2011-i386.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 if test -f /etc/oss.conf
    3 then
    4   . /etc/oss.conf
    5 else
    6   OSSLIBDIR=/usr/lib/oss
    7 fi
    8 
    9 /usr/sbin/soundoff
   10 
   11 rm -rf /lib/modules/`uname -r`/kernel/oss
   12 
   13 if test -x /sbin/chkconfig 
   14 then /sbin/chkconfig oss off > /dev/null 2>&1
   15 else
   16   if test -x /sbin/update-rc.d
   17   then /usr/sbin/update-rc.d -f oss remove > /dev/null 2>&1
   18   fi
   19 fi
   20 
   21 rm -f /etc/init.d/oss
   22 
   23 if ! test -d /lib/modules/`uname -r`/kernel/sound
   24 then
   25    if test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2
   26    then
   27      (cd /lib/modules/`uname -r`; tar xfj sound-preoss.tar.bz2)
   28      /sbin/depmod -a
   29    fi
   30 fi
   31 
   32 rm -f /lib/modules/`uname -r`/sound-preoss.tar.bz2
   33 
   34 if test -f $OSSLIBDIR/sysfiles.list
   35 then
   36     rm -f `cat $OSSLIBDIR/sysfiles.list`
   37 fi
   38 
   39 if test -f $OSSLIBDIR/save/alsadevs.tar.bz2
   40 then
   41   (cd /;tar xfj $OSSLIBDIR/save/alsadevs.tar.bz2)
   42 fi
   43 
   44 if test -f $OSSLIBDIR/save/alsarc/tar.bz2
   45 then
   46   (cd /;tar xfj $OSSLIBDIR/save/alsarc/tar.bz2)
   47 fi
   48 
   49 rm -f /dev/dsp* /dev/midi* /dev/mixer* /dev/sndstat
   50 
   51 /sbin/ldconfig
   52 
   53 if test -x /sbin/chkconfig
   54 then
   55   /sbin/chkconfig alsasound on > /dev/null 2>&1
   56 else
   57   if test -x /usr/sbin/update-rc.d
   58   then
   59     /usr/sbin/update-rc.d alsa-utils defaults > /dev/null 2>&1
   60   fi
   61 fi
   62 
   63 exit 0