diff options
Diffstat (limited to 'x200-my.initd')
-rw-r--r-- | x200-my.initd | 18 |
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 | ||
10 | x200_cmdfreq_args="write 0x00061254 $pwmfreq" | 10 | x200_cmdfreq_args="write 0x00061254 $pwmfreq" |
11 | 11 | ||
12 | extra_started_commands="initbackup" | 12 | extra_started_commands="initbackup refresh" |
13 | 13 | ||
14 | autobackup="${conf_autobackup}" | 14 | autobackup="${conf_autobackup}" |
15 | backup_path="${conf_backup_path}" | 15 | backup_path="${conf_backup_path}" |
@@ -28,6 +28,13 @@ depend() { | |||
28 | before net | 28 | before net |
29 | } | 29 | } |
30 | 30 | ||
31 | set_pwmfreq() { | ||
32 | if [ $is_thinkpad_x200 = "yes" ] | ||
33 | then | ||
34 | exec $x200_cmdfreq $x200_cmdfreq_args 2>/dev/null | ||
35 | fi | ||
36 | } | ||
37 | |||
31 | do_listofpackages() { | 38 | do_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 | ||
76 | refresh() { | ||
77 | set_pwmfreq | ||
78 | } | ||
79 | |||
69 | initbackup() { | 80 | initbackup() { |
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 | ||
87 | stop() { | 95 | stop() { |