summaryrefslogtreecommitdiff
path: root/setup/Linux/removeoss.sh
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-05-03 21:08:42 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-05-03 21:08:42 +0400
commit1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch)
tree4495d23e7b54ab5700e3839081e797c1eafe0db9 /setup/Linux/removeoss.sh
downloadoss4-1058def8e7827e56ce4a70afb4aeacb5dc44148f.tar.gz
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'setup/Linux/removeoss.sh')
-rw-r--r--setup/Linux/removeoss.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/setup/Linux/removeoss.sh b/setup/Linux/removeoss.sh
new file mode 100644
index 0000000..0e9d992
--- /dev/null
+++ b/setup/Linux/removeoss.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+if test `whoami` != "root"
+then
+ echo "You must be super-user or logged in as root to uninstall OSS..."
+ exit 0
+fi
+
+if test -f /etc/oss.conf
+then
+ . /etc/oss.conf
+else
+ OSSLIBDIR=/usr/lib/oss
+fi
+
+echo "Uninstalling OSS...."
+echo "Running soundoff...."
+/usr/sbin/soundoff
+echo "Restoring previously install sound drivers..."
+sh "$OSSLIBDIR"/scripts/restore_drv.sh
+echo "Removing OSS Files in MANIFEST"
+cd /
+for i in `cat "$OSSLIBDIR"/MANIFEST`
+do
+# echo "Removing file $i"
+rm -f $i
+done
+
+echo "Removing $OSSLIBDIR directory"
+rm -rf "$OSSLIBDIR"
+
+echo "OSS Uninstalled. However you may need to reboot the system."