From 7f7e352ad48d6c39dbf939a24a8a18260b3baebd Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 20 Dec 2019 12:30:58 +0100 Subject: new extra_started_command refresh --- x200-my.initd | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'x200-my.initd') 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}" x200_cmdfreq_args="write 0x00061254 $pwmfreq" -extra_started_commands="initbackup" +extra_started_commands="initbackup refresh" autobackup="${conf_autobackup}" backup_path="${conf_backup_path}" @@ -28,6 +28,13 @@ depend() { before net } +set_pwmfreq() { + if [ $is_thinkpad_x200 = "yes" ] + then + exec $x200_cmdfreq $x200_cmdfreq_args 2>/dev/null + fi +} + do_listofpackages() { /usr/bin/pacman -Qqetn > "$backup_path"/pkglist.txt /usr/bin/pacman -Qqem > "$backup_path"/foreignpkglist.txt @@ -66,6 +73,10 @@ do_privacy() { fi } +refresh() { + set_pwmfreq +} + initbackup() { do_backup } @@ -78,10 +89,7 @@ start() { do_privacy fi /usr/sbin/rfkill block all - if [ $is_thinkpad_x200 = "yes" ] - then - exec $x200_cmdfreq $x200_cmdfreq_args 2>/dev/null - fi + set_pwmfreq } stop() { -- cgit v1.2.3