aboutsummaryrefslogtreecommitdiff
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
parent6f54e2d900e0a2977d23578b13c6d6cb0632042a (diff)
downloadmy-x200-56f4b3b4a5973b3d2925505afb74c6a7c2b131f8.tar.gz
associate rfkill to privacy settings
-rw-r--r--debian/changelog5
-rw-r--r--my-x200.initd12
2 files changed, 12 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index 9355a6d..b162f0e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
1my-x200 (0.7-3) UNRELEASED; urgency=medium 1my-x200 (0.7-4) UNRELEASED; urgency=medium
2 2
3 * Initial release. 3 * Initial release.
4 * Removed remnant lines left of openrc-run in initd file 4 * Removed remnant lines left of openrc-run in initd file
@@ -6,5 +6,6 @@ my-x200 (0.7-3) UNRELEASED; urgency=medium
6 * New acpi event: button/suspend 6 * New acpi event: button/suspend
7 * Added conflict with acpi-support 7 * Added conflict with acpi-support
8 * Map ThinkVantage to /etc/init.d/my-x200 refresh 8 * Map ThinkVantage to /etc/init.d/my-x200 refresh
9 * Kill radio only if enable_privacy is set to true
9 10
10 -- Robert Alessi <alessi@robertalessi.net> Sun, 14 Feb 2021 09:17:40 +0100 11 -- Robert Alessi <alessi@robertalessi.net> Mon, 22 Feb 2021 17:59:57 +0100
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