Skip to content

Commit

Permalink
allow overriding the folder for hdapsd.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 24, 2014
1 parent 8bb9076 commit 63a2572
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
AM_CPPFLAGS = -DSYSCONFDIR='"$(sysconfdir)"'

sbin_PROGRAMS=hdapsd
hdapsd_SOURCES=hdapsd.c hdapsd.h input-helper.c input-helper.h
hdapsd_CFLAGS=$(LIBCONFIG_CFLAGS)
Expand Down
1 change: 1 addition & 0 deletions src/hdapsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ void usage ()
printf("\n");
#ifdef HAVE_LIBCONFIG
printf(" -c --cfgfile=<cfgfile> Load configuration from <cfgfile>.\n");
printf(" By default, configuration is read from "CONFIG_FILE"\n");
#endif
printf(" -d --device=<device> <device> is likely to be hda or sda.\n");
printf(" Can be given multiple times\n");
Expand Down
2 changes: 1 addition & 1 deletion src/hdapsd.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <stdio.h>

#define PID_FILE "/var/run/hdapsd.pid"
#define CONFIG_FILE "/etc/hdapsd.conf"
#define CONFIG_FILE SYSCONFDIR"/hdapsd.conf"
#define HDAPS_POSITION_FILE "/sys/devices/platform/hdaps/position"
#define MOUSE_ACTIVITY_FILE "/sys/devices/platform/hdaps/keyboard_activity"
#define KEYBD_ACTIVITY_FILE "/sys/devices/platform/hdaps/mouse_activity"
Expand Down

0 comments on commit 63a2572

Please sign in to comment.