summaryrefslogtreecommitdiffstats
path: root/network/hostapd/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'network/hostapd/doinst.sh')
-rw-r--r--network/hostapd/doinst.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/network/hostapd/doinst.sh b/network/hostapd/doinst.sh
index 1c9c32c1c8..16bfa3f184 100644
--- a/network/hostapd/doinst.sh
+++ b/network/hostapd/doinst.sh
@@ -1,5 +1,3 @@
-#!/bin/sh
-
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
@@ -13,3 +11,12 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
+# Keep same perms on rc.hostapd.new:
+if [ -e etc/rc.d/rc.hostapd ]; then
+ cp -a etc/rc.d/rc.hostapd etc/rc.d/rc.hostapd.new.incoming
+ cat etc/rc.d/rc.hostapd.new > etc/rc.d/rc.hostapd.new.incoming
+ mv etc/rc.d/rc.hostapd.new.incoming etc/rc.d/rc.hostapd.new
+fi
+
+config etc/rc.d/rc.hostapd.new
+