packages/utils/wifitoggle/Makefile
Karol Babioch f6221d4c65 wifitoggle: Do not generate error message in case of empty led_sysfs
While an empty led_sysfs definition works as intended (no LED state is
touched), an error message is generated, since the appropriate sysfs
interface does not exist:

          Sat Feb 27 16:42:55 2016 user.err wifitoggle: led:  not found

This patch makes sure that no such error message will be generated.

Signed-off-by: Karol Babioch <karol@babioch.de>
2016-02-27 21:57:23 +01:00

46 lines
1.1 KiB
Makefile

#
# Copyright (C) 2010-2014 OpenWrt.org
# Copyright (C) 2010 segal.di.ubi.pt
# Copyright (C) 2016 Karol Babioch <karol@babioch.de>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=wifitoggle
PKG_VERSION:=1
PKG_RELEASE:=5
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
include $(INCLUDE_DIR)/package.mk
define Package/wifitoggle
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Script to toggle Wi-Fi with a button and UCI config
endef
define Package/wifitoggle/description
Very versatile script to toggle Wi-Fi with a button. Allows to set
timeouts, persist changes after boot, and set LEDs according to the state.
endef
define Package/wifitoggle/conffiles
/etc/config/wifitoggle
endef
define Build/Compile
endef
define Package/wifitoggle/install
$(INSTALL_DIR) $(1)/etc/hotplug.d/button
$(INSTALL_BIN) ./files/wifitoggle.hotplug $(1)/etc/hotplug.d/button/50-wifitoggle
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/wifitoggle.config $(1)/etc/config/wifitoggle
endef
$(eval $(call BuildPackage,wifitoggle))