diff options
author | Charles Strahan <charles.c.strahan@gmail.com> | 2015-04-30 21:14:16 -0400 |
---|---|---|
committer | Charles Strahan <charles.c.strahan@gmail.com> | 2015-04-30 21:21:15 -0400 |
commit | 53ab1f7d3ca355a16569bb77bb950b89e8fcf01b (patch) | |
tree | df2cd5102d6f846f2654cf93a59f4b9d6c4b3bea /pkgs/os-specific/linux/mbpfan/fixes.patch | |
parent | a8f17b376ecb136b310900aca7b87eb49fd8306d (diff) | |
download | nixlib-53ab1f7d3ca355a16569bb77bb950b89e8fcf01b.tar nixlib-53ab1f7d3ca355a16569bb77bb950b89e8fcf01b.tar.gz nixlib-53ab1f7d3ca355a16569bb77bb950b89e8fcf01b.tar.bz2 nixlib-53ab1f7d3ca355a16569bb77bb950b89e8fcf01b.tar.lz nixlib-53ab1f7d3ca355a16569bb77bb950b89e8fcf01b.tar.xz nixlib-53ab1f7d3ca355a16569bb77bb950b89e8fcf01b.tar.zst nixlib-53ab1f7d3ca355a16569bb77bb950b89e8fcf01b.zip |
mbpfan: new package
Daemon that uses input from coretemp module and sets the fan speed using the applesmc module
Diffstat (limited to 'pkgs/os-specific/linux/mbpfan/fixes.patch')
-rw-r--r-- | pkgs/os-specific/linux/mbpfan/fixes.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/mbpfan/fixes.patch b/pkgs/os-specific/linux/mbpfan/fixes.patch new file mode 100644 index 000000000000..548cce05c358 --- /dev/null +++ b/pkgs/os-specific/linux/mbpfan/fixes.patch @@ -0,0 +1,29 @@ +diff --git a/src/main.c b/src/main.c +index e8af708..6cfee17 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -71,7 +71,7 @@ void check_requirements() + * Check for coretemp and applesmc modules + * Credits: -http://stackoverflow.com/questions/12978794 + */ +- FILE *fd = popen("lsmod | grep coretemp", "r"); ++ FILE *fd = popen("@LSMOD@ | @GREP@ coretemp", "r"); + char buf[16]; + + if (!(fread (buf, 1, sizeof (buf), fd) > 0)) { +@@ -87,7 +87,7 @@ void check_requirements() + + pclose(fd); + +- fd = popen("lsmod | grep applesmc", "r"); ++ fd = popen("@LSMOD@ | @GREP@ applesmc", "r"); + + if (!(fread (buf, 1, sizeof (buf), fd) > 0)) { + DIR* dir = opendir(APPLESMC_PATH); +@@ -145,4 +145,4 @@ int main(int argc, char *argv[]) + void (*fan_control)() = mbpfan; + go_daemon(fan_control); + exit(EXIT_SUCCESS); +-} +\ No newline at end of file ++} |