aboutsummaryrefslogtreecommitdiff
path: root/x200-my.initd
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2019-12-20 12:30:58 +0100
committerRobert Alessi <alessi@robertalessi.net>2019-12-20 12:30:58 +0100
commit7f7e352ad48d6c39dbf939a24a8a18260b3baebd (patch)
tree5f52650ac7219bb12e4080b060a881d0e5996860 /x200-my.initd
parent18f5c44dd0d8db72c97254319fb4422e02ccdae3 (diff)
downloadx200-my-7f7e352ad48d6c39dbf939a24a8a18260b3baebd.tar.gz
new extra_started_command refresh
Diffstat (limited to 'x200-my.initd')
-rw-r--r--x200-my.initd18
1 files changed, 13 insertions, 5 deletions
diff --git a/x200-my.initd b/x200-my.initd
index 400eaab..64223c0 100644
--- a/x200-my.initd
+++ b/x200-my.initd
@@ -9,7 +9,7 @@ pwmfreq="${PWMFREQ_RATE}"
9 9
10x200_cmdfreq_args="write 0x00061254 $pwmfreq" 10x200_cmdfreq_args="write 0x00061254 $pwmfreq"
11 11
12extra_started_commands="initbackup" 12extra_started_commands="initbackup refresh"
13 13
14autobackup="${conf_autobackup}" 14autobackup="${conf_autobackup}"
15backup_path="${conf_backup_path}" 15backup_path="${conf_backup_path}"
@@ -28,6 +28,13 @@ depend() {
28 before net 28 before net
29} 29}
30 30
31set_pwmfreq() {
32 if [ $is_thinkpad_x200 = "yes" ]
33 then
34 exec $x200_cmdfreq $x200_cmdfreq_args 2>/dev/null
35 fi
36}
37
31do_listofpackages() { 38do_listofpackages() {
32 /usr/bin/pacman -Qqetn > "$backup_path"/pkglist.txt 39 /usr/bin/pacman -Qqetn > "$backup_path"/pkglist.txt
33 /usr/bin/pacman -Qqem > "$backup_path"/foreignpkglist.txt 40 /usr/bin/pacman -Qqem > "$backup_path"/foreignpkglist.txt
@@ -66,6 +73,10 @@ do_privacy() {
66 fi 73 fi
67} 74}
68 75
76refresh() {
77 set_pwmfreq
78}
79
69initbackup() { 80initbackup() {
70 do_backup 81 do_backup
71} 82}
@@ -78,10 +89,7 @@ start() {
78 do_privacy 89 do_privacy
79 fi 90 fi
80 /usr/sbin/rfkill block all 91 /usr/sbin/rfkill block all
81 if [ $is_thinkpad_x200 = "yes" ] 92 set_pwmfreq
82 then
83 exec $x200_cmdfreq $x200_cmdfreq_args 2>/dev/null
84 fi
85} 93}
86 94
87stop() { 95stop() {