~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to setup/SCO_SV/removeoss.sh

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
if test `whoami` != "root"
 
3
then
 
4
  echo "You must be super-user or logged in as root to uninstall OSS..."
 
5
  exit 0
 
6
fi
 
7
 
 
8
echo "Uninstalling OSS...."
 
9
echo "Running soundoff...."
 
10
/usr/sbin/soundoff
 
11
 
 
12
echo Uninstalling OSS modules
 
13
cp -f $OSSLIBDIR/etc/installed_drivers /tmp/installed_drivers
 
14
(cd $OSSLIBDIR;rm -rf etc/installed_drivers etc/legacy_devices logs conf)
 
15
 
 
16
# Remove the drivers - preremove will copy installed_drivers to /tmp
 
17
for n in `ls $OSSLIBDIR/modules`
 
18
do
 
19
 if [ -d /etc/conf/pack.d/$n ]; then
 
20
    /etc/conf/bin/idinstall -P oss -d $n > /dev/null 2>&1
 
21
    rm -f $OSSLIBDIR/modules/$n/install.log
 
22
 fi
 
23
done
 
24
 
 
25
echo "Removing OSS Files in MANIFEST"
 
26
cd /
 
27
for i in `cat /usr/lib/oss/MANIFEST`
 
28
do
 
29
# echo "Removing file $i"
 
30
rm -f $i
 
31
done
 
32
 
 
33
echo "Removing /usr/lib/oss directory"
 
34
rm -rf /usr/lib/oss
 
35
 
 
36
echo "OSS Uninstalled. However you may need reboot the system."