diff options
author | Robert Alessi <alessi@robertalessi.net> | 2021-02-12 17:18:04 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2021-02-12 17:18:04 +0100 |
commit | 5169db7e24f80ee2e35aa747ef646dee2a7417fd (patch) | |
tree | 87e8f4c31e612c4add05aec3d543702f59d7bbbd /my-x200.initd | |
parent | d82d2bcb18236daba4bf3110a67dff5639dbc768 (diff) | |
download | my-x200-5169db7e24f80ee2e35aa747ef646dee2a7417fd.tar.gz |
allow my-x200 to be configured by means of .conf files in /etc/default/my-x200.d/
Diffstat (limited to 'my-x200.initd')
-rw-r--r-- | my-x200.initd | 13 |
1 files changed, 13 insertions, 0 deletions
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 | |||
24 | # Read configuration variable file if it is present | 24 | # Read configuration variable file if it is present |
25 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME | 25 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME |
26 | 26 | ||
27 | # Read additional configuration files in /etc/default/my-x200.d/ | ||
28 | confdir="/etc/default/my-x200.d" | ||
29 | |||
30 | if [ -d "$confdir" ] && [ -f "$confdir"/*.conf ] | ||
31 | then | ||
32 | for file in "$confdir"/*.conf | ||
33 | do | ||
34 | . "$file" | ||
35 | done | ||
36 | fi | ||
37 | |||
38 | # Get my-x200 variables | ||
27 | x200_cmdfreq="/usr/bin/intel_reg" | 39 | x200_cmdfreq="/usr/bin/intel_reg" |
28 | pwmfreq="${PWMFREQ_RATE}" | 40 | pwmfreq="${PWMFREQ_RATE}" |
29 | x200_cmdfreq_args="write 0x00061254 $pwmfreq" | 41 | x200_cmdfreq_args="write 0x00061254 $pwmfreq" |
30 | autobackup="${conf_autobackup}" | 42 | autobackup="${conf_autobackup}" |
31 | backup_path="${conf_backup_path}" | 43 | backup_path="${conf_backup_path}" |
32 | control_file="${conf_control_file}" | 44 | control_file="${conf_control_file}" |
45 | |||
33 | if [ "$use_rsnapshot" = "true" ] | 46 | if [ "$use_rsnapshot" = "true" ] |
34 | then | 47 | then |
35 | backup_cmd="/usr/bin/rsnapshot" | 48 | backup_cmd="/usr/bin/rsnapshot" |