@@ -, +, @@ wireless: support both sysfs attr enable/enabled backport of commit 8e8a88373079dffdf7196e2e622c5ade209b4439 Starting with linux kernel 3.13, the sysfs attribute 'enable' for pci devices was renambed to 'enabled'. Support the two notations to allow seamless migration. Signed-off-by: Stefan Huber --- a/usr/share/laptop-mode-tools/modules/wireless-ipw-power +++ a/usr/share/laptop-mode-tools/modules/wireless-ipw-power @@ -71,7 +71,7 @@ if [ x$CONTROL_IPW_POWER = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_IPW # the driver. LINK_TARGET=`readlink $DEVICE/device/driver` LINK_TARGET=${LINK_TARGET##*/} - ENABLED=`cat $DEVICE/device/enable` + ENABLED=`[ -r $DEVICE/device/enabled ] && cat $DEVICE/device/enabled || cat $DEVICE/device/enable` if [ $ENABLED -eq 1 -a "$LINK_TARGET" = "$1" ]; then # add the interface name to the list --- a/usr/share/laptop-mode-tools/modules/wireless-iwl-power +++ a/usr/share/laptop-mode-tools/modules/wireless-iwl-power @@ -24,7 +24,7 @@ findWifiIfsByDriver () { # the driver. LINK_TARGET=`readlink $DEVICE/device/driver` LINK_TARGET=${LINK_TARGET##*/} - ENABLED=`cat $DEVICE/device/enable` + ENABLED=`[ -r $DEVICE/device/enabled ] && cat $DEVICE/device/enabled || cat $DEVICE/device/enable` if [ $ENABLED -eq 1 -a "$LINK_TARGET" = "$1" ] ; then # add the interface name to the list