diff options
author | Dugan Chen <dugan [underscore] c [at] fastmail [dot] fm> | 2010-05-14 23:31:50 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2010-05-14 23:31:50 +0200 |
commit | b66a27946bea58639bb9d7c62ec6f916e1f5a5a3 (patch) | |
tree | 4e7c8d2953df4550ad4f642fce0dd0321296a495 /system/oss/doinst.sh | |
parent | fd27b599598e6dd5ff4050b3447b27cf3ac526e2 (diff) | |
download | slackbuilds-b66a27946bea58639bb9d7c62ec6f916e1f5a5a3.tar.gz |
system/oss: Added. (an ALSA alternative)
The Open Sound System is a set of sound drivers that serve as
an alternative to the usual ALSA architecture.
Diffstat (limited to 'system/oss/doinst.sh')
-rw-r--r-- | system/oss/doinst.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/system/oss/doinst.sh b/system/oss/doinst.sh new file mode 100644 index 0000000000..b9b1c208fa --- /dev/null +++ b/system/oss/doinst.sh @@ -0,0 +1,23 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.oss.new: +if [ -e etc/rc.d/rc.oss ]; then + cp -a etc/rc.d/rc.oss etc/rc.d/rc.oss.new.incoming + cat etc/rc.d/rc.oss.new > etc/rc.d/rc.oss.new.incoming + mv etc/rc.d/rc.oss.new.incoming etc/rc.d/rc.oss.new +fi + +config etc/oss.conf.new +config etc/rc.d/rc.oss.new + |