aboutsummaryrefslogtreecommitdiff
path: root/my-x200.initd
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2021-02-22 18:04:49 +0100
committerRobert Alessi <alessi@robertalessi.net>2021-02-22 18:04:49 +0100
commit56f4b3b4a5973b3d2925505afb74c6a7c2b131f8 (patch)
tree995700c15ea00a73dd67105c8db0a9b559955ad0 /my-x200.initd
parent6f54e2d900e0a2977d23578b13c6d6cb0632042a (diff)
downloadmy-x200-56f4b3b4a5973b3d2925505afb74c6a7c2b131f8.tar.gz
associate rfkill to privacy settings
Diffstat (limited to 'my-x200.initd')
-rw-r--r--my-x200.initd12
1 files changed, 9 insertions, 3 deletions
diff --git a/my-x200.initd b/my-x200.initd
index 01040da..bb05cf4 100644
--- a/my-x200.initd
+++ b/my-x200.initd
@@ -77,6 +77,7 @@ do_backup() {
77do_privacy() { 77do_privacy() {
78 if [ "$enable_privacy" = "true" ] 78 if [ "$enable_privacy" = "true" ]
79 then 79 then
80 /usr/sbin/rfkill block all
80 if [ -n "${wired_interface}" ] 81 if [ -n "${wired_interface}" ]
81 then 82 then
82 printf '0004' > /var/lib/dhcpcd/duid 83 printf '0004' > /var/lib/dhcpcd/duid
@@ -96,17 +97,22 @@ do_initbackup() {
96 97
97do_start() { 98do_start() {
98 do_privacy 99 do_privacy
99 /usr/sbin/rfkill block all
100 set_pwmfreq 100 set_pwmfreq
101} 101}
102 102
103do_stop() { 103do_stop() {
104 /usr/sbin/rfkill block all 104 if [ "$enable_privacy" = "true" ]
105 then
106 /usr/sbin/rfkill block all
107 fi
105 do_backup 108 do_backup
106} 109}
107 110
108do_restart() { 111do_restart() {
109 /usr/sbin/rfkill block all 112 if [ "$enable_privacy" = "true" ]
113 then
114 /usr/sbin/rfkill block all
115 fi
110 set_pwmfreq 116 set_pwmfreq
111} 117}
112 118