From 5169db7e24f80ee2e35aa747ef646dee2a7417fd Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 12 Feb 2021 17:18:04 +0100 Subject: allow my-x200 to be configured by means of .conf files in /etc/default/my-x200.d/ --- README.md | 6 ++++++ about.html | 1 + my-x200.confd | 6 ++++++ my-x200.initd | 13 +++++++++++++ my-x200_0.6-2.dsc | 34 +++++++++++++++++----------------- my-x200_0.6-2_amd64.deb | Bin 4668 -> 4880 bytes my-x200_0.6.orig.tar.gz | Bin 433766 -> 3359469 bytes 7 files changed, 43 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index c4f2bc5..9920587 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,12 @@ Configuration Once installed, `my-x200` is configured by editing [`/etc/default/my-x200`](http://git.robertalessi.net/my-x200/tree/my-x200.confd). +It is also possible to leave `/etc/default/my-200` untouched. In this +case, `my-x200` can source its configuration from one or more `*.conf` +files written in a specific directory `/etc/default/my-x200.d/` which +is to be created. This is the recommended method for these files +cannot be affected by subsequent updates. + Noise Removal ------------- Set the variable `is_thinkpad_x200` to `yes` (which is the default diff --git a/about.html b/about.html index 7c87376..074f5da 100644 --- a/about.html +++ b/about.html @@ -29,6 +29,7 @@

It is written to be used on Devuan GNU+Linux but it should work on other Debian-based distributions.

Configuration

Once installed, my-x200 is configured by editing /etc/default/my-x200.

+

It is also possible to leave /etc/default/my-200 untouched. In this case, my-x200 can source its configuration from one or more *.conf files written in a specific directory /etc/default/my-x200.d/ which is to be created. This is the recommended method for these files cannot be affected by subsequent updates.

Noise Removal

Set the variable is_thinkpad_x200 to yes (which is the default value). The default frequency rate should work. It may be changed by modifying the value of PWMFREQ_RATE.

Privacy Settings

diff --git a/my-x200.confd b/my-x200.confd index 74b941e..ae9606e 100644 --- a/my-x200.confd +++ b/my-x200.confd @@ -1,5 +1,11 @@ # /etc/default/my-x200: config file for /etc/init.d/my-x200 +# It is also possible to leave this file untouched. In this case, +# `my-x200` can source its configuration from one or more `*.conf` +# files written in a specific directory `/etc/default/my-x200.d/` +# which is to be created. This is the recommended method for these +# files cannot be affected by subsequent updates. + ######################################### # Options to pass to the my-x200 daemon # ######################################### diff --git a/my-x200.initd b/my-x200.initd index 545a778..01040da 100644 --- a/my-x200.initd +++ b/my-x200.initd @@ -24,12 +24,25 @@ NAME=my-x200 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME +# Read additional configuration files in /etc/default/my-x200.d/ +confdir="/etc/default/my-x200.d" + +if [ -d "$confdir" ] && [ -f "$confdir"/*.conf ] +then + for file in "$confdir"/*.conf + do + . "$file" + done +fi + +# Get my-x200 variables x200_cmdfreq="/usr/bin/intel_reg" pwmfreq="${PWMFREQ_RATE}" x200_cmdfreq_args="write 0x00061254 $pwmfreq" autobackup="${conf_autobackup}" backup_path="${conf_backup_path}" control_file="${conf_control_file}" + if [ "$use_rsnapshot" = "true" ] then backup_cmd="/usr/bin/rsnapshot" diff --git a/my-x200_0.6-2.dsc b/my-x200_0.6-2.dsc index 4e99861..2921f39 100644 --- a/my-x200_0.6-2.dsc +++ b/my-x200_0.6-2.dsc @@ -13,29 +13,29 @@ Build-Depends: debhelper (>= 10) Package-List: my-x200 deb misc optional arch=any Checksums-Sha1: - 3c535b0285cbef96b9ee377e4e9478770e3005b0 433766 my-x200_0.6.orig.tar.gz + 46dd490aa2c55c30780c8ff941ddc293c2ab5962 3359469 my-x200_0.6.orig.tar.gz fc77b94ca453b12a16eb2e8e5dd80387fc5f3dfe 1436 my-x200_0.6-2.debian.tar.xz Checksums-Sha256: - e2a405be1d396fb9d71cc0a16831fc1dd9ba87eb71c6fa496daa62392532bb38 433766 my-x200_0.6.orig.tar.gz + 31ea7ae4ec7df28ce5a5ce498be6a721590b0b26f315ab6261dba7145fa8ce77 3359469 my-x200_0.6.orig.tar.gz 38371a1002c278d147ec5a3383c201ab15178cd749f5c7ab49df889d6c63a78a 1436 my-x200_0.6-2.debian.tar.xz Files: - 2c09ed89728733006a5c51bc7fd07d17 433766 my-x200_0.6.orig.tar.gz + 2757c40eefe786cc922d0f82a25dca32 3359469 my-x200_0.6.orig.tar.gz 08e2552fbd769e9d9aec4bafd5a3ba2a 1436 my-x200_0.6-2.debian.tar.xz -----BEGIN PGP SIGNATURE----- -iQJMBAEBCAA2FiEERaXhpjEUeDwRCTLxF3PpJICFyMcFAmAgJ8UYHGFsZXNzaUBy -b2JlcnRhbGVzc2kubmV0AAoJEBdz6SSAhcjHuFYQAISOezMNj0dmAsd112AvjOwx -tNbfpqVSzjjyzPh6FvaEpQfodeCRqEjqzcSe7yD5awMBzmNHYdmwMkpFwKyDG4L9 -hLSBtng4ce9FTYL3jYS2EpImKpPP+Lpo99CMsgJEQAn8kv/KoR3fKBAF/q84TaRk -JcH/I4NDw/aGdNsCPKRclbSJWrYSBm1OZsA8eSZyQXoDZtTCuvv9qfvNCRuqqwQn -/ry0ndi5TILBVlSxTKvpzEwQ8pWYxzO/+Ga7lvujs5pSdzUZbIKR0rxm/okDCe3S -yTd/whXt6LU6JIyNiGDWLYtyHp2QjX0cYt7jqzS8cBhB22SIIYRXhu/I/s+9EIRi -BWin4aydxFTXdaZ91R2OrYUDnnTfsqzuibz4ScJ+s4ay957B3cyGwYV70tyASDvN -BjH1aepZx0/vvV/J2ES5TUL5xLRGhOS8tidj43O6hoOwtIRGHQdmHKGLDQCVySFi -eoWjM5XNJyrKTmRSNDVyrJjQG8ICVIXpjK62dqJ+sqLMGA5MbU1btwfi9g1owUx8 -pCXtpkgffeehx5Ns1HvZBG4E8r9JBHCjDcgB+bjSfxtoMwNe35iOLvs3kV9TyWbh -tplhDUdq+F4ud8oQFIFJt5Iyv1dWnEri58aq23MErwi7JlV4SimrcK3GyKl7XgEx -EANJo+IelLcgDMEM7v3w -=OP2p +iQJMBAEBCAA2FiEERaXhpjEUeDwRCTLxF3PpJICFyMcFAmAmqdkYHGFsZXNzaUBy +b2JlcnRhbGVzc2kubmV0AAoJEBdz6SSAhcjHIZoP/iAXvThBK2MBWqbLh0jevaFw +f87Q9v9Pj/N7gnv3JSkKkQRyCtIBfMI9LmtaUgZ/Fk4YG9Rp70nwKHx9g+shiP1h +MIpFaryHK3qBGwkX8AmIYmyIJrwqNAa819SXce6C0oe0y4Y2sU2rcB1XZwVU12z1 +3pSFXsbGm/ycYZozRV2HeIDVvJ0287jqjg1T8NSgFzrqICzgI8srh4MSeT43Ia70 +jyAYMLTSV6JsFBUknmBsriKMwzHbmjElUJd1l1NdJgYD4U0qAzv8qnQn9rLCrB65 +JtYTvnWRY9CWg3KmJrhA4hdueJsaj/zA5TF3QUU7VEHkkBHlOwFtvx3hHoW60Dy/ +Rk6p6915NgfOei85JvsdV9m2QAInpDx+8nf7s5eMf4xAvk+7qu6a04/oU65ShTDS +IVKbXWyydS30wEc2C2u49a8VBJday0yx88H0Lc4EocAnD4Ehrr2oUJ56FaPZYPCg +pi6F9iM7JxjjrKwRLBSG/PFofX01sibtfK5Fg3bWVerNr3uvEgK5D7C6qKaAUTcx +ILvl0iHBAJN7o/BjyySbfGJ5VcGgwx2SqetVsdPdEchCjs6N0l9eCW8CNJkPkoJY +t2be3NirpAZzuMLA2l6cGOTsgQBg1Ym1JKQpxszmWHC/axonVddf14QQcLKxXdRE +Yq616UM8aTNyFqa1MEjV +=Iegc -----END PGP SIGNATURE----- diff --git a/my-x200_0.6-2_amd64.deb b/my-x200_0.6-2_amd64.deb index 3959700..1c70d70 100644 Binary files a/my-x200_0.6-2_amd64.deb and b/my-x200_0.6-2_amd64.deb differ diff --git a/my-x200_0.6.orig.tar.gz b/my-x200_0.6.orig.tar.gz index 7a32b05..4bb3791 100644 Binary files a/my-x200_0.6.orig.tar.gz and b/my-x200_0.6.orig.tar.gz differ -- cgit v1.2.3