summaryrefslogtreecommitdiffstats
path: root/source/ap/alsa-utils/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/alsa-utils/doinst.sh')
-rw-r--r--source/ap/alsa-utils/doinst.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/ap/alsa-utils/doinst.sh b/source/ap/alsa-utils/doinst.sh
index 0ee741506..8a9b28787 100644
--- a/source/ap/alsa-utils/doinst.sh
+++ b/source/ap/alsa-utils/doinst.sh
@@ -4,3 +4,24 @@ fi
# Better a dangling symlink than for nobody to know where this went:
rm -f etc/asound.state
( cd etc && ln -sf ../var/lib/alsa/asound.state . )
+
+# Duplicate permissions from any existing rc scripts:
+if [ -e etc/rc.d/rc.alsa ]; then
+ if [ -x etc/rc.d/rc.alsa ]; then
+ chmod 755 etc/rc.d/rc.alsa.new
+ else
+ chmod 644 etc/rc.d/rc.alsa.new
+ fi
+fi
+if [ -e etc/rc.d/rc.alsa-oss ]; then
+ if [ -x etc/rc.d/rc.alsa-oss ]; then
+ chmod 755 etc/rc.d/rc.alsa-oss.new
+ else
+ chmod 644 etc/rc.d/rc.alsa-oss.new
+ fi
+fi
+
+# Move the scripts into place:
+mv etc/rc.d/rc.alsa.new etc/rc.d/rc.alsa
+mv etc/rc.d/rc.alsa-oss.new etc/rc.d/rc.alsa-oss
+