diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-05-25 21:06:33 +0530 |
---|---|---|
committer | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-06-08 18:48:36 +0530 |
commit | f9de54be38be17456dae06408ed93f3416a6621f (patch) | |
tree | 7d655ab336bf2be54ec812d6bc60ee1780a6702e /configure.ac | |
parent | 413fd348514e5ab779a445f4f2cee84e9254b9a1 (diff) | |
download | phosphor-led-sysfs-f9de54be38be17456dae06408ed93f3416a6621f.tar.gz phosphor-led-sysfs-f9de54be38be17456dae06408ed93f3416a6621f.zip |
Work-around: Extract led name from device path
udev rule for leds subsystem in Witherspoon launches a systemd
service file with /sys/class/leds/$name. If the path is
sys-class-leds-rear-fault, systemd service file
interprets it as /sys/class/leds/rear/fault.
However, what is really needed by the service file is
/sys/class/leds/rear-fault.
This is a limitation in current systemd with template argument
containing hyphen.
Short term solution is to extract $name from path
and convert "/" to "-". It would then become:
/sys/class/leds/rear-fault and hence will work.
Refer: systemd/systemd#5072
Change-Id: I0acc11d039650857005ba75810e3ef6bcc4a3934
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 02472d0..6a08be3 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,11 @@ AC_ARG_VAR(OBJPATH, [The physical LED controller Dbus root]) AS_IF([test "x$OBJPATH" == "x"], [OBJPATH="/xyz/openbmc_project/led/physical"]) AC_DEFINE_UNQUOTED([OBJPATH], ["$OBJPATH"], [The physical LED controller Dbus root]) +# Platform device path for led subsystem. +AC_ARG_VAR(DEVPATH, [Physical led device path]) +AS_IF([test "x$DEVPATH" == "x"], [DEVPATH="/sys/class/leds/"]) +AC_DEFINE_UNQUOTED([DEVPATH], ["$DEVPATH"], [Physical led device path]) + # Create configured output AC_CONFIG_FILES([Makefile]) AC_OUTPUT |