+++ /dev/null
-#
-# Automatically generated make config: don't edit
-# OpenWrt version: Kamikaze (r20240)
-# Thu Mar 18 00:33:50 2010
-#
-CONFIG_HAVE_DOT_CONFIG=y
-# CONFIG_TARGET_ppc40x is not set
-# CONFIG_TARGET_ppc44x is not set
-# CONFIG_TARGET_atheros is not set
-# CONFIG_TARGET_ar71xx is not set
-# CONFIG_TARGET_at91 is not set
-# CONFIG_TARGET_avr32 is not set
-# CONFIG_TARGET_brcm63xx is not set
-# CONFIG_TARGET_brcm47xx is not set
-# CONFIG_TARGET_brcm_2_4 is not set
-# CONFIG_TARGET_sibyte is not set
-# CONFIG_TARGET_octeon is not set
-# CONFIG_TARGET_ep93xx is not set
-# CONFIG_TARGET_cobalt is not set
-# CONFIG_TARGET_gemini is not set
-# CONFIG_TARGET_etrax is not set
-# CONFIG_TARGET_coldfire is not set
-# CONFIG_TARGET_mpc52xx is not set
-# CONFIG_TARGET_mpc83xx is not set
-# CONFIG_TARGET_goldfish is not set
-# CONFIG_TARGET_amazon is not set
-# CONFIG_TARGET_ifxmips is not set
-# CONFIG_TARGET_adm5120 is not set
-# CONFIG_TARGET_xburst is not set
-# CONFIG_TARGET_iop32x is not set
-CONFIG_TARGET_ixp4xx=y
-# CONFIG_TARGET_malta is not set
-# CONFIG_TARGET_kirkwood is not set
-# CONFIG_TARGET_orion is not set
-# CONFIG_TARGET_pxa is not set
-# CONFIG_TARGET_rb532 is not set
-# CONFIG_TARGET_pxcab is not set
-# CONFIG_TARGET_rdc is not set
-# CONFIG_TARGET_au1000 is not set
-# CONFIG_TARGET_ramips is not set
-# CONFIG_TARGET_s3c24xx is not set
-# CONFIG_TARGET_ps3 is not set
-# CONFIG_TARGET_ar7 is not set
-# CONFIG_TARGET_omap35xx is not set
-# CONFIG_TARGET_ubicom32 is not set
-# CONFIG_TARGET_uml is not set
-# CONFIG_TARGET_x86 is not set
-# CONFIG_TARGET_xburst_qi_lb60 is not set
-# CONFIG_TARGET_xburst_n516 is not set
-# CONFIG_TARGET_xburst_n526 is not set
-CONFIG_TARGET_ixp4xx_generic=y
-# CONFIG_TARGET_ixp4xx_harddisk is not set
-# CONFIG_TARGET_ramips_rt288x is not set
-# CONFIG_TARGET_ramips_rt305x is not set
-# CONFIG_TARGET_au1000_au1500 is not set
-# CONFIG_TARGET_au1000_au1550 is not set
-# CONFIG_TARGET_ps3_petitboot is not set
-# CONFIG_TARGET_x86_generic is not set
-# CONFIG_TARGET_x86_olpc is not set
-# CONFIG_TARGET_x86_xen_domu is not set
-# CONFIG_TARGET_rdc_amit is not set
-# CONFIG_TARGET_rdc_ar525w is not set
-# CONFIG_TARGET_rdc_r8610 is not set
-# CONFIG_TARGET_rdc_dir_450 is not set
-# CONFIG_TARGET_rdc_sitecom is not set
-# CONFIG_TARGET_rdc_bifferboard is not set
-# CONFIG_TARGET_omap35xx_generic is not set
-# CONFIG_TARGET_orion_generic is not set
-# CONFIG_TARGET_orion_harddisk is not set
-# CONFIG_TARGET_adm5120_router_le is not set
-# CONFIG_TARGET_adm5120_router_be is not set
-# CONFIG_TARGET_goldfish_Default is not set
-# CONFIG_TARGET_brcm63xx_Broadcom is not set
-# CONFIG_TARGET_brcm63xx_Atheros is not set
-# CONFIG_TARGET_brcm63xx_Ralink is not set
-# CONFIG_TARGET_brcm63xx_NoWiFi is not set
-# CONFIG_TARGET_brcm63xx_GW6X00 is not set
-# CONFIG_TARGET_xburst_qi_lb60_Default is not set
-# CONFIG_TARGET_xburst_n516_Default is not set
-# CONFIG_TARGET_xburst_n526_Default is not set
-# CONFIG_TARGET_avr32_Default is not set
-# CONFIG_TARGET_ixp4xx_generic_Default is not set
-# CONFIG_TARGET_ixp4xx_generic_Atheros-ath5k is not set
-CONFIG_TARGET_ixp4xx_generic_NSLU2=y
-# CONFIG_TARGET_ixp4xx_generic_NAS100d is not set
-# CONFIG_TARGET_ixp4xx_generic_DSMG600RevA is not set
-# CONFIG_TARGET_ixp4xx_generic_USR8200 is not set
-# CONFIG_TARGET_ixp4xx_harddisk_FSG3 is not set
-# CONFIG_TARGET_atheros_Default is not set
-# CONFIG_TARGET_ramips_rt288x_Default is not set
-# CONFIG_TARGET_ramips_rt305x_Default is not set
-# CONFIG_TARGET_malta_Default is not set
-# CONFIG_TARGET_brcm_2_4_Broadcom is not set
-# CONFIG_TARGET_brcm_2_4_BroadcomMimo is not set
-# CONFIG_TARGET_brcm_2_4_None is not set
-# CONFIG_TARGET_brcm_2_4_USBGeneric is not set
-# CONFIG_TARGET_brcm_2_4_WL500G is not set
-# CONFIG_TARGET_brcm_2_4_WL500GD is not set
-# CONFIG_TARGET_brcm_2_4_WL500GP is not set
-# CONFIG_TARGET_brcm_2_4_WL700GE is not set
-# CONFIG_TARGET_brcm_2_4_WLHDD is not set
-# CONFIG_TARGET_brcm_2_4_WRT300Nv11 is not set
-# CONFIG_TARGET_brcm_2_4_WRT54G3G is not set
-# CONFIG_TARGET_etrax_default is not set
-# CONFIG_TARGET_etrax_vhdl_no_fb is not set
-# CONFIG_TARGET_ubicom32_Default is not set
-# CONFIG_TARGET_kirkwood_Default is not set
-# CONFIG_TARGET_s3c24xx_openmoko-gta02-minimal is not set
-# CONFIG_TARGET_s3c24xx_openmoko-gta02-full is not set
-# CONFIG_TARGET_au1000_au1500_Atheros is not set
-# CONFIG_TARGET_au1000_au1500_InternetBox is not set
-# CONFIG_TARGET_au1000_au1500_MeshCube is not set
-# CONFIG_TARGET_au1000_au1550_DBAu1550 is not set
-# CONFIG_TARGET_ppc44x_Default is not set
-# CONFIG_TARGET_ps3_petitboot_Default is not set
-# CONFIG_TARGET_brcm47xx_Broadcom-b43 is not set
-# CONFIG_TARGET_brcm47xx_Atheros is not set
-# CONFIG_TARGET_brcm47xx_Atheros-ath5k is not set
-# CONFIG_TARGET_brcm47xx_None is not set
-# CONFIG_TARGET_brcm47xx_WGT634U is not set
-# CONFIG_TARGET_brcm47xx_WL500GPv1 is not set
-# CONFIG_TARGET_brcm47xx_WRT350Nv1 is not set
-# CONFIG_TARGET_brcm47xx_WRTSL54GS is not set
-# CONFIG_TARGET_coldfire_Default is not set
-# CONFIG_TARGET_x86_generic_Generic is not set
-# CONFIG_TARGET_x86_generic_Alix is not set
-# CONFIG_TARGET_x86_generic_Soekris45xx is not set
-# CONFIG_TARGET_x86_generic_Soekris48xx is not set
-# CONFIG_TARGET_x86_generic_Wrap is not set
-# CONFIG_TARGET_x86_olpc_Default is not set
-# CONFIG_TARGET_x86_xen_domu_Default is not set
-# CONFIG_TARGET_rdc_amit_Default is not set
-# CONFIG_TARGET_rdc_ar525w_Default is not set
-# CONFIG_TARGET_rdc_r8610_Default is not set
-# CONFIG_TARGET_rdc_dir_450_Default is not set
-# CONFIG_TARGET_rdc_sitecom_Default is not set
-# CONFIG_TARGET_rdc_bifferboard_Default is not set
-# CONFIG_TARGET_omap35xx_generic_Beagleboard is not set
-# CONFIG_TARGET_rb532_Default is not set
-# CONFIG_TARGET_orion_generic_Default is not set
-# CONFIG_TARGET_orion_harddisk_Default is not set
-# CONFIG_TARGET_adm5120_router_le_Generic is not set
-# CONFIG_TARGET_adm5120_router_le_CAS630 is not set
-# CONFIG_TARGET_adm5120_router_le_CAS630W is not set
-# CONFIG_TARGET_adm5120_router_le_CAS670 is not set
-# CONFIG_TARGET_adm5120_router_le_CAS670W is not set
-# CONFIG_TARGET_adm5120_router_le_CAS700 is not set
-# CONFIG_TARGET_adm5120_router_le_CAS700W is not set
-# CONFIG_TARGET_adm5120_router_le_CAS771 is not set
-# CONFIG_TARGET_adm5120_router_le_CAS771W is not set
-# CONFIG_TARGET_adm5120_router_le_CAS790 is not set
-# CONFIG_TARGET_adm5120_router_le_CAS861 is not set
-# CONFIG_TARGET_adm5120_router_le_CAS861W is not set
-# CONFIG_TARGET_adm5120_router_le_NFS101U is not set
-# CONFIG_TARGET_adm5120_router_le_NFS101WU is not set
-# CONFIG_TARGET_adm5120_router_le_NP27G is not set
-# CONFIG_TARGET_adm5120_router_le_NP28G is not set
-# CONFIG_TARGET_adm5120_router_le_WP54 is not set
-# CONFIG_TARGET_adm5120_router_le_BR6104K is not set
-# CONFIG_TARGET_adm5120_router_le_BR6104KP is not set
-# CONFIG_TARGET_adm5120_router_le_BR6104WG is not set
-# CONFIG_TARGET_adm5120_router_le_BR6114WG is not set
-# CONFIG_TARGET_adm5120_router_le_EASY5120RT is not set
-# CONFIG_TARGET_adm5120_router_le_EASY5120PATA is not set
-# CONFIG_TARGET_adm5120_router_le_PMUGW is not set
-# CONFIG_TARGET_adm5120_router_le_5GXI is not set
-# CONFIG_TARGET_adm5120_router_le_RouterBoard is not set
-# CONFIG_TARGET_adm5120_router_be_Generic is not set
-# CONFIG_TARGET_adm5120_router_be_P334WT is not set
-# CONFIG_TARGET_adm5120_router_be_P335WT is not set
-# CONFIG_TARGET_uml_Default is not set
-# CONFIG_TARGET_ep93xx_Default is not set
-# CONFIG_TARGET_at91_Default is not set
-# CONFIG_TARGET_ar71xx_Default is not set
-# CONFIG_TARGET_ar71xx_Madwifi is not set
-# CONFIG_TARGET_ar71xx_AP81 is not set
-# CONFIG_TARGET_ar71xx_AP83 is not set
-# CONFIG_TARGET_ar71xx_PB42 is not set
-# CONFIG_TARGET_ar71xx_PB44 is not set
-# CONFIG_TARGET_ar71xx_A02RBW300N is not set
-# CONFIG_TARGET_ar71xx_WZRHPG300NH is not set
-# CONFIG_TARGET_ar71xx_WP543 is not set
-# CONFIG_TARGET_ar71xx_DIR600A1 is not set
-# CONFIG_TARGET_ar71xx_DIR615C1 is not set
-# CONFIG_TARGET_ar71xx_DIR825B1 is not set
-# CONFIG_TARGET_ar71xx_WRT160NL is not set
-# CONFIG_TARGET_ar71xx_WRT400N is not set
-# CONFIG_TARGET_ar71xx_WNDR3700 is not set
-# CONFIG_TARGET_ar71xx_MZKW04NU is not set
-# CONFIG_TARGET_ar71xx_MZKW300NH is not set
-# CONFIG_TARGET_ar71xx_TLWR741NDV1 is not set
-# CONFIG_TARGET_ar71xx_TLWR841NV15 is not set
-# CONFIG_TARGET_ar71xx_TLWR841NDV3 is not set
-# CONFIG_TARGET_ar71xx_TLWR841NDV5 is not set
-# CONFIG_TARGET_ar71xx_TLWR941NDV2 is not set
-# CONFIG_TARGET_ar71xx_TLWR941NDV4 is not set
-# CONFIG_TARGET_ar71xx_TLWR1043NDV1 is not set
-# CONFIG_TARGET_ar71xx_TEW632BRP is not set
-# CONFIG_TARGET_ar71xx_TEW652BRP is not set
-# CONFIG_TARGET_ar71xx_UBNTRS is not set
-# CONFIG_TARGET_ar71xx_UBNTRSPRO is not set
-# CONFIG_TARGET_ar71xx_UBNT is not set
-# CONFIG_TARGET_octeon_generic is not set
-# CONFIG_TARGET_octeon_mototech is not set
-# CONFIG_TARGET_octeon_simulator is not set
-# CONFIG_TARGET_ifxmips_None is not set
-# CONFIG_TARGET_ifxmips_Atheros is not set
-# CONFIG_TARGET_ifxmips_Ralink is not set
-# CONFIG_TARGET_mpc83xx_Default is not set
-# CONFIG_TARGET_sibyte_Default is not set
-# CONFIG_TARGET_gemini_Default is not set
-# CONFIG_TARGET_mpc52xx_Default is not set
-# CONFIG_TARGET_ar7_Annex-A is not set
-# CONFIG_TARGET_ar7_Annex-B is not set
-# CONFIG_TARGET_ar7_Texas is not set
-# CONFIG_TARGET_ar7_None is not set
-# CONFIG_TARGET_cobalt_Default is not set
-# CONFIG_TARGET_pxcab_Default is not set
-# CONFIG_TARGET_pxa_Default is not set
-# CONFIG_TARGET_iop32x_Default is not set
-# CONFIG_TARGET_ppc40x_Default is not set
-# CONFIG_TARGET_amazon_Default is not set
-CONFIG_HAS_SUBTARGETS=y
-CONFIG_TARGET_BOARD="ixp4xx"
-CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe -march=armv5te -mtune=xscale -funit-at-a-time"
-CONFIG_LINUX_2_6_32=y
-CONFIG_DEFAULT_base-files=y
-CONFIG_DEFAULT_busybox=y
-CONFIG_DEFAULT_dnsmasq=y
-CONFIG_DEFAULT_dropbear=y
-CONFIG_DEFAULT_fconfig=y
-CONFIG_DEFAULT_firewall=y
-CONFIG_DEFAULT_hotplug2=y
-CONFIG_DEFAULT_iptables=y
-CONFIG_DEFAULT_ixp4xx-microcode=y
-CONFIG_DEFAULT_kmod-fs-ext2=y
-CONFIG_DEFAULT_kmod-fs-ext3=y
-CONFIG_DEFAULT_kmod-ipt-nathelper=y
-CONFIG_DEFAULT_kmod-scsi-core=y
-CONFIG_DEFAULT_kmod-usb-core=y
-CONFIG_DEFAULT_kmod-usb-ohci=y
-CONFIG_DEFAULT_kmod-usb-storage=y
-CONFIG_DEFAULT_kmod-usb2=y
-CONFIG_DEFAULT_libc=y
-CONFIG_DEFAULT_libgcc=y
-CONFIG_DEFAULT_mtd=y
-CONFIG_DEFAULT_opkg=y
-CONFIG_DEFAULT_ppp=y
-CONFIG_DEFAULT_ppp-mod-pppoe=y
-CONFIG_DEFAULT_uci=y
-CONFIG_DEFAULT_ucitrigger=y
-CONFIG_DEFAULT_udevtrigger=y
-CONFIG_LINUX_2_6=y
-CONFIG_AUDIO_SUPPORT=y
-CONFIG_GPIO_SUPPORT=y
-CONFIG_PCI_SUPPORT=y
-CONFIG_USB_SUPPORT=y
-CONFIG_BIG_ENDIAN=y
-CONFIG_USES_SQUASHFS=y
-CONFIG_armeb=y
-CONFIG_ARCH="armeb"
-
-#
-# Target Images
-#
-# CONFIG_TARGET_ROOTFS_INITRAMFS is not set
-# CONFIG_TARGET_ROOTFS_JFFS2 is not set
-CONFIG_TARGET_ROOTFS_SQUASHFS=y
-# CONFIG_TARGET_ROOTFS_TGZ is not set
-# CONFIG_TARGET_ROOTFS_CPIOGZ is not set
-# CONFIG_TARGET_ROOTFS_EXT2FS is not set
-
-#
-# Image Options
-#
-CONFIG_X86_GRUB_ROOTPART="/dev/sda2"
-CONFIG_X86_GRUB_BOOTOPTS=""
-CONFIG_OLPC_BOOTSCRIPT_ROOTPART="/dev/sda2"
-
-#
-# Global build settings
-#
-# CONFIG_ALL is not set
-
-#
-# General build options
-#
-# CONFIG_CLEAN_IPKG is not set
-CONFIG_LARGEFILE=y
-# CONFIG_SHADOW_PASSWORDS is not set
-# CONFIG_NO_STRIP is not set
-# CONFIG_USE_STRIP is not set
-CONFIG_USE_SSTRIP=y
-# CONFIG_USE_MKLIBS is not set
-# CONFIG_STRIP_KERNEL_EXPORTS is not set
-
-#
-# Package build options
-#
-# CONFIG_DEBUG is not set
-CONFIG_IPV6=y
-
-#
-# Kernel build options
-#
-# CONFIG_KERNEL_KALLSYMS is not set
-# CONFIG_KERNEL_PROFILING is not set
-# CONFIG_KERNEL_DEBUG_FS is not set
-CONFIG_DEVEL=y
-CONFIG_BROKEN=y
-CONFIG_DOWNLOAD_FOLDER=""
-CONFIG_LOCALMIRROR=""
-CONFIG_AUTOREBUILD=y
-CONFIG_BUILD_SUFFIX=""
-CONFIG_TARGET_ROOTFS_DIR=""
-CONFIG_CCACHE=y
-CONFIG_EXTERNAL_KERNEL_TREE=""
-CONFIG_KERNEL_GIT_CLONE_URI=""
-CONFIG_KERNEL_GIT_LOCAL_REPOSITORY=""
-# CONFIG_TARGET_OPTIONS is not set
-CONFIG_TARGET_OPTIMIZATION="-Os -pipe -march=armv5te -mtune=xscale -funit-at-a-time"
-CONFIG_SOFT_FLOAT=y
-# CONFIG_EXTERNAL_TOOLCHAIN is not set
-CONFIG_NEED_TOOLCHAIN=y
-# CONFIG_TOOLCHAINOPTS is not set
-CONFIG_EABI_SUPPORT=y
-# CONFIG_EXTRA_TARGET_ARCH is not set
-CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS=""
-CONFIG_BINUTILS_VERSION="2.19.1"
-CONFIG_GCC_VERSION_4_3_3_CS=y
-CONFIG_EXTRA_GCC_CONFIG_OPTIONS=""
-# CONFIG_SSP_SUPPORT is not set
-CONFIG_INSTALL_LIBSTDCPP=y
-# CONFIG_INSTALL_LIBGCJ is not set
-CONFIG_USE_UCLIBC=y
-# CONFIG_GDB is not set
-# CONFIG_INSIGHT is not set
-CONFIG_GCC_VERSION="4.3.3+cs"
-CONFIG_GCC_VERSION_4=y
-CONFIG_GCC_VERSION_4_3=y
-CONFIG_UCLIBC_VERSION="0.9.30.1"
-CONFIG_LIBC="uClibc"
-CONFIG_LIBC_VERSION="0.9.30.1"
-CONFIG_TARGET_SUFFIX="uclibcgnueabi"
-# CONFIG_IB is not set
-# CONFIG_SDK is not set
-# CONFIG_MAKE_TOOLCHAIN is not set
-CONFIG_IMAGEOPT=y
-CONFIG_UCI_PRECONFIG_luci_main_lang="en"
-CONFIG_UCI_PRECONFIG_network_lan_dns="89.106.211.1"
-CONFIG_UCI_PRECONFIG_network_lan_proto="static"
-CONFIG_UCI_PRECONFIG_network_lan_gateway="89.106.215.33"
-CONFIG_UCI_PRECONFIG_network_lan_netmask="255.255.255.224"
-CONFIG_UCI_PRECONFIG_network_lan_ipaddr="89.106.215.59"
-# CONFIG_PREINITOPT is not set
-CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
-CONFIG_TARGET_PREINIT_TIMEOUT=2
-# CONFIG_TARGET_PREINIT_SHOW_NETMSG is not set
-# CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG is not set
-CONFIG_TARGET_PREINIT_IFNAME=""
-CONFIG_TARGET_PREINIT_IP="192.168.1.1"
-CONFIG_TARGET_PREINIT_NETMASK="255.255.255.0"
-CONFIG_TARGET_PREINIT_BROADCAST="192.168.1.255"
-# CONFIG_INITOPT is not set
-CONFIG_TARGET_INIT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
-CONFIG_TARGET_INIT_ENV=""
-CONFIG_TARGET_INIT_CMD="/sbin/init"
-CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
-
-#
-# Package features
-#
-CONFIG_FEATURE_drawing-backend_DirectFB=y
-# CONFIG_FEATURE_drawing-backend_libX11 is not set
-
-#
-# Base system
-#
-CONFIG_PACKAGE_base-files=y
-CONFIG_PACKAGE_block-mount=y
-CONFIG_PACKAGE_block-hotplug=m
-# CONFIG_PACKAGE_br2684ctl is not set
-CONFIG_PACKAGE_bridge=y
-CONFIG_PACKAGE_busybox=y
-
-#
-# Configuration
-#
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DEVFS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_2_4_MODULES is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_2_6_MODULES=y
-# CONFIG_BUSYBOX_CONFIG_NOMMU is not set
-# CONFIG_CONFIG_BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_BUSYBOX_CONFIG_HUSH is not set
-CONFIG_BUSYBOX_CONFIG_HAVE_DOT_CONFIG=y
-
-#
-# Busybox Settings
-#
-
-#
-# General Configuration
-#
-# CONFIG_BUSYBOX_CONFIG_DESKTOP is not set
-# CONFIG_BUSYBOX_CONFIG_EXTRA_COMPAT is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
-CONFIG_BUSYBOX_CONFIG_SHOW_USAGE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_INSTALLER is not set
-# CONFIG_BUSYBOX_CONFIG_LOCALE_SUPPORT is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_ASSUME_UNICODE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
-CONFIG_BUSYBOX_CONFIG_LONG_OPTS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DEVPTS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CLEAN_UP is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_PIDFILE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_SUID=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SUID_CONFIG is not set
-# CONFIG_BUSYBOX_CONFIG_SELINUX is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS=y
-CONFIG_BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
-CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HAVE_RPC=y
-
-#
-# Build Options
-#
-# CONFIG_BUSYBOX_CONFIG_STATIC is not set
-# CONFIG_BUSYBOX_CONFIG_PIE is not set
-CONFIG_BUSYBOX_CONFIG_LFS=y
-CONFIG_BUSYBOX_CONFIG_CROSS_COMPILER_PREFIX=""
-CONFIG_BUSYBOX_CONFIG_EXTRA_CFLAGS=""
-
-#
-# Debugging Options
-#
-# CONFIG_BUSYBOX_CONFIG_DEBUG is not set
-# CONFIG_BUSYBOX_CONFIG_WERROR is not set
-CONFIG_BUSYBOX_CONFIG_NO_DEBUG_LIB=y
-# CONFIG_BUSYBOX_CONFIG_DMALLOC is not set
-# CONFIG_BUSYBOX_CONFIG_EFENCE is not set
-CONFIG_BUSYBOX_CONFIG_INCLUDE_SUSv2=y
-
-#
-# Installation Options
-#
-# CONFIG_BUSYBOX_CONFIG_INSTALL_NO_USR is not set
-CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS=y
-# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS is not set
-# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
-# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_DONT is not set
-CONFIG_BUSYBOX_CONFIG_PREFIX="./_install"
-
-#
-# Busybox Library Tuning
-#
-CONFIG_BUSYBOX_CONFIG_PASSWORD_MINLEN=6
-CONFIG_BUSYBOX_CONFIG_MD5_SIZE_VS_SPEED=2
-CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_MAX_LEN=512
-# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_VI is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_HISTORY=256
-# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_USERNAME_COMPLETION is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_COPYBUF_KB=4
-# CONFIG_BUSYBOX_CONFIG_MONOTONIC_SYSCALL is not set
-CONFIG_BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_HWIB is not set
-
-#
-# Applets
-#
-
-#
-# Archival Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_LZMA is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_BZ2=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z is not set
-# CONFIG_BUSYBOX_CONFIG_AR is not set
-CONFIG_BUSYBOX_CONFIG_BUNZIP2=y
-# CONFIG_BUSYBOX_CONFIG_BZIP2 is not set
-# CONFIG_BUSYBOX_CONFIG_CPIO is not set
-# CONFIG_BUSYBOX_CONFIG_DPKG is not set
-# CONFIG_BUSYBOX_CONFIG_DPKG_DEB is not set
-CONFIG_BUSYBOX_CONFIG_GUNZIP=y
-CONFIG_BUSYBOX_CONFIG_GZIP=y
-# CONFIG_BUSYBOX_CONFIG_LZOP is not set
-# CONFIG_BUSYBOX_CONFIG_RPM2CPIO is not set
-# CONFIG_BUSYBOX_CONFIG_RPM is not set
-CONFIG_BUSYBOX_CONFIG_TAR=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_CREATE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_AUTODETECT is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_FROM=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_UNAME_GNAME is not set
-# CONFIG_BUSYBOX_CONFIG_UNCOMPRESS is not set
-# CONFIG_BUSYBOX_CONFIG_UNLZMA is not set
-# CONFIG_BUSYBOX_CONFIG_UNZIP is not set
-
-#
-# Coreutils
-#
-CONFIG_BUSYBOX_CONFIG_BASENAME=y
-# CONFIG_BUSYBOX_CONFIG_CAL is not set
-CONFIG_BUSYBOX_CONFIG_CAT=y
-# CONFIG_BUSYBOX_CONFIG_CATV is not set
-CONFIG_BUSYBOX_CONFIG_CHGRP=y
-CONFIG_BUSYBOX_CONFIG_CHMOD=y
-CONFIG_BUSYBOX_CONFIG_CHOWN=y
-CONFIG_BUSYBOX_CONFIG_CHROOT=y
-# CONFIG_BUSYBOX_CONFIG_CKSUM is not set
-# CONFIG_BUSYBOX_CONFIG_COMM is not set
-CONFIG_BUSYBOX_CONFIG_CP=y
-CONFIG_BUSYBOX_CONFIG_CUT=y
-CONFIG_BUSYBOX_CONFIG_DATE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT=y
-CONFIG_BUSYBOX_CONFIG_DD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS=y
-CONFIG_BUSYBOX_CONFIG_DF=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DF_FANCY is not set
-CONFIG_BUSYBOX_CONFIG_DIRNAME=y
-# CONFIG_BUSYBOX_CONFIG_DOS2UNIX is not set
-CONFIG_BUSYBOX_CONFIG_DU=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
-CONFIG_BUSYBOX_CONFIG_ECHO=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_ECHO=y
-CONFIG_BUSYBOX_CONFIG_ENV=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
-# CONFIG_BUSYBOX_CONFIG_EXPAND is not set
-CONFIG_BUSYBOX_CONFIG_EXPR=y
-CONFIG_BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64=y
-CONFIG_BUSYBOX_CONFIG_FALSE=y
-# CONFIG_BUSYBOX_CONFIG_FOLD is not set
-# CONFIG_BUSYBOX_CONFIG_FSYNC is not set
-CONFIG_BUSYBOX_CONFIG_HEAD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_HEAD=y
-CONFIG_BUSYBOX_CONFIG_HOSTID=y
-CONFIG_BUSYBOX_CONFIG_ID=y
-# CONFIG_BUSYBOX_CONFIG_INSTALL is not set
-CONFIG_BUSYBOX_CONFIG_LENGTH=y
-CONFIG_BUSYBOX_CONFIG_LN=y
-# CONFIG_BUSYBOX_CONFIG_LOGNAME is not set
-CONFIG_BUSYBOX_CONFIG_LS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_FILETYPES=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_SORTFILES=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_USERNAME=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_COLOR=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
-CONFIG_BUSYBOX_CONFIG_MD5SUM=y
-CONFIG_BUSYBOX_CONFIG_MKDIR=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_MKFIFO=y
-CONFIG_BUSYBOX_CONFIG_MKNOD=y
-CONFIG_BUSYBOX_CONFIG_MV=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_NICE=y
-CONFIG_BUSYBOX_CONFIG_NOHUP=y
-# CONFIG_BUSYBOX_CONFIG_OD is not set
-# CONFIG_BUSYBOX_CONFIG_PRINTENV is not set
-CONFIG_BUSYBOX_CONFIG_PRINTF=y
-CONFIG_BUSYBOX_CONFIG_PWD=y
-CONFIG_BUSYBOX_CONFIG_READLINK=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW is not set
-CONFIG_BUSYBOX_CONFIG_REALPATH=y
-CONFIG_BUSYBOX_CONFIG_RM=y
-CONFIG_BUSYBOX_CONFIG_RMDIR=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_SEQ=y
-# CONFIG_BUSYBOX_CONFIG_SHA1SUM is not set
-# CONFIG_BUSYBOX_CONFIG_SHA256SUM is not set
-# CONFIG_BUSYBOX_CONFIG_SHA512SUM is not set
-CONFIG_BUSYBOX_CONFIG_SLEEP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP is not set
-CONFIG_BUSYBOX_CONFIG_SORT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SORT_BIG is not set
-# CONFIG_BUSYBOX_CONFIG_SPLIT is not set
-CONFIG_BUSYBOX_CONFIG_STAT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_STAT_FORMAT is not set
-# CONFIG_BUSYBOX_CONFIG_STTY is not set
-# CONFIG_BUSYBOX_CONFIG_SUM is not set
-CONFIG_BUSYBOX_CONFIG_SYNC=y
-# CONFIG_BUSYBOX_CONFIG_TAC is not set
-CONFIG_BUSYBOX_CONFIG_TAIL=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_TAIL=y
-CONFIG_BUSYBOX_CONFIG_TEE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
-CONFIG_BUSYBOX_CONFIG_TEST=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TEST_64=y
-CONFIG_BUSYBOX_CONFIG_TOUCH=y
-CONFIG_BUSYBOX_CONFIG_TR=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TR_EQUIV is not set
-CONFIG_BUSYBOX_CONFIG_TRUE=y
-# CONFIG_BUSYBOX_CONFIG_TTY is not set
-CONFIG_BUSYBOX_CONFIG_UNAME=y
-# CONFIG_BUSYBOX_CONFIG_UNEXPAND is not set
-CONFIG_BUSYBOX_CONFIG_UNIQ=y
-# CONFIG_BUSYBOX_CONFIG_USLEEP is not set
-# CONFIG_BUSYBOX_CONFIG_UUDECODE is not set
-# CONFIG_BUSYBOX_CONFIG_UUENCODE is not set
-CONFIG_BUSYBOX_CONFIG_WC=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_WC_LARGE is not set
-# CONFIG_BUSYBOX_CONFIG_WHO is not set
-# CONFIG_BUSYBOX_CONFIG_WHOAMI is not set
-CONFIG_BUSYBOX_CONFIG_YES=y
-
-#
-# Common options for cp and mv
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS=y
-
-#
-# Common options for ls, more and telnet
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_AUTOWIDTH=y
-
-#
-# Common options for df, du, ls
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE=y
-
-#
-# Common options for md5sum, sha1sum
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-
-#
-# Console Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_CHVT is not set
-CONFIG_BUSYBOX_CONFIG_CLEAR=y
-# CONFIG_BUSYBOX_CONFIG_DEALLOCVT is not set
-# CONFIG_BUSYBOX_CONFIG_DUMPKMAP is not set
-# CONFIG_BUSYBOX_CONFIG_KBD_MODE is not set
-# CONFIG_BUSYBOX_CONFIG_LOADFONT is not set
-# CONFIG_BUSYBOX_CONFIG_LOADKMAP is not set
-# CONFIG_BUSYBOX_CONFIG_OPENVT is not set
-CONFIG_BUSYBOX_CONFIG_RESET=y
-# CONFIG_BUSYBOX_CONFIG_RESIZE is not set
-# CONFIG_BUSYBOX_CONFIG_SETCONSOLE is not set
-# CONFIG_BUSYBOX_CONFIG_SETFONT is not set
-# CONFIG_BUSYBOX_CONFIG_SETKEYCODES is not set
-# CONFIG_BUSYBOX_CONFIG_SETLOGCONS is not set
-# CONFIG_BUSYBOX_CONFIG_SHOWKEY is not set
-
-#
-# Debian Utilities
-#
-CONFIG_BUSYBOX_CONFIG_MKTEMP=y
-# CONFIG_BUSYBOX_CONFIG_PIPE_PROGRESS is not set
-# CONFIG_BUSYBOX_CONFIG_RUN_PARTS is not set
-CONFIG_BUSYBOX_CONFIG_START_STOP_DAEMON=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_WHICH=y
-
-#
-# Editors
-#
-CONFIG_BUSYBOX_CONFIG_AWK=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_AWK_LIBM=y
-# CONFIG_BUSYBOX_CONFIG_CMP is not set
-CONFIG_BUSYBOX_CONFIG_DIFF=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DIFF_BINARY is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DIFF_DIR is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DIFF_MINIMAL is not set
-# CONFIG_BUSYBOX_CONFIG_ED is not set
-# CONFIG_BUSYBOX_CONFIG_PATCH is not set
-CONFIG_BUSYBOX_CONFIG_SED=y
-CONFIG_BUSYBOX_CONFIG_VI=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN=1024
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_8BIT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_COLON=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_YANKMARK=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SEARCH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_READONLY=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SETOPTS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SET=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_WIN_RESIZE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_ALLOW_EXEC=y
-
-#
-# Finding Utilities
-#
-CONFIG_BUSYBOX_CONFIG_FIND=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PRINT0=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MTIME=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MMIN is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PERM=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_TYPE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_XDEV=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MAXDEPTH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NEWER=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_INUM is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_EXEC=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_USER=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_GROUP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NOT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_DEPTH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PAREN=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_SIZE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PRUNE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_DELETE is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PATH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_REGEX=y
-CONFIG_BUSYBOX_CONFIG_GREP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT=y
-CONFIG_BUSYBOX_CONFIG_XARGS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
-
-#
-# Init Utilities
-#
-CONFIG_BUSYBOX_CONFIG_INIT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_USE_INITTAB=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_KILL_REMOVED is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_INIT_SCTTY is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_INIT_SYSLOG=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_INITRD is not set
-CONFIG_BUSYBOX_CONFIG_HALT=y
-CONFIG_BUSYBOX_CONFIG_MESG=y
-
-#
-# Login/Password Management Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS is not set
-# CONFIG_BUSYBOX_CONFIG_USE_BB_PWD_GRP is not set
-# CONFIG_BUSYBOX_CONFIG_USE_BB_CRYPT is not set
-# CONFIG_BUSYBOX_CONFIG_ADDGROUP is not set
-# CONFIG_BUSYBOX_CONFIG_DELGROUP is not set
-# CONFIG_BUSYBOX_CONFIG_ADDUSER is not set
-# CONFIG_BUSYBOX_CONFIG_DELUSER is not set
-# CONFIG_BUSYBOX_CONFIG_GETTY is not set
-# CONFIG_BUSYBOX_CONFIG_LOGIN is not set
-CONFIG_BUSYBOX_CONFIG_PASSWD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
-# CONFIG_BUSYBOX_CONFIG_CRYPTPW is not set
-# CONFIG_BUSYBOX_CONFIG_CHPASSWD is not set
-# CONFIG_BUSYBOX_CONFIG_SU is not set
-# CONFIG_BUSYBOX_CONFIG_SULOGIN is not set
-# CONFIG_BUSYBOX_CONFIG_VLOCK is not set
-
-#
-# Linux Ext2 FS Progs
-#
-# CONFIG_BUSYBOX_CONFIG_CHATTR is not set
-# CONFIG_BUSYBOX_CONFIG_FSCK is not set
-# CONFIG_BUSYBOX_CONFIG_LSATTR is not set
-
-#
-# Linux Module Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_MODPROBE_SMALL is not set
-CONFIG_BUSYBOX_CONFIG_INSMOD=y
-CONFIG_BUSYBOX_CONFIG_RMMOD=y
-CONFIG_BUSYBOX_CONFIG_LSMOD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
-# CONFIG_BUSYBOX_CONFIG_MODPROBE is not set
-# CONFIG_BUSYBOX_CONFIG_DEPMOD is not set
-
-#
-# Options common to multiple modutils
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
-CONFIG_BUSYBOX_CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
-
-#
-# Linux System Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_ACPID is not set
-CONFIG_BUSYBOX_CONFIG_BLKID=y
-CONFIG_BUSYBOX_CONFIG_DMESG=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY=y
-# CONFIG_BUSYBOX_CONFIG_FBSET is not set
-# CONFIG_BUSYBOX_CONFIG_FDFLUSH is not set
-# CONFIG_BUSYBOX_CONFIG_FDFORMAT is not set
-# CONFIG_BUSYBOX_CONFIG_FDISK is not set
-CONFIG_BUSYBOX_CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
-# CONFIG_BUSYBOX_CONFIG_FINDFS is not set
-# CONFIG_BUSYBOX_CONFIG_FREERAMDISK is not set
-# CONFIG_BUSYBOX_CONFIG_FSCK_MINIX is not set
-# CONFIG_BUSYBOX_CONFIG_MKFS_MINIX is not set
-# CONFIG_BUSYBOX_CONFIG_MKFS_VFAT is not set
-# CONFIG_BUSYBOX_CONFIG_GETOPT is not set
-CONFIG_BUSYBOX_CONFIG_HEXDUMP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE is not set
-# CONFIG_BUSYBOX_CONFIG_HD is not set
-CONFIG_BUSYBOX_CONFIG_HWCLOCK=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
-# CONFIG_BUSYBOX_CONFIG_IPCRM is not set
-# CONFIG_BUSYBOX_CONFIG_IPCS is not set
-# CONFIG_BUSYBOX_CONFIG_LOSETUP is not set
-# CONFIG_BUSYBOX_CONFIG_MDEV is not set
-CONFIG_BUSYBOX_CONFIG_MKSWAP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID=y
-# CONFIG_BUSYBOX_CONFIG_MORE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_USE_TERMIOS is not set
-CONFIG_BUSYBOX_CONFIG_VOLUMEID=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_REISERFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_FAT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_HFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_JFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_XFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_NTFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_ISO9660=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_LUKS is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_CRAMFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_ROMFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_OCFS2=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set
-CONFIG_BUSYBOX_CONFIG_MOUNT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_NFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB=y
-CONFIG_BUSYBOX_CONFIG_PIVOT_ROOT=y
-CONFIG_BUSYBOX_CONFIG_RDATE=y
-# CONFIG_BUSYBOX_CONFIG_RDEV is not set
-# CONFIG_BUSYBOX_CONFIG_READPROFILE is not set
-# CONFIG_BUSYBOX_CONFIG_RTCWAKE is not set
-# CONFIG_BUSYBOX_CONFIG_SCRIPT is not set
-# CONFIG_BUSYBOX_CONFIG_SCRIPTREPLAY is not set
-# CONFIG_BUSYBOX_CONFIG_SETARCH is not set
-CONFIG_BUSYBOX_CONFIG_SWAPONOFF=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SWAPON_PRI is not set
-CONFIG_BUSYBOX_CONFIG_SWITCH_ROOT=y
-CONFIG_BUSYBOX_CONFIG_UMOUNT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL=y
-
-#
-# Common options for mount/umount
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT is not set
-
-#
-# Miscellaneous Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_ADJTIMEX is not set
-# CONFIG_BUSYBOX_CONFIG_BBCONFIG is not set
-# CONFIG_BUSYBOX_CONFIG_BEEP is not set
-# CONFIG_BUSYBOX_CONFIG_CHAT is not set
-# CONFIG_BUSYBOX_CONFIG_CHRT is not set
-CONFIG_BUSYBOX_CONFIG_CROND=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_D is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
-CONFIG_BUSYBOX_CONFIG_CRONTAB=y
-# CONFIG_BUSYBOX_CONFIG_DC is not set
-# CONFIG_BUSYBOX_CONFIG_DEVFSD is not set
-# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
-# CONFIG_BUSYBOX_CONFIG_EJECT is not set
-# CONFIG_BUSYBOX_CONFIG_FBSPLASH is not set
-# CONFIG_BUSYBOX_CONFIG_FLASH_LOCK is not set
-# CONFIG_BUSYBOX_CONFIG_FLASH_UNLOCK is not set
-# CONFIG_BUSYBOX_CONFIG_FLASH_ERASEALL is not set
-# CONFIG_BUSYBOX_CONFIG_IONICE is not set
-CONFIG_BUSYBOX_CONFIG_INOTIFYD=y
-# CONFIG_BUSYBOX_CONFIG_LAST is not set
-CONFIG_BUSYBOX_CONFIG_LESS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES=9999999
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_FLAGS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_MARKS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_REGEXP is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_WINCH is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD is not set
-# CONFIG_BUSYBOX_CONFIG_HDPARM is not set
-CONFIG_BUSYBOX_CONFIG_LOCK=y
-# CONFIG_BUSYBOX_CONFIG_MAKEDEVS is not set
-# CONFIG_BUSYBOX_CONFIG_MAN is not set
-# CONFIG_BUSYBOX_CONFIG_MICROCOM is not set
-# CONFIG_BUSYBOX_CONFIG_MOUNTPOINT is not set
-# CONFIG_BUSYBOX_CONFIG_MT is not set
-# CONFIG_BUSYBOX_CONFIG_RAIDAUTORUN is not set
-# CONFIG_BUSYBOX_CONFIG_READAHEAD is not set
-# CONFIG_BUSYBOX_CONFIG_RUNLEVEL is not set
-# CONFIG_BUSYBOX_CONFIG_RX is not set
-# CONFIG_BUSYBOX_CONFIG_SETSID is not set
-CONFIG_BUSYBOX_CONFIG_STRINGS=y
-# CONFIG_BUSYBOX_CONFIG_TASKSET is not set
-CONFIG_BUSYBOX_CONFIG_TIME=y
-# CONFIG_BUSYBOX_CONFIG_TIMEOUT is not set
-# CONFIG_BUSYBOX_CONFIG_TTYSIZE is not set
-# CONFIG_BUSYBOX_CONFIG_VOLNAME is not set
-CONFIG_BUSYBOX_CONFIG_WATCHDOG=y
-
-#
-# Networking Utilities
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_IPV6=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_UNIX_LOCAL=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
-CONFIG_BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS=y
-# CONFIG_BUSYBOX_CONFIG_ARP is not set
-CONFIG_BUSYBOX_CONFIG_ARPING=y
-CONFIG_BUSYBOX_CONFIG_BRCTL=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW=y
-# CONFIG_BUSYBOX_CONFIG_DNSD is not set
-# CONFIG_BUSYBOX_CONFIG_ETHER_WAKE is not set
-# CONFIG_BUSYBOX_CONFIG_FAKEIDENTD is not set
-# CONFIG_BUSYBOX_CONFIG_FTPD is not set
-# CONFIG_BUSYBOX_CONFIG_FTPGET is not set
-# CONFIG_BUSYBOX_CONFIG_FTPPUT is not set
-# CONFIG_BUSYBOX_CONFIG_HOSTNAME is not set
-CONFIG_BUSYBOX_CONFIG_HTTPD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CGI=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY=y
-CONFIG_BUSYBOX_CONFIG_IFCONFIG=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
-# CONFIG_BUSYBOX_CONFIG_IFENSLAVE is not set
-# CONFIG_BUSYBOX_CONFIG_IFPLUGD is not set
-# CONFIG_BUSYBOX_CONFIG_IFUPDOWN is not set
-# CONFIG_BUSYBOX_CONFIG_INETD is not set
-# CONFIG_BUSYBOX_CONFIG_IP is not set
-# CONFIG_BUSYBOX_CONFIG_IPCALC is not set
-# CONFIG_BUSYBOX_CONFIG_NAMEIF is not set
-CONFIG_BUSYBOX_CONFIG_NC=y
-CONFIG_BUSYBOX_CONFIG_NETMSG=y
-CONFIG_BUSYBOX_CONFIG_NC_SERVER=y
-# CONFIG_BUSYBOX_CONFIG_NC_EXTRA is not set
-CONFIG_BUSYBOX_CONFIG_NETSTAT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG=y
-CONFIG_BUSYBOX_CONFIG_NSLOOKUP=y
-CONFIG_BUSYBOX_CONFIG_PING=y
-CONFIG_BUSYBOX_CONFIG_PING6=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_PING=y
-# CONFIG_BUSYBOX_CONFIG_PSCAN is not set
-CONFIG_BUSYBOX_CONFIG_ROUTE=y
-# CONFIG_BUSYBOX_CONFIG_SLATTACH is not set
-CONFIG_BUSYBOX_CONFIG_TELNET=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
-CONFIG_BUSYBOX_CONFIG_TELNETD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE=y
-# CONFIG_BUSYBOX_CONFIG_TFTP is not set
-# CONFIG_BUSYBOX_CONFIG_TFTPD is not set
-CONFIG_BUSYBOX_CONFIG_TRACEROUTE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
-# CONFIG_BUSYBOX_CONFIG_APP_UDHCPD is not set
-CONFIG_BUSYBOX_CONFIG_APP_UDHCPC=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCPC_ARPING is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_PORT is not set
-CONFIG_BUSYBOX_CONFIG_UDHCP_DEBUG=0
-CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_RFC3397=y
-CONFIG_BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
-CONFIG_BUSYBOX_CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-CONFIG_BUSYBOX_CONFIG_VCONFIG=y
-CONFIG_BUSYBOX_CONFIG_WGET=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-# CONFIG_BUSYBOX_CONFIG_ZCIP is not set
-# CONFIG_BUSYBOX_CONFIG_TCPSVD is not set
-# CONFIG_BUSYBOX_CONFIG_TUNCTL is not set
-# CONFIG_BUSYBOX_CONFIG_UDPSVD is not set
-
-#
-# Print Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_LPD is not set
-# CONFIG_BUSYBOX_CONFIG_LPR is not set
-# CONFIG_BUSYBOX_CONFIG_LPQ is not set
-
-#
-# Mail Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_MAKEMIME is not set
-# CONFIG_BUSYBOX_CONFIG_POPMAILDIR is not set
-# CONFIG_BUSYBOX_CONFIG_REFORMIME is not set
-# CONFIG_BUSYBOX_CONFIG_SENDMAIL is not set
-
-#
-# Process Utilities
-#
-CONFIG_BUSYBOX_CONFIG_FREE=y
-# CONFIG_BUSYBOX_CONFIG_FUSER is not set
-CONFIG_BUSYBOX_CONFIG_KILL=y
-CONFIG_BUSYBOX_CONFIG_KILLALL=y
-CONFIG_BUSYBOX_CONFIG_KILLALL5=y
-# CONFIG_BUSYBOX_CONFIG_NMETER is not set
-CONFIG_BUSYBOX_CONFIG_PGREP=y
-CONFIG_BUSYBOX_CONFIG_PIDOF=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT=y
-CONFIG_BUSYBOX_CONFIG_PKILL=y
-CONFIG_BUSYBOX_CONFIG_PS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_PS_WIDE is not set
-# CONFIG_BUSYBOX_CONFIG_RENICE is not set
-CONFIG_BUSYBOX_CONFIG_BB_SYSCTL=y
-CONFIG_BUSYBOX_CONFIG_TOP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOPMEM is not set
-CONFIG_BUSYBOX_CONFIG_UPTIME=y
-CONFIG_BUSYBOX_CONFIG_WATCH=y
-
-#
-# Runit Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_RUNSV is not set
-# CONFIG_BUSYBOX_CONFIG_RUNSVDIR is not set
-# CONFIG_BUSYBOX_CONFIG_SV is not set
-# CONFIG_BUSYBOX_CONFIG_SVLOGD is not set
-# CONFIG_BUSYBOX_CONFIG_CHPST is not set
-# CONFIG_BUSYBOX_CONFIG_SETUIDGID is not set
-# CONFIG_BUSYBOX_CONFIG_ENVUIDGID is not set
-# CONFIG_BUSYBOX_CONFIG_ENVDIR is not set
-# CONFIG_BUSYBOX_CONFIG_SOFTLIMIT is not set
-
-#
-# Shells
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_SH_IS_ASH=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_IS_NONE is not set
-CONFIG_BUSYBOX_CONFIG_ASH=y
-CONFIG_BUSYBOX_CONFIG_ASH_BASH_COMPAT=y
-CONFIG_BUSYBOX_CONFIG_ASH_JOB_CONTROL=y
-# CONFIG_BUSYBOX_CONFIG_ASH_READ_NCHARS is not set
-CONFIG_BUSYBOX_CONFIG_ASH_READ_TIMEOUT=y
-CONFIG_BUSYBOX_CONFIG_ASH_ALIAS=y
-CONFIG_BUSYBOX_CONFIG_ASH_GETOPTS=y
-CONFIG_BUSYBOX_CONFIG_ASH_BUILTIN_ECHO=y
-CONFIG_BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF=y
-CONFIG_BUSYBOX_CONFIG_ASH_BUILTIN_TEST=y
-CONFIG_BUSYBOX_CONFIG_ASH_CMDCMD=y
-# CONFIG_BUSYBOX_CONFIG_ASH_MAIL is not set
-# CONFIG_BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT is not set
-CONFIG_BUSYBOX_CONFIG_ASH_EXPAND_PRMT=y
-# CONFIG_BUSYBOX_CONFIG_LASH is not set
-# CONFIG_BUSYBOX_CONFIG_MSH is not set
-CONFIG_BUSYBOX_CONFIG_SH_MATH_SUPPORT=y
-CONFIG_BUSYBOX_CONFIG_SH_MATH_SUPPORT_64=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_STANDALONE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_NOFORK is not set
-# CONFIG_BUSYBOX_CONFIG_CTTYHACK is not set
-
-#
-# System Logging Utilities
-#
-CONFIG_BUSYBOX_CONFIG_SYSLOGD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_ROTATE_LOGFILE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_REMOTE_LOG=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_DUP is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
-CONFIG_BUSYBOX_CONFIG_LOGREAD=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
-CONFIG_BUSYBOX_CONFIG_KLOGD=y
-CONFIG_BUSYBOX_CONFIG_LOGGER=y
-# CONFIG_PACKAGE_dash is not set
-# CONFIG_PACKAGE_dnsmasq is not set
-CONFIG_PACKAGE_dropbear=y
-# CONFIG_PACKAGE_ead is not set
-CONFIG_PACKAGE_firewall=y
-CONFIG_PACKAGE_hotplug2=y
-CONFIG_PACKAGE_libc=y
-CONFIG_PACKAGE_libgcc=y
-CONFIG_PACKAGE_libpthread=y
-CONFIG_PACKAGE_librt=y
-# CONFIG_PACKAGE_libstdcpp is not set
-# CONFIG_PACKAGE_mksh is not set
-CONFIG_PACKAGE_mtd=m
-CONFIG_PACKAGE_opkg=y
-# CONFIG_PACKAGE_qos-scripts is not set
-# CONFIG_PACKAGE_swconfig is not set
-CONFIG_PACKAGE_uci=y
-CONFIG_PACKAGE_ucitrigger=y
-# CONFIG_PACKAGE_udev is not set
-CONFIG_PACKAGE_udevtrigger=y
-# CONFIG_PACKAGE_wireless-tools is not set
-
-#
-# Network
-#
-
-#
-# BitTorrent
-#
-# CONFIG_PACKAGE_btpd is not set
-# CONFIG_PACKAGE_cbtt is not set
-# CONFIG_PACKAGE_cbtt-mysql is not set
-# CONFIG_PACKAGE_ctorrent is not set
-# CONFIG_PACKAGE_ctorrent-openssl is not set
-# CONFIG_PACKAGE_rtorrent is not set
-# CONFIG_PACKAGE_transmission-daemon is not set
-
-#
-# Captive Portals
-#
-# CONFIG_PACKAGE_chillispot is not set
-# CONFIG_PACKAGE_coova-chilli is not set
-# CONFIG_PACKAGE_nocatauth is not set
-# CONFIG_PACKAGE_nocatsplash is not set
-# CONFIG_PACKAGE_nodogsplash is not set
-# CONFIG_PACKAGE_pepperspot is not set
-# CONFIG_PACKAGE_wifidog is not set
-
-#
-# DNS
-#
-# CONFIG_PACKAGE_bind-check is not set
-# CONFIG_PACKAGE_bind-client is not set
-# CONFIG_PACKAGE_bind-dig is not set
-# CONFIG_PACKAGE_bind-dnssec is not set
-# CONFIG_PACKAGE_bind-host is not set
-# CONFIG_PACKAGE_bind-libs is not set
-# CONFIG_PACKAGE_bind-rndc is not set
-# CONFIG_PACKAGE_bind-server is not set
-# CONFIG_PACKAGE_bind-tools is not set
-# CONFIG_PACKAGE_djbdns-axfrdns is not set
-# CONFIG_PACKAGE_djbdns-base is not set
-# CONFIG_PACKAGE_djbdns-dnscache is not set
-# CONFIG_PACKAGE_djbdns-rbldns is not set
-# CONFIG_PACKAGE_djbdns-tinydns is not set
-# CONFIG_PACKAGE_djbdns-tools is not set
-# CONFIG_PACKAGE_djbdns-walldns is not set
-# CONFIG_PACKAGE_maradns is not set
-
-#
-# FTP
-#
-# CONFIG_PACKAGE_atftp is not set
-# CONFIG_PACKAGE_atftpd is not set
-# CONFIG_PACKAGE_cmdftp is not set
-# CONFIG_PACKAGE_lftp is not set
-# CONFIG_PACKAGE_proftpd is not set
-# CONFIG_PACKAGE_pure-ftpd is not set
-# CONFIG_PACKAGE_vsftpd is not set
-# CONFIG_PACKAGE_wput is not set
-# CONFIG_PACKAGE_yafc is not set
-
-#
-# Filesystem
-#
-# CONFIG_PACKAGE_nfs-kernel-server is not set
-# CONFIG_PACKAGE_nfs-server is not set
-# CONFIG_PACKAGE_owftpd is not set
-# CONFIG_PACKAGE_owhttpd is not set
-# CONFIG_PACKAGE_owserver is not set
-# CONFIG_PACKAGE_unfs3 is not set
-
-#
-# HA
-#
-# CONFIG_PACKAGE_keepalived is not set
-
-#
-# Instant Messaging
-#
-# CONFIG_PACKAGE_bitchx is not set
-# CONFIG_PACKAGE_bitlbee is not set
-# CONFIG_PACKAGE_dircproxy is not set
-# CONFIG_PACKAGE_imspector is not set
-# CONFIG_PACKAGE_irssi is not set
-# CONFIG_PACKAGE_irssi-glib1 is not set
-# CONFIG_PACKAGE_irssi-openssl is not set
-# CONFIG_PACKAGE_miau is not set
-# CONFIG_PACKAGE_psybnc is not set
-# CONFIG_PACKAGE_reaim is not set
-# CONFIG_PACKAGE_tmsnc is not set
-# CONFIG_PACKAGE_weechat is not set
-# CONFIG_PACKAGE_znc is not set
-
-#
-# Monitoring
-#
-# CONFIG_PACKAGE_nagios is not set
-# CONFIG_PACKAGE_nagios-plugins is not set
-
-#
-# NNTP
-#
-# CONFIG_PACKAGE_leafnode is not set
-
-#
-# P2P
-#
-# CONFIG_PACKAGE_amule is not set
-# CONFIG_PACKAGE_mutella is not set
-# CONFIG_PACKAGE_opendchub is not set
-# CONFIG_PACKAGE_uhub is not set
-
-#
-# Proxy Servers
-#
-# CONFIG_PACKAGE_haproxy is not set
-# CONFIG_PACKAGE_polipo is not set
-# CONFIG_PACKAGE_rinetd is not set
-# CONFIG_PACKAGE_tinyproxy is not set
-
-#
-# SSH
-#
-# CONFIG_PACKAGE_autossh is not set
-CONFIG_PACKAGE_openssh-client=m
-CONFIG_PACKAGE_openssh-client-utils=m
-# CONFIG_PACKAGE_openssh-server is not set
-CONFIG_PACKAGE_openssh-sftp-client=m
-CONFIG_PACKAGE_openssh-sftp-server=m
-
-#
-# Time Synchronization
-#
-# CONFIG_PACKAGE_chrony is not set
-# CONFIG_PACKAGE_htpdate is not set
-# CONFIG_PACKAGE_ntp-utils is not set
-CONFIG_PACKAGE_ntpclient=m
-# CONFIG_PACKAGE_ntpd is not set
-# CONFIG_PACKAGE_ntpdate is not set
-# CONFIG_PACKAGE_openntpd is not set
-
-#
-# VPN
-#
-# CONFIG_PACKAGE_frickin is not set
-# CONFIG_PACKAGE_l2tpd is not set
-# CONFIG_PACKAGE_l2tpns is not set
-# CONFIG_PACKAGE_matrixtunnel is not set
-# CONFIG_PACKAGE_n2n is not set
-# CONFIG_PACKAGE_openvpn is not set
-# CONFIG_PACKAGE_pptpd is not set
-# CONFIG_PACKAGE_ssltunnel is not set
-# CONFIG_PACKAGE_tinc is not set
-CONFIG_PACKAGE_uanytun=m
-# CONFIG_PACKAGE_uanytun-nocrypt is not set
-# CONFIG_PACKAGE_uanytun-sslcrypt is not set
-# CONFIG_PACKAGE_vpnc is not set
-# CONFIG_PACKAGE_vtun is not set
-# CONFIG_PACKAGE_xl2tpd is not set
-
-#
-# Version Control Systems
-#
-# CONFIG_PACKAGE_git is not set
-# CONFIG_PACKAGE_subversion-libs is not set
-
-#
-# Web
-#
-# CONFIG_PACKAGE_apache is not set
-# CONFIG_PACKAGE_axhttpd is not set
-# CONFIG_PACKAGE_elinks is not set
-# CONFIG_PACKAGE_hiawatha is not set
-# CONFIG_PACKAGE_lighttpd is not set
-# CONFIG_PACKAGE_mini-httpd is not set
-# CONFIG_PACKAGE_mini-httpd-htpasswd is not set
-# CONFIG_PACKAGE_mini-httpd-matrixssl is not set
-# CONFIG_PACKAGE_mini-httpd-openssl is not set
-# CONFIG_PACKAGE_spawn-fcgi is not set
-
-#
-# asterisk14 (Complete Open Source PBX), v1.4.x
-#
-# CONFIG_PACKAGE_asterisk14 is not set
-# CONFIG_PACKAGE_asterisk14-app-meetme is not set
-# CONFIG_PACKAGE_asterisk14-chan-alsa is not set
-# CONFIG_PACKAGE_asterisk14-chan-gtalk is not set
-# CONFIG_PACKAGE_asterisk14-chan-h323 is not set
-# CONFIG_PACKAGE_asterisk14-chan-mgcp is not set
-# CONFIG_PACKAGE_asterisk14-chan-mobile is not set
-# CONFIG_PACKAGE_asterisk14-chan-ooh323 is not set
-# CONFIG_PACKAGE_asterisk14-chan-oss is not set
-# CONFIG_PACKAGE_asterisk14-chan-skinny is not set
-# CONFIG_PACKAGE_asterisk14-codec-lpc10 is not set
-# CONFIG_PACKAGE_asterisk14-codec-speex is not set
-# CONFIG_PACKAGE_asterisk14-format-mp3 is not set
-# CONFIG_PACKAGE_asterisk14-mini is not set
-# CONFIG_PACKAGE_asterisk14-mysql is not set
-# CONFIG_PACKAGE_asterisk14-pbx-dundi is not set
-# CONFIG_PACKAGE_asterisk14-pgsql is not set
-# CONFIG_PACKAGE_asterisk14-rawplayer is not set
-# CONFIG_PACKAGE_asterisk14-res-agi is not set
-# CONFIG_PACKAGE_asterisk14-res-crypto is not set
-# CONFIG_PACKAGE_asterisk14-sounds is not set
-# CONFIG_PACKAGE_asterisk14-sqlite is not set
-# CONFIG_PACKAGE_asterisk14-voicemail is not set
-
-#
-# asterisk16 (Complete Open Source PBX), v1.6.x
-#
-# CONFIG_PACKAGE_asterisk16 is not set
-# CONFIG_PACKAGE_asterisk16-app-system is not set
-# CONFIG_PACKAGE_asterisk16-cdr is not set
-# CONFIG_PACKAGE_asterisk16-chan-gtalk is not set
-# CONFIG_PACKAGE_asterisk16-chan-iax2 is not set
-# CONFIG_PACKAGE_asterisk16-chan-local is not set
-# CONFIG_PACKAGE_asterisk16-format-g729 is not set
-# CONFIG_PACKAGE_asterisk16-res-musiconhold is not set
-# CONFIG_PACKAGE_asterisk16-sounds is not set
-# CONFIG_PACKAGE_asterisk16-voicemail is not set
-
-#
-# dial-in/up
-#
-# CONFIG_PACKAGE_rp-l2tpd is not set
-# CONFIG_PACKAGE_rp-pppoe-client is not set
-# CONFIG_PACKAGE_rp-pppoe-relay is not set
-# CONFIG_PACKAGE_rp-pppoe-server is not set
-# CONFIG_PACKAGE_rp-pppoe-sniff is not set
-
-#
-# firewall
-#
-# CONFIG_PACKAGE_amwall is not set
-# CONFIG_PACKAGE_ipkungfu is not set
-# CONFIG_PACKAGE_iptables-snmp is not set
-# CONFIG_PACKAGE_shorewall-lite is not set
-
-#
-# firmware
-#
-# CONFIG_PACKAGE_speedtouch-usb-firmware is not set
-
-#
-# layer7
-#
-
-#
-# multimedia
-#
-# CONFIG_PACKAGE_gmediaserver is not set
-# CONFIG_PACKAGE_icecast is not set
-
-#
-# pmacct (accounting and aggregation tools)
-#
-# CONFIG_PACKAGE_nfacctd is not set
-# CONFIG_PACKAGE_nfacctd-mysql is not set
-# CONFIG_PACKAGE_nfacctd-pgsql is not set
-# CONFIG_PACKAGE_nfacctd-sqlite is not set
-# CONFIG_PACKAGE_pmacct-client is not set
-# CONFIG_PACKAGE_pmacctd is not set
-# CONFIG_PACKAGE_pmacctd-mysql is not set
-# CONFIG_PACKAGE_pmacctd-pgsql is not set
-# CONFIG_PACKAGE_pmacctd-sqlite is not set
-
-#
-# printing
-#
-# CONFIG_PACKAGE_cups is not set
-CONFIG_PACKAGE_p910nd=m
-
-#
-# samba - NetBIOS/SMB implementation
-#
-# CONFIG_PACKAGE_samba-common is not set
-
-#
-# snort (Ligthweight Network Intrusion Detection System)
-#
-# CONFIG_PACKAGE_snort is not set
-# CONFIG_PACKAGE_snort-mysql is not set
-# CONFIG_PACKAGE_snort-pgsql is not set
-
-#
-# snort-wireless (Ligthweight Network Intrusion Detection System)
-#
-# CONFIG_PACKAGE_snort-wireless is not set
-# CONFIG_PACKAGE_snort-wireless-mysql is not set
-# CONFIG_PACKAGE_snort-wireless-pgsql is not set
-
-#
-# wireless
-#
-# CONFIG_PACKAGE_aircrack-ng is not set
-# CONFIG_PACKAGE_aircrack-ptw is not set
-# CONFIG_PACKAGE_kismet-client is not set
-# CONFIG_PACKAGE_kismet-drone is not set
-# CONFIG_PACKAGE_kismet-server is not set
-# CONFIG_PACKAGE_mdk3 is not set
-# CONFIG_PACKAGE_wavemon is not set
-# CONFIG_PACKAGE_airpwn is not set
-# CONFIG_PACKAGE_aodv-uu is not set
-# CONFIG_PACKAGE_aoetools is not set
-# CONFIG_PACKAGE_appweb is not set
-# CONFIG_PACKAGE_aprx is not set
-# CONFIG_PACKAGE_arpd is not set
-# CONFIG_PACKAGE_arptables is not set
-CONFIG_PACKAGE_arpwatch=m
-# CONFIG_PACKAGE_avahi-autoipd is not set
-CONFIG_PACKAGE_avahi-daemon=m
-# CONFIG_PACKAGE_avahi-dnsconfd is not set
-# CONFIG_PACKAGE_babeld is not set
-# CONFIG_PACKAGE_bahamut is not set
-# CONFIG_PACKAGE_batmand is not set
-# CONFIG_PACKAGE_bing is not set
-# CONFIG_PACKAGE_bmon is not set
-# CONFIG_PACKAGE_bmxd is not set
-# CONFIG_PACKAGE_bwm is not set
-# CONFIG_PACKAGE_cdp-tools is not set
-# CONFIG_PACKAGE_click is not set
-# CONFIG_PACKAGE_conntrack-tools is not set
-# CONFIG_PACKAGE_crda is not set
-# CONFIG_PACKAGE_crowdcontrol is not set
-# CONFIG_PACKAGE_curl is not set
-# CONFIG_PACKAGE_cutter is not set
-# CONFIG_PACKAGE_dansguardian is not set
-# CONFIG_PACKAGE_darkstat is not set
-# CONFIG_PACKAGE_ddns-scripts is not set
-# CONFIG_PACKAGE_dhcp-forwarder is not set
-# CONFIG_PACKAGE_dhcp-relay is not set
-# CONFIG_PACKAGE_dhcp-server is not set
-# CONFIG_PACKAGE_dhcpcd is not set
-# CONFIG_PACKAGE_dmapd is not set
-# CONFIG_PACKAGE_dsl-qos-queue is not set
-# CONFIG_PACKAGE_dsniff is not set
-# CONFIG_PACKAGE_ebtables is not set
-# CONFIG_PACKAGE_ebtables-utils is not set
-# CONFIG_PACKAGE_ekg is not set
-CONFIG_PACKAGE_etherwake=m
-CONFIG_PACKAGE_ethtool=m
-# CONFIG_PACKAGE_ettercap is not set
-# CONFIG_PACKAGE_ez-ipupdate is not set
-# CONFIG_PACKAGE_faifa is not set
-# CONFIG_PACKAGE_flow-tools is not set
-# CONFIG_PACKAGE_fping is not set
-# CONFIG_PACKAGE_fprobe is not set
-# CONFIG_PACKAGE_fprobe-ulog is not set
-# CONFIG_PACKAGE_freeradius is not set
-# CONFIG_PACKAGE_freeradius2 is not set
-# CONFIG_PACKAGE_freeswitch is not set
-# CONFIG_PACKAGE_genl is not set
-# CONFIG_PACKAGE_gpsd is not set
-# CONFIG_PACKAGE_horst is not set
-# CONFIG_PACKAGE_hostapd is not set
-# CONFIG_PACKAGE_hostapd-mini is not set
-# CONFIG_PACKAGE_howl-autoipd is not set
-# CONFIG_PACKAGE_howl-mdnsresponder is not set
-# CONFIG_PACKAGE_howl-nifd is not set
-# CONFIG_PACKAGE_howl-utils is not set
-# CONFIG_PACKAGE_hping3 is not set
-# CONFIG_PACKAGE_httping is not set
-# CONFIG_PACKAGE_httptunnel is not set
-# CONFIG_PACKAGE_icmptx is not set
-# CONFIG_PACKAGE_ifenslave is not set
-# CONFIG_PACKAGE_ifstat is not set
-# CONFIG_PACKAGE_iftop is not set
-# CONFIG_PACKAGE_igmpproxy is not set
-# CONFIG_PACKAGE_imsnif is not set
-# CONFIG_PACKAGE_iodine is not set
-# CONFIG_PACKAGE_iodined is not set
-CONFIG_PACKAGE_ip=y
-# CONFIG_PACKAGE_ipcad is not set
-# CONFIG_PACKAGE_iperf is not set
-# CONFIG_PACKAGE_iperf-mt is not set
-# CONFIG_PACKAGE_ipsec-tools is not set
-# CONFIG_PACKAGE_ipset is not set
-CONFIG_PACKAGE_iptables=y
-# CONFIG_PACKAGE_iptables-mod-chaos is not set
-# CONFIG_PACKAGE_iptables-mod-condition is not set
-CONFIG_PACKAGE_iptables-mod-conntrack=y
-# CONFIG_PACKAGE_iptables-mod-conntrack-extra is not set
-# CONFIG_PACKAGE_iptables-mod-delude is not set
-# CONFIG_PACKAGE_iptables-mod-extra is not set
-# CONFIG_PACKAGE_iptables-mod-filter is not set
-# CONFIG_PACKAGE_iptables-mod-imq is not set
-# CONFIG_PACKAGE_iptables-mod-ipopt is not set
-# CONFIG_PACKAGE_iptables-mod-ipp2p is not set
-# CONFIG_PACKAGE_iptables-mod-iprange is not set
-# CONFIG_PACKAGE_iptables-mod-ipsec is not set
-# CONFIG_PACKAGE_iptables-mod-ipset is not set
-CONFIG_PACKAGE_iptables-mod-nat=y
-# CONFIG_PACKAGE_iptables-mod-nat-extra is not set
-# CONFIG_PACKAGE_iptables-mod-tarpit is not set
-# CONFIG_PACKAGE_iptables-mod-ulog is not set
-# CONFIG_PACKAGE_iptables-utils is not set
-# CONFIG_PACKAGE_iptraf is not set
-# CONFIG_PACKAGE_ipupdate is not set
-# CONFIG_PACKAGE_iputils-arping is not set
-# CONFIG_PACKAGE_iputils-clockdiff is not set
-# CONFIG_PACKAGE_iputils-ping is not set
-# CONFIG_PACKAGE_iputils-ping6 is not set
-# CONFIG_PACKAGE_iputils-tftpd is not set
-# CONFIG_PACKAGE_iputils-tracepath is not set
-# CONFIG_PACKAGE_iputils-tracepath6 is not set
-# CONFIG_PACKAGE_iputils-traceroute6 is not set
-# CONFIG_PACKAGE_isakmpd is not set
-# CONFIG_PACKAGE_iw is not set
-CONFIG_PACKAGE_ixp4xx-microcode=y
-# CONFIG_PACKAGE_kamailio is not set
-# CONFIG_PACKAGE_karma is not set
-# CONFIG_PACKAGE_keynote is not set
-# CONFIG_PACKAGE_knock is not set
-# CONFIG_PACKAGE_knockd is not set
-# CONFIG_PACKAGE_lft is not set
-# CONFIG_PACKAGE_linuxigd is not set
-# CONFIG_PACKAGE_lldpd is not set
-# CONFIG_PACKAGE_m-route is not set
-# CONFIG_PACKAGE_mac-to-devinfo is not set
-CONFIG_PACKAGE_mdnsresponder=m
-# CONFIG_PACKAGE_miax is not set
-# CONFIG_PACKAGE_mii-tool is not set
-# CONFIG_PACKAGE_mini-snmpd is not set
-# CONFIG_PACKAGE_miniupnpd is not set
-# CONFIG_PACKAGE_mtr is not set
-# CONFIG_PACKAGE_mvprelay is not set
-# CONFIG_PACKAGE_natpmp is not set
-# CONFIG_PACKAGE_nbd is not set
-# CONFIG_PACKAGE_nbtscan is not set
-# CONFIG_PACKAGE_ndyndns is not set
-# CONFIG_PACKAGE_net-tools is not set
-# CONFIG_PACKAGE_netatalk is not set
-# CONFIG_PACKAGE_netcat is not set
-# CONFIG_PACKAGE_netdiscover is not set
-# CONFIG_PACKAGE_netperf is not set
-# CONFIG_PACKAGE_netpipe is not set
-# CONFIG_PACKAGE_netstat-nat is not set
-# CONFIG_PACKAGE_nginx is not set
-# CONFIG_PACKAGE_ngircd is not set
-# CONFIG_PACKAGE_ngrep is not set
-# CONFIG_PACKAGE_nmap is not set
-# CONFIG_PACKAGE_nrpe is not set
-# CONFIG_PACKAGE_nstx is not set
-# CONFIG_PACKAGE_nstxd is not set
-# CONFIG_PACKAGE_nufw is not set
-# CONFIG_PACKAGE_nufw-modules is not set
-# CONFIG_PACKAGE_nufw-python is not set
-# CONFIG_PACKAGE_nutcpc is not set
-# CONFIG_PACKAGE_nzbget is not set
-# CONFIG_PACKAGE_oidentd is not set
-# CONFIG_PACKAGE_olsrd is not set
-# CONFIG_PACKAGE_openldap-server is not set
-# CONFIG_PACKAGE_opennhrp is not set
-# CONFIG_PACKAGE_openrrcp is not set
-# CONFIG_PACKAGE_openser is not set
-# CONFIG_PACKAGE_opensips is not set
-# CONFIG_PACKAGE_openslp is not set
-# CONFIG_PACKAGE_openswan is not set
-# CONFIG_PACKAGE_oping is not set
-# CONFIG_PACKAGE_parprouted is not set
-# CONFIG_PACKAGE_pcapsipdump is not set
-# CONFIG_PACKAGE_peerguardian is not set
-# CONFIG_PACKAGE_pen is not set
-# CONFIG_PACKAGE_pepsal is not set
-# CONFIG_PACKAGE_portmap is not set
-# CONFIG_PACKAGE_portsentry is not set
-CONFIG_PACKAGE_powersensordaemon=m
-# CONFIG_PACKAGE_ppp is not set
-# CONFIG_PACKAGE_pptp is not set
-# CONFIG_PACKAGE_privoxy is not set
-# CONFIG_PACKAGE_prosody is not set
-# CONFIG_PACKAGE_ptunnel is not set
-# CONFIG_PACKAGE_qolyester is not set
-# CONFIG_PACKAGE_quagga is not set
-# CONFIG_PACKAGE_quagga-unstable is not set
-# CONFIG_PACKAGE_raddump is not set
-# CONFIG_PACKAGE_radiusclient-ng is not set
-# CONFIG_PACKAGE_radsecproxy is not set
-# CONFIG_PACKAGE_rarpd is not set
-# CONFIG_PACKAGE_redir is not set
-# CONFIG_PACKAGE_remotefs-server is not set
-# CONFIG_PACKAGE_rrs is not set
-# CONFIG_PACKAGE_rrs-nossl is not set
-# CONFIG_PACKAGE_rssh is not set
-CONFIG_PACKAGE_rsync=m
-# CONFIG_PACKAGE_rtpproxy is not set
-# CONFIG_PACKAGE_samba3 is not set
-# CONFIG_PACKAGE_scanlogd is not set
-# CONFIG_PACKAGE_scdp is not set
-# CONFIG_PACKAGE_send-nsca is not set
-CONFIG_PACKAGE_ser2net=m
-# CONFIG_PACKAGE_serialoverip is not set
-# CONFIG_PACKAGE_shat is not set
-# CONFIG_PACKAGE_sipp is not set
-# CONFIG_PACKAGE_siproxd is not set
-# CONFIG_PACKAGE_sipsak is not set
-# CONFIG_PACKAGE_slurm is not set
-# CONFIG_PACKAGE_smap is not set
-# CONFIG_PACKAGE_smtptrapd is not set
-# CONFIG_PACKAGE_snmp-utils is not set
-# CONFIG_PACKAGE_snmpd is not set
-# CONFIG_PACKAGE_snmpd-static is not set
-# CONFIG_PACKAGE_socat is not set
-# CONFIG_PACKAGE_softflowd is not set
-# CONFIG_PACKAGE_squid is not set
-# CONFIG_PACKAGE_srelay is not set
-# CONFIG_PACKAGE_sscep is not set
-# CONFIG_PACKAGE_sslh is not set
-# CONFIG_PACKAGE_sslsniff is not set
-# CONFIG_PACKAGE_stun-client is not set
-# CONFIG_PACKAGE_stund is not set
-# CONFIG_PACKAGE_stunnel is not set
-# CONFIG_PACKAGE_synce-dccm is not set
-# CONFIG_PACKAGE_tc is not set
-CONFIG_PACKAGE_tcpdump=m
-# CONFIG_PACKAGE_tcpdump-mini is not set
-# CONFIG_PACKAGE_tcptraceroute is not set
-# CONFIG_PACKAGE_tctool is not set
-# CONFIG_PACKAGE_tftp-hpa is not set
-# CONFIG_PACKAGE_tftpd-hpa is not set
-# CONFIG_PACKAGE_tor is not set
-# CONFIG_PACKAGE_tsocks is not set
-# CONFIG_PACKAGE_ttcp is not set
-# CONFIG_PACKAGE_ucspi-tcp is not set
-# CONFIG_PACKAGE_udp-broadcast-relay is not set
-# CONFIG_PACKAGE_ulogd is not set
-# CONFIG_PACKAGE_umurmur is not set
-# CONFIG_PACKAGE_uob-nomad is not set
-# CONFIG_PACKAGE_updatedd is not set
-CONFIG_PACKAGE_usocket=m
-# CONFIG_PACKAGE_uucp is not set
-# CONFIG_PACKAGE_veth is not set
-# CONFIG_PACKAGE_vgp is not set
-# CONFIG_PACKAGE_vis is not set
-# CONFIG_PACKAGE_vnc-reflector is not set
-# CONFIG_PACKAGE_vncrepeater is not set
-# CONFIG_PACKAGE_vnstat is not set
-# CONFIG_PACKAGE_vrrpd is not set
-# CONFIG_PACKAGE_wccpd is not set
-# CONFIG_PACKAGE_wdiag is not set
-CONFIG_PACKAGE_wget=m
-# CONFIG_PACKAGE_wget-nossl is not set
-# CONFIG_PACKAGE_wiviz is not set
-# CONFIG_PACKAGE_wol is not set
-# CONFIG_PACKAGE_wpa-supplicant is not set
-# CONFIG_PACKAGE_wpa-supplicant-mini is not set
-# CONFIG_PACKAGE_wpad is not set
-# CONFIG_PACKAGE_wpad-mini is not set
-# CONFIG_PACKAGE_wprobe-export is not set
-# CONFIG_PACKAGE_wprobe-util is not set
-# CONFIG_PACKAGE_wshaper is not set
-# CONFIG_PACKAGE_xinetd is not set
-# CONFIG_PACKAGE_xsupplicant is not set
-
-#
-# Libraries
-#
-
-#
-# Filesystem
-#
-CONFIG_PACKAGE_libblkid=y
-# CONFIG_PACKAGE_libext2fs is not set
-# CONFIG_PACKAGE_libnfsidmap is not set
-# CONFIG_PACKAGE_libow is not set
-# CONFIG_PACKAGE_libow-capi is not set
-CONFIG_PACKAGE_libuuid=y
-
-#
-# SSL
-#
-# CONFIG_PACKAGE_libaxtls is not set
-# CONFIG_PACKAGE_libcyassl is not set
-# CONFIG_PACKAGE_libgnutls is not set
-# CONFIG_PACKAGE_libgnutls-extra is not set
-# CONFIG_PACKAGE_libgnutls-openssl is not set
-# CONFIG_PACKAGE_libmatrixssl is not set
-CONFIG_PACKAGE_libopenssl=m
-# CONFIG_OPENSSL_ENGINE is not set
-# CONFIG_PACKAGE_libpolarssl is not set
-
-#
-# database
-#
-# CONFIG_PACKAGE_libpq is not set
-# CONFIG_PACKAGE_libsqlite2 is not set
-# CONFIG_PACKAGE_libsqlite3 is not set
-# CONFIG_PACKAGE_DirectFB is not set
-CONFIG_PACKAGE_alsa-lib=m
-# CONFIG_PACKAGE_argp-standalone is not set
-# CONFIG_PACKAGE_argtable is not set
-# CONFIG_PACKAGE_bluez-libs is not set
-# CONFIG_PACKAGE_boost is not set
-# CONFIG_PACKAGE_boost-regex is not set
-# CONFIG_PACKAGE_boost-serialization is not set
-# CONFIG_PACKAGE_ccid is not set
-CONFIG_PACKAGE_cgilib=m
-# CONFIG_PACKAGE_check is not set
-# CONFIG_PACKAGE_classpath is not set
-# CONFIG_PACKAGE_clearsilver is not set
-# CONFIG_PACKAGE_confuse is not set
-# CONFIG_PACKAGE_fcgi is not set
-# CONFIG_PACKAGE_fftw3 is not set
-# CONFIG_PACKAGE_fribidi is not set
-# CONFIG_PACKAGE_giflib is not set
-# CONFIG_PACKAGE_glib1 is not set
-# CONFIG_PACKAGE_glib2 is not set
-# CONFIG_PACKAGE_glibmm is not set
-# CONFIG_PACKAGE_id3lib is not set
-# CONFIG_PACKAGE_libIDL2 is not set
-# CONFIG_PACKAGE_libaa is not set
-# CONFIG_PACKAGE_libaio is not set
-# CONFIG_PACKAGE_libamsel is not set
-# CONFIG_PACKAGE_libao is not set
-# CONFIG_PACKAGE_libapr is not set
-# CONFIG_PACKAGE_libaprutil is not set
-CONFIG_PACKAGE_libart=m
-CONFIG_PACKAGE_libatomicops=m
-# CONFIG_PACKAGE_libaudiofile is not set
-CONFIG_PACKAGE_libavahi=m
-# CONFIG_PACKAGE_libcares is not set
-# CONFIG_PACKAGE_libcelt is not set
-# CONFIG_PACKAGE_libcharset is not set
-# CONFIG_PACKAGE_libcli is not set
-# CONFIG_PACKAGE_libclinkc is not set
-# CONFIG_PACKAGE_libconfig is not set
-# CONFIG_PACKAGE_libcroco is not set
-# CONFIG_PACKAGE_libcryptoxx is not set
-# CONFIG_PACKAGE_libcurl is not set
-CONFIG_PACKAGE_libdaemon=m
-# CONFIG_PACKAGE_libdb47 is not set
-# CONFIG_PACKAGE_libdbi is not set
-CONFIG_PACKAGE_libdbus=m
-# CONFIG_PACKAGE_libdbus-glib is not set
-# CONFIG_PACKAGE_libdlna is not set
-# CONFIG_PACKAGE_libdnet is not set
-# CONFIG_PACKAGE_libdvbpsi is not set
-# CONFIG_PACKAGE_libdvdread is not set
-# CONFIG_PACKAGE_libelf is not set
-# CONFIG_PACKAGE_libevent is not set
-# CONFIG_PACKAGE_libeventlog is not set
-# CONFIG_PACKAGE_libexif is not set
-CONFIG_PACKAGE_libexpat=m
-# CONFIG_PACKAGE_libexslt is not set
-# CONFIG_PACKAGE_libezxml is not set
-# CONFIG_PACKAGE_libfaad2 is not set
-# CONFIG_PACKAGE_libffi is not set
-# CONFIG_PACKAGE_libffi-sable is not set
-# CONFIG_PACKAGE_libffmpeg is not set
-# CONFIG_PACKAGE_libflac is not set
-CONFIG_PACKAGE_libfreetype=m
-# CONFIG_PACKAGE_libgconf2 is not set
-CONFIG_PACKAGE_libgcrypt=m
-# CONFIG_PACKAGE_libgd is not set
-CONFIG_PACKAGE_libgdbm=m
-# CONFIG_PACKAGE_libgmp is not set
-CONFIG_PACKAGE_libgpg-error=m
-# CONFIG_PACKAGE_libgphoto2 is not set
-# CONFIG_PACKAGE_libgsl is not set
-# CONFIG_PACKAGE_libgsm is not set
-# CONFIG_PACKAGE_libgssapi is not set
-# CONFIG_PACKAGE_libhowl is not set
-CONFIG_PACKAGE_libiconv=m
-CONFIG_PACKAGE_libid3tag=m
-# CONFIG_PACKAGE_libidn is not set
-# CONFIG_PACKAGE_libiksemel is not set
-# CONFIG_PACKAGE_libinklevel is not set
-CONFIG_PACKAGE_libintl=m
-CONFIG_PACKAGE_libiptc=y
-CONFIG_PACKAGE_libiw=m
-CONFIG_PACKAGE_libjpeg=m
-# CONFIG_PACKAGE_libjs is not set
-# CONFIG_PACKAGE_libjson is not set
-CONFIG_PACKAGE_libltdl=m
-CONFIG_PACKAGE_liblua=y
-# CONFIG_PACKAGE_liblzo is not set
-CONFIG_PACKAGE_libmad=m
-# CONFIG_PACKAGE_libmagic is not set
-# CONFIG_PACKAGE_libmcrypt is not set
-# CONFIG_PACKAGE_libmikmod is not set
-# CONFIG_PACKAGE_libmms is not set
-# CONFIG_PACKAGE_libmpcdec is not set
-# CONFIG_PACKAGE_libmpd is not set
-# CONFIG_PACKAGE_libmysqlclient is not set
-CONFIG_PACKAGE_libncurses=m
-# CONFIG_PACKAGE_libneon is not set
-# CONFIG_PACKAGE_libnet0 is not set
-# CONFIG_PACKAGE_libnet1 is not set
-# CONFIG_PACKAGE_libnetfilter-conntrack is not set
-# CONFIG_PACKAGE_libnetfilter-log is not set
-# CONFIG_PACKAGE_libnetfilter-queue is not set
-# CONFIG_PACKAGE_libnetsnmp is not set
-# CONFIG_PACKAGE_libnfc is not set
-# CONFIG_PACKAGE_libnfnetlink is not set
-# CONFIG_PACKAGE_libnids is not set
-# CONFIG_PACKAGE_libnl is not set
-# CONFIG_PACKAGE_libnl-tiny is not set
-# CONFIG_PACKAGE_libnmeap is not set
-# CONFIG_PACKAGE_libogg is not set
-CONFIG_PACKAGE_liboil=m
-# CONFIG_PACKAGE_libol is not set
-# CONFIG_PACKAGE_libopal is not set
-# CONFIG_PACKAGE_libopencdk is not set
-# CONFIG_PACKAGE_libopenh323 is not set
-# CONFIG_PACKAGE_libopenldap is not set
-# CONFIG_PACKAGE_liboping is not set
-# CONFIG_PACKAGE_libosip2 is not set
-# CONFIG_PACKAGE_libpam is not set
-# CONFIG_PACKAGE_libpar2 is not set
-CONFIG_PACKAGE_libpcap=m
-# CONFIG_PCAP_HAS_USB is not set
-# CONFIG_PACKAGE_libpcre is not set
-# CONFIG_PACKAGE_libpcsclite is not set
-# CONFIG_PACKAGE_libpfm is not set
-CONFIG_PACKAGE_libpng=m
-CONFIG_PACKAGE_libpopt=m
-# CONFIG_PACKAGE_libpostproc is not set
-# CONFIG_PACKAGE_libptmalloc3 is not set
-# CONFIG_PACKAGE_libradiusclient-ng is not set
-# CONFIG_PACKAGE_libreadline is not set
-# CONFIG_PACKAGE_librpcsecgss is not set
-CONFIG_PACKAGE_librrd=m
-CONFIG_PACKAGE_librrd1=m
-# CONFIG_PACKAGE_librsync is not set
-# CONFIG_PACKAGE_libruby is not set
-CONFIG_PACKAGE_libsamplerate=m
-# CONFIG_PACKAGE_libsasl2 is not set
-# CONFIG_PACKAGE_libsdl is not set
-# CONFIG_PACKAGE_libsdl-mixer is not set
-# CONFIG_PACKAGE_libsdl-sound is not set
-# CONFIG_PACKAGE_libsensors is not set
-# CONFIG_PACKAGE_libshout is not set
-# CONFIG_PACKAGE_libsigcxx is not set
-CONFIG_PACKAGE_libsndfile=m
-# CONFIG_PACKAGE_libsoup is not set
-CONFIG_PACKAGE_libspeex=m
-# CONFIG_PACKAGE_libspeexdsp is not set
-# CONFIG_PACKAGE_libsynce is not set
-# CONFIG_PACKAGE_libtasn1 is not set
-# CONFIG_PACKAGE_libtheora is not set
-# CONFIG_PACKAGE_libtiff is not set
-# CONFIG_PACKAGE_libtorrent is not set
-# CONFIG_PACKAGE_libtwin is not set
-CONFIG_PACKAGE_libuci=y
-CONFIG_PACKAGE_libuci-lua=y
-# CONFIG_PACKAGE_libupnp is not set
-CONFIG_PACKAGE_libusb=m
-# CONFIG_PACKAGE_libv4l is not set
-# CONFIG_PACKAGE_libvncserver is not set
-# CONFIG_PACKAGE_libvorbis is not set
-# CONFIG_PACKAGE_libvorbisidec is not set
-# CONFIG_PACKAGE_libwrap is not set
-# CONFIG_PACKAGE_libwxbase is not set
-# CONFIG_PACKAGE_libxapian is not set
-# CONFIG_PACKAGE_libxml2 is not set
-# CONFIG_PACKAGE_libxslt is not set
-CONFIG_PACKAGE_libxtables=y
-# CONFIG_PACKAGE_linux-atm is not set
-# CONFIG_PACKAGE_phidget21 is not set
-# CONFIG_PACKAGE_pthsem is not set
-# CONFIG_PACKAGE_ptlib is not set
-# CONFIG_PACKAGE_pwlib is not set
-# CONFIG_PACKAGE_radlib is not set
-# CONFIG_PACKAGE_sane-libs is not set
-# CONFIG_PACKAGE_serdisplib is not set
-# CONFIG_PACKAGE_st2205tool is not set
-# CONFIG_PACKAGE_taglib is not set
-# CONFIG_PACKAGE_taglibc is not set
-# CONFIG_PACKAGE_uclibcxx is not set
-# CONFIG_PACKAGE_ustl is not set
-# CONFIG_PACKAGE_xmlrpc-c is not set
-# CONFIG_PACKAGE_xmpp4r is not set
-# CONFIG_PACKAGE_zaptel-libtonezone is not set
-# CONFIG_PACKAGE_zaptel14-libtonezone is not set
-CONFIG_PACKAGE_zlib=m
-
-#
-# IPv6
-#
-
-#
-# IPv6 attack and analyzing toolset (thc-ipv6)
-#
-# CONFIG_PACKAGE_alive6 is not set
-# CONFIG_PACKAGE_detect-new-ip6 is not set
-# CONFIG_PACKAGE_dos-new-ip6 is not set
-# CONFIG_PACKAGE_fake_advertise6 is not set
-# CONFIG_PACKAGE_fake_mipv6 is not set
-# CONFIG_PACKAGE_fake_mld6 is not set
-# CONFIG_PACKAGE_fake_router6 is not set
-# CONFIG_PACKAGE_parasite6 is not set
-# CONFIG_PACKAGE_redir6 is not set
-# CONFIG_PACKAGE_rsmurf6 is not set
-# CONFIG_PACKAGE_smurf6 is not set
-# CONFIG_PACKAGE_toobig6 is not set
-
-#
-# IPv6 discovery tools
-#
-# CONFIG_PACKAGE_ndisc6 is not set
-# CONFIG_PACKAGE_rdisc6 is not set
-# CONFIG_PACKAGE_tcptraceroute6 is not set
-
-#
-# firewall
-#
-# CONFIG_PACKAGE_shorewall6-lite is not set
-
-#
-# miredo: Teredo (IPv6 tunneling over UDP through NAT)
-#
-# CONFIG_PACKAGE_miredo-client is not set
-# CONFIG_PACKAGE_miredo-server is not set
-# CONFIG_PACKAGE_6scripts is not set
-# CONFIG_PACKAGE_6tunnel is not set
-# CONFIG_PACKAGE_ahcpd is not set
-# CONFIG_PACKAGE_aiccu is not set
-# CONFIG_PACKAGE_dhcp6-client is not set
-# CONFIG_PACKAGE_dhcp6-server is not set
-# CONFIG_PACKAGE_dibbler-client is not set
-# CONFIG_PACKAGE_dibbler-relay is not set
-# CONFIG_PACKAGE_dibbler-server is not set
-# CONFIG_PACKAGE_gw6c is not set
-# CONFIG_PACKAGE_ip6tables is not set
-# CONFIG_PACKAGE_ipv6calc is not set
-# CONFIG_PACKAGE_mrd6 is not set
-# CONFIG_PACKAGE_ptrtd is not set
-# CONFIG_PACKAGE_radvd is not set
-# CONFIG_PACKAGE_send is not set
-# CONFIG_PACKAGE_totd is not set
-# CONFIG_PACKAGE_tspc is not set
-
-#
-# LuCI
-#
-
-#
-# Collections
-#
-CONFIG_PACKAGE_luci-kamikaze=y
-# CONFIG_PACKAGE_luci-light is not set
-
-#
-# Components
-#
-CONFIG_PACKAGE_luci-admin-core=y
-CONFIG_PACKAGE_luci-admin-full=y
-CONFIG_PACKAGE_luci-admin-mini=y
-CONFIG_PACKAGE_luci-admin-rpc=m
-# CONFIG_PACKAGE_luci-app-ddns is not set
-CONFIG_PACKAGE_luci-app-firewall=y
-# CONFIG_PACKAGE_luci-app-hd_idle is not set
-CONFIG_PACKAGE_luci-app-initmgr=m
-CONFIG_PACKAGE_luci-app-livestats=m
-# CONFIG_PACKAGE_luci-app-mmc_over_gpio is not set
-CONFIG_PACKAGE_luci-app-ntpc=m
-# CONFIG_PACKAGE_luci-app-olsr is not set
-# CONFIG_PACKAGE_luci-app-openvpn is not set
-# CONFIG_PACKAGE_luci-app-p2pblock is not set
-CONFIG_PACKAGE_luci-app-p910nd=m
-# CONFIG_PACKAGE_luci-app-polipo is not set
-# CONFIG_PACKAGE_luci-app-qos is not set
-# CONFIG_PACKAGE_luci-app-samba is not set
-CONFIG_PACKAGE_luci-app-statistics=m
-# CONFIG_PACKAGE_luci-app-tinyproxy is not set
-# CONFIG_PACKAGE_luci-app-upnp is not set
-# CONFIG_PACKAGE_luci-app-ushare is not set
-# CONFIG_PACKAGE_luci-app-uvc_streamer is not set
-
-#
-# Freifunk
-#
-# CONFIG_PACKAGE_freifunk-firewall is not set
-# CONFIG_PACKAGE_freifunk-p2pblock is not set
-# CONFIG_PACKAGE_freifunk-watchdog is not set
-# CONFIG_PACKAGE_luci-app-ffwizard-leipzig is not set
-# CONFIG_PACKAGE_luci-app-siitwizard is not set
-# CONFIG_PACKAGE_luci-app-splash is not set
-# CONFIG_PACKAGE_luci-freifunk-community is not set
-# CONFIG_PACKAGE_luci-mod-freifunk is not set
-# CONFIG_PACKAGE_luci-theme-fledermaus is not set
-# CONFIG_PACKAGE_luci-theme-freifunk is not set
-# CONFIG_PACKAGE_luci-theme-freifunk-bno is not set
-# CONFIG_PACKAGE_luci-theme-freifunk-hannover is not set
-# CONFIG_PACKAGE_olsrd-luci is not set
-
-#
-# Libraries
-#
-# CONFIG_PACKAGE_libcyassl-luci is not set
-CONFIG_PACKAGE_luci-cbi=y
-CONFIG_PACKAGE_luci-core=y
-# CONFIG_PACKAGE_luci-core_compile is not set
-# CONFIG_PACKAGE_luci-core_stripped is not set
-CONFIG_PACKAGE_luci-core_source=y
-# CONFIG_PACKAGE_luci-fastindex is not set
-CONFIG_PACKAGE_luci-http=y
-# CONFIG_PACKAGE_luci-httpclient is not set
-CONFIG_PACKAGE_luci-ipkg=y
-CONFIG_PACKAGE_luci-json=m
-CONFIG_PACKAGE_luci-lmo=y
-CONFIG_PACKAGE_luci-luanet=m
-CONFIG_PACKAGE_luci-lucid=y
-CONFIG_PACKAGE_luci-nixio=y
-CONFIG_PACKAGE_luci-nixio_axtls=y
-# CONFIG_PACKAGE_luci-nixio_cyassl is not set
-# CONFIG_PACKAGE_luci-nixio_openssl is not set
-CONFIG_PACKAGE_luci-px5g=y
-CONFIG_PACKAGE_luci-sgi-cgi=y
-CONFIG_PACKAGE_luci-sys=y
-CONFIG_PACKAGE_luci-uci=y
-CONFIG_PACKAGE_luci-uvl=y
-CONFIG_PACKAGE_luci-web=y
-
-#
-# Themes
-#
-CONFIG_PACKAGE_luci-theme-base=y
-CONFIG_PACKAGE_luci-theme-openwrt=y
-# CONFIG_PACKAGE_luci-theme-openwrtlight is not set
-
-#
-# Translations
-#
-# CONFIG_PACKAGE_luci-i18n-catalan is not set
-CONFIG_PACKAGE_luci-i18n-english=y
-# CONFIG_PACKAGE_luci-i18n-french is not set
-# CONFIG_PACKAGE_luci-i18n-german is not set
-# CONFIG_PACKAGE_luci-i18n-greek is not set
-# CONFIG_PACKAGE_luci-i18n-italian is not set
-# CONFIG_PACKAGE_luci-i18n-japanese is not set
-# CONFIG_PACKAGE_luci-i18n-portuguese is not set
-# CONFIG_PACKAGE_luci-i18n-portuguese_brazilian is not set
-# CONFIG_PACKAGE_luci-i18n-russian is not set
-# CONFIG_PACKAGE_luci-i18n-spanish is not set
-
-#
-# Kernel modules
-#
-
-#
-# Block Devices
-#
-# CONFIG_PACKAGE_kmod-aoe is not set
-# CONFIG_PACKAGE_kmod-ata-core is not set
-# CONFIG_PACKAGE_kmod-dm is not set
-# CONFIG_PACKAGE_kmod-ide-core is not set
-# CONFIG_PACKAGE_kmod-loop is not set
-# CONFIG_PACKAGE_kmod-nbd is not set
-CONFIG_PACKAGE_kmod-scsi-core=y
-# CONFIG_PACKAGE_kmod-scsi-generic is not set
-
-#
-# Cryptographic API modules
-#
-# CONFIG_PACKAGE_kmod-crypto-core is not set
-# CONFIG_PACKAGE_kmod-loop-aes is not set
-
-#
-# Filesystems
-#
-# CONFIG_PACKAGE_kmod-fs-autofs4 is not set
-# CONFIG_PACKAGE_kmod-fs-btrfs is not set
-# CONFIG_PACKAGE_kmod-fs-cifs is not set
-# CONFIG_PACKAGE_kmod-fs-exportfs is not set
-CONFIG_PACKAGE_kmod-fs-ext2=y
-CONFIG_PACKAGE_kmod-fs-ext3=y
-CONFIG_PACKAGE_kmod-fs-ext4=m
-# CONFIG_PACKAGE_kmod-fs-hfs is not set
-# CONFIG_PACKAGE_kmod-fs-hfsplus is not set
-# CONFIG_PACKAGE_kmod-fs-isofs is not set
-CONFIG_PACKAGE_kmod-fs-mbcache=y
-# CONFIG_PACKAGE_kmod-fs-minix is not set
-# CONFIG_PACKAGE_kmod-fs-msdos is not set
-# CONFIG_PACKAGE_kmod-fs-nfs is not set
-# CONFIG_PACKAGE_kmod-fs-nfs-common is not set
-# CONFIG_PACKAGE_kmod-fs-nfs-common-v4 is not set
-# CONFIG_PACKAGE_kmod-fs-nfsd is not set
-# CONFIG_PACKAGE_kmod-fs-ntfs is not set
-# CONFIG_PACKAGE_kmod-fs-reiserfs is not set
-# CONFIG_PACKAGE_kmod-fs-udf is not set
-CONFIG_PACKAGE_kmod-fs-vfat=m
-# CONFIG_PACKAGE_kmod-fs-xfs is not set
-# CONFIG_PACKAGE_kmod-fuse is not set
-CONFIG_PACKAGE_kmod-nls-base=y
-# CONFIG_PACKAGE_kmod-nls-cp1250 is not set
-# CONFIG_PACKAGE_kmod-nls-cp1251 is not set
-# CONFIG_PACKAGE_kmod-nls-cp437 is not set
-# CONFIG_PACKAGE_kmod-nls-cp775 is not set
-# CONFIG_PACKAGE_kmod-nls-cp850 is not set
-# CONFIG_PACKAGE_kmod-nls-cp852 is not set
-# CONFIG_PACKAGE_kmod-nls-cp866 is not set
-# CONFIG_PACKAGE_kmod-nls-iso8859-1 is not set
-# CONFIG_PACKAGE_kmod-nls-iso8859-13 is not set
-# CONFIG_PACKAGE_kmod-nls-iso8859-15 is not set
-# CONFIG_PACKAGE_kmod-nls-iso8859-2 is not set
-# CONFIG_PACKAGE_kmod-nls-koi8r is not set
-CONFIG_PACKAGE_kmod-nls-utf8=y
-
-#
-# FireWire support
-#
-# CONFIG_PACKAGE_kmod-ieee1394 is not set
-
-#
-# Hardware Monitoring Support
-#
-# CONFIG_PACKAGE_kmod-hwmon-core is not set
-
-#
-# I2C support
-#
-# CONFIG_PACKAGE_kmod-i2c-core is not set
-# CONFIG_PACKAGE_kmod-i2c-gpio-custom is not set
-
-#
-# Netfilter Extensions
-#
-# CONFIG_PACKAGE_kmod-arptables is not set
-# CONFIG_PACKAGE_kmod-ebtables is not set
-CONFIG_PACKAGE_kmod-ip6tables=m
-CONFIG_PACKAGE_kmod-ipt-core=y
-# CONFIG_PACKAGE_kmod-ipt-chaos is not set
-# CONFIG_PACKAGE_kmod-ipt-compat-xtables is not set
-# CONFIG_PACKAGE_kmod-ipt-condition is not set
-CONFIG_PACKAGE_kmod-ipt-conntrack=y
-CONFIG_PACKAGE_kmod-ipt-conntrack-extra=m
-# CONFIG_PACKAGE_kmod-ipt-delude is not set
-# CONFIG_PACKAGE_kmod-ipt-extra is not set
-# CONFIG_PACKAGE_kmod-ipt-filter is not set
-# CONFIG_PACKAGE_kmod-ipt-imq is not set
-# CONFIG_PACKAGE_kmod-ipt-ipopt is not set
-# CONFIG_PACKAGE_kmod-ipt-ipp2p is not set
-# CONFIG_PACKAGE_kmod-ipt-iprange is not set
-# CONFIG_PACKAGE_kmod-ipt-ipsec is not set
-# CONFIG_PACKAGE_kmod-ipt-ipset is not set
-CONFIG_PACKAGE_kmod-ipt-nat=y
-# CONFIG_PACKAGE_kmod-ipt-nat-extra is not set
-CONFIG_PACKAGE_kmod-ipt-nathelper=y
-# CONFIG_PACKAGE_kmod-ipt-nathelper-extra is not set
-# CONFIG_PACKAGE_kmod-ipt-queue is not set
-# CONFIG_PACKAGE_kmod-ipt-tarpit is not set
-# CONFIG_PACKAGE_kmod-ipt-ulog is not set
-# CONFIG_PACKAGE_kmod-nf-conntrack-netlink is not set
-# CONFIG_PACKAGE_kmod-nfnetlink is not set
-# CONFIG_PACKAGE_kmod-nfnetlink-log is not set
-# CONFIG_PACKAGE_kmod-nfnetlink-queue is not set
-
-#
-# Network Devices
-#
-# CONFIG_PACKAGE_kmod-e1000 is not set
-# CONFIG_PACKAGE_kmod-et131x is not set
-# CONFIG_PACKAGE_kmod-gigaset is not set
-# CONFIG_PACKAGE_kmod-hfcmulti is not set
-# CONFIG_PACKAGE_kmod-libphy is not set
-# CONFIG_PACKAGE_kmod-macvlan is not set
-# CONFIG_PACKAGE_kmod-siit is not set
-# CONFIG_PACKAGE_kmod-tg3 is not set
-# CONFIG_PACKAGE_kmod-via-velocity is not set
-
-#
-# Network Support
-#
-# CONFIG_PACKAGE_kmod-aodv-uu is not set
-# CONFIG_PACKAGE_kmod-appletalk is not set
-# CONFIG_PACKAGE_kmod-atm is not set
-# CONFIG_PACKAGE_kmod-ax25 is not set
-# CONFIG_PACKAGE_kmod-batgat is not set
-# CONFIG_PACKAGE_kmod-batman-adv-kernelland is not set
-# CONFIG_PACKAGE_kmod-bonding is not set
-# CONFIG_PACKAGE_kmod-capi is not set
-# CONFIG_PACKAGE_kmod-gre is not set
-# CONFIG_PACKAGE_kmod-ip6-tunnel is not set
-# CONFIG_PACKAGE_kmod-ipip is not set
-# CONFIG_PACKAGE_kmod-ipsec is not set
-# CONFIG_PACKAGE_kmod-iptunnel4 is not set
-# CONFIG_PACKAGE_kmod-iptunnel6 is not set
-CONFIG_PACKAGE_kmod-ipv6=y
-# CONFIG_PACKAGE_kmod-isdn4linux is not set
-# CONFIG_PACKAGE_kmod-misdn is not set
-# CONFIG_PACKAGE_kmod-mp-alg is not set
-# CONFIG_PACKAGE_kmod-openswan is not set
-# CONFIG_PACKAGE_kmod-pktgen is not set
-# CONFIG_PACKAGE_kmod-ppp is not set
-# CONFIG_PACKAGE_kmod-sched is not set
-# CONFIG_PACKAGE_kmod-sit is not set
-CONFIG_PACKAGE_kmod-tun=m
-# CONFIG_PACKAGE_kmod-wprobe is not set
-
-#
-# OCF Configuration
-#
-
-#
-# Other modules
-#
-# CONFIG_PACKAGE_kmod-avila-wdt is not set
-# CONFIG_PACKAGE_kmod-block2mtd is not set
-# CONFIG_PACKAGE_kmod-bluetooth is not set
-# CONFIG_PACKAGE_kmod-button-hotplug is not set
-# CONFIG_PACKAGE_kmod-compcache is not set
-# CONFIG_PACKAGE_kmod-crc-ccitt is not set
-# CONFIG_PACKAGE_kmod-crc-itu-t is not set
-CONFIG_PACKAGE_kmod-crc16=m
-# CONFIG_PACKAGE_kmod-crc7 is not set
-# CONFIG_PACKAGE_kmod-eeprom-93cx6 is not set
-# CONFIG_PACKAGE_kmod-gpio-dev is not set
-# CONFIG_PACKAGE_kmod-hid is not set
-CONFIG_PACKAGE_kmod-input-core=y
-# CONFIG_PACKAGE_kmod-input-evdev is not set
-# CONFIG_PACKAGE_kmod-input-gpio-buttons is not set
-# CONFIG_PACKAGE_kmod-input-gpio-keys is not set
-# CONFIG_PACKAGE_kmod-input-joydev is not set
-# CONFIG_PACKAGE_kmod-input-polldev is not set
-CONFIG_PACKAGE_kmod-ixp4xx-beeper=y
-# CONFIG_PACKAGE_kmod-leds-gpio is not set
-# CONFIG_PACKAGE_kmod-ledtrig-morse is not set
-# CONFIG_PACKAGE_kmod-ledtrig-netdev is not set
-# CONFIG_PACKAGE_kmod-mmc is not set
-# CONFIG_PACKAGE_kmod-mmc-over-gpio is not set
-# CONFIG_PACKAGE_kmod-pcspkr is not set
-# CONFIG_PACKAGE_kmod-softdog is not set
-# CONFIG_PACKAGE_kmod-ssb is not set
-# CONFIG_PACKAGE_kmod-textsearch is not set
-# CONFIG_PACKAGE_kmod-ucmb is not set
-# CONFIG_PACKAGE_kmod-zaptel14 is not set
-
-#
-# SPI Support
-#
-# CONFIG_PACKAGE_kmod-mmc-spi is not set
-# CONFIG_PACKAGE_kmod-spi-bitbang is not set
-# CONFIG_PACKAGE_kmod-spi-dev is not set
-# CONFIG_PACKAGE_kmod-spi-gpio is not set
-# CONFIG_PACKAGE_kmod-spi-gpio-old is not set
-# CONFIG_PACKAGE_kmod-spi-ks8995 is not set
-
-#
-# Sound Support
-#
-CONFIG_PACKAGE_kmod-sound-core=m
-# CONFIG_PACKAGE_kmod-sound-cs5535audio is not set
-# CONFIG_PACKAGE_kmod-sound-i8x0 is not set
-# CONFIG_PACKAGE_kmod-sound-soc-core is not set
-
-#
-# USB Support
-#
-CONFIG_PACKAGE_kmod-usb-core=y
-# CONFIG_PACKAGE_kmod-usb-acm is not set
-# CONFIG_PACKAGE_kmod-usb-atm is not set
-CONFIG_PACKAGE_kmod-usb-audio=m
-# CONFIG_PACKAGE_kmod-usb-cm109 is not set
-# CONFIG_PACKAGE_kmod-usb-hid is not set
-# CONFIG_PACKAGE_kmod-usb-net is not set
-CONFIG_PACKAGE_kmod-usb-ohci=y
-# CONFIG_PACKAGE_kmod-usb-phidget is not set
-CONFIG_PACKAGE_kmod-usb-printer=m
-CONFIG_PACKAGE_kmod-usb-serial=m
-# CONFIG_PACKAGE_kmod-usb-serial-airprime is not set
-# CONFIG_PACKAGE_kmod-usb-serial-ark3116 is not set
-# CONFIG_PACKAGE_kmod-usb-serial-belkin is not set
-# CONFIG_PACKAGE_kmod-usb-serial-ch341 is not set
-CONFIG_PACKAGE_kmod-usb-serial-cp210x=m
-CONFIG_PACKAGE_kmod-usb-serial-ftdi=m
-# CONFIG_PACKAGE_kmod-usb-serial-keyspan is not set
-# CONFIG_PACKAGE_kmod-usb-serial-mct is not set
-# CONFIG_PACKAGE_kmod-usb-serial-motorola-phone is not set
-# CONFIG_PACKAGE_kmod-usb-serial-option is not set
-CONFIG_PACKAGE_kmod-usb-serial-oti6858=m
-CONFIG_PACKAGE_kmod-usb-serial-pl2303=m
-# CONFIG_PACKAGE_kmod-usb-serial-sierrawireless is not set
-# CONFIG_PACKAGE_kmod-usb-serial-visor is not set
-CONFIG_PACKAGE_kmod-usb-storage=y
-# CONFIG_PACKAGE_kmod-usb-test is not set
-CONFIG_PACKAGE_kmod-usb-uhci=m
-# CONFIG_PACKAGE_kmod-usb-video is not set
-# CONFIG_PACKAGE_kmod-usb-yealink is not set
-CONFIG_PACKAGE_kmod-usb2=y
-
-#
-# Video Support
-#
-CONFIG_PACKAGE_kmod-video-core=m
-# CONFIG_PACKAGE_kmod-video-cpia2 is not set
-CONFIG_PACKAGE_kmod-video-gspca-core=m
-CONFIG_PACKAGE_kmod-video-gspca-conex=m
-CONFIG_PACKAGE_kmod-video-gspca-etoms=m
-CONFIG_PACKAGE_kmod-video-gspca-finepix=m
-CONFIG_PACKAGE_kmod-video-gspca-gl860=m
-CONFIG_PACKAGE_kmod-video-gspca-jeilinj=m
-CONFIG_PACKAGE_kmod-video-gspca-m5602=m
-CONFIG_PACKAGE_kmod-video-gspca-mars=m
-CONFIG_PACKAGE_kmod-video-gspca-mr97310a=m
-CONFIG_PACKAGE_kmod-video-gspca-ov519=m
-CONFIG_PACKAGE_kmod-video-gspca-ov534=m
-CONFIG_PACKAGE_kmod-video-gspca-pac207=m
-CONFIG_PACKAGE_kmod-video-gspca-pac7311=m
-CONFIG_PACKAGE_kmod-video-gspca-sonixb=m
-CONFIG_PACKAGE_kmod-video-gspca-sonixj=m
-CONFIG_PACKAGE_kmod-video-gspca-spca500=m
-CONFIG_PACKAGE_kmod-video-gspca-spca501=m
-CONFIG_PACKAGE_kmod-video-gspca-spca505=m
-CONFIG_PACKAGE_kmod-video-gspca-spca506=m
-CONFIG_PACKAGE_kmod-video-gspca-spca508=m
-CONFIG_PACKAGE_kmod-video-gspca-spca561=m
-CONFIG_PACKAGE_kmod-video-gspca-sq905=m
-CONFIG_PACKAGE_kmod-video-gspca-sq905c=m
-CONFIG_PACKAGE_kmod-video-gspca-stk014=m
-CONFIG_PACKAGE_kmod-video-gspca-stv06xx=m
-CONFIG_PACKAGE_kmod-video-gspca-sunplus=m
-CONFIG_PACKAGE_kmod-video-gspca-t613=m
-CONFIG_PACKAGE_kmod-video-gspca-tv8532=m
-CONFIG_PACKAGE_kmod-video-gspca-vc032x=m
-CONFIG_PACKAGE_kmod-video-gspca-zc3xx=m
-# CONFIG_PACKAGE_kmod-video-konica is not set
-# CONFIG_PACKAGE_kmod-video-ov511 is not set
-# CONFIG_PACKAGE_kmod-video-ovcamchip is not set
-CONFIG_PACKAGE_kmod-video-pwc=m
-# CONFIG_PACKAGE_kmod-video-sn9c102 is not set
-CONFIG_PACKAGE_kmod-video-uvc=m
-
-#
-# W1 support
-#
-# CONFIG_PACKAGE_kmod-w1 is not set
-
-#
-# Wireless Drivers
-#
-# CONFIG_PACKAGE_kmod-acx-mac80211 is not set
-# CONFIG_PACKAGE_kmod-ar9170 is not set
-# CONFIG_PACKAGE_kmod-ath is not set
-# CONFIG_PACKAGE_kmod-ath5k is not set
-# CONFIG_PACKAGE_kmod-ath9k is not set
-# CONFIG_PACKAGE_kmod-b43 is not set
-# CONFIG_PACKAGE_kmod-b43legacy is not set
-# CONFIG_PACKAGE_kmod-carl9170 is not set
-# CONFIG_PACKAGE_kmod-cfg80211 is not set
-# CONFIG_PACKAGE_kmod-hostap is not set
-# CONFIG_PACKAGE_kmod-lib80211 is not set
-# CONFIG_PACKAGE_kmod-libertas is not set
-# CONFIG_PACKAGE_kmod-mac80211 is not set
-# CONFIG_PACKAGE_kmod-mac80211-hwsim is not set
-# CONFIG_PACKAGE_kmod-madwifi is not set
-# CONFIG_PACKAGE_kmod-net-airo is not set
-# CONFIG_PACKAGE_kmod-net-hermes is not set
-# CONFIG_PACKAGE_kmod-net-hermes-pci is not set
-# CONFIG_PACKAGE_kmod-net-hermes-plx is not set
-# CONFIG_PACKAGE_kmod-net-ipw2100 is not set
-# CONFIG_PACKAGE_kmod-net-ipw2200 is not set
-# CONFIG_PACKAGE_kmod-net-libipw is not set
-# CONFIG_PACKAGE_kmod-net-prism54 is not set
-# CONFIG_PACKAGE_kmod-p54-common is not set
-# CONFIG_PACKAGE_kmod-p54-pci is not set
-# CONFIG_PACKAGE_kmod-p54-usb is not set
-# CONFIG_PACKAGE_kmod-rt2400-pci is not set
-# CONFIG_PACKAGE_kmod-rt2500-pci is not set
-# CONFIG_PACKAGE_kmod-rt2500-usb is not set
-# CONFIG_PACKAGE_kmod-rt2800-lib is not set
-# CONFIG_PACKAGE_kmod-rt2800-pci is not set
-# CONFIG_PACKAGE_kmod-rt2800-usb is not set
-# CONFIG_PACKAGE_kmod-rt2x00-lib is not set
-# CONFIG_PACKAGE_kmod-rt2x00-pci is not set
-# CONFIG_PACKAGE_kmod-rt2x00-usb is not set
-# CONFIG_PACKAGE_kmod-rt61-pci is not set
-# CONFIG_PACKAGE_kmod-rt73-usb is not set
-# CONFIG_PACKAGE_kmod-rtl8180 is not set
-# CONFIG_PACKAGE_kmod-rtl8187 is not set
-# CONFIG_PACKAGE_kmod-zd1211rw is not set
-
-#
-# Xen paravirtualized guest support
-#
-
-#
-# Boot Loaders
-#
-CONFIG_PACKAGE_apex=y
-
-#
-# Multimedia
-#
-# CONFIG_PACKAGE_GraphicsMagick is not set
-# CONFIG_PACKAGE_GraphicsMagick-jpeg is not set
-# CONFIG_PACKAGE_ffmpeg is not set
-# CONFIG_PACKAGE_ffserver is not set
-# CONFIG_PACKAGE_ftpd-topfield is not set
-# CONFIG_PACKAGE_gphoto2 is not set
-# CONFIG_PACKAGE_gst-plugins-base-alsa is not set
-# CONFIG_PACKAGE_gst-plugins-base-app is not set
-# CONFIG_PACKAGE_gst-plugins-base-audioconvert is not set
-# CONFIG_PACKAGE_gst-plugins-base-decodebin is not set
-# CONFIG_PACKAGE_gst-plugins-base-gio is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstapp is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstaudio is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstcdda is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstfft is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstinterfaces is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstnetbuffer is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstpbutils is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstriff is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstrtp is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstrtsp is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstsdp is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgsttag is not set
-# CONFIG_PACKAGE_gst-plugins-base-libgstvideo is not set
-# CONFIG_PACKAGE_gst-plugins-base-ogg is not set
-# CONFIG_PACKAGE_gst-plugins-base-theora is not set
-# CONFIG_PACKAGE_gst-plugins-base-typefindfunctions is not set
-# CONFIG_PACKAGE_gst-plugins-base-vorbis is not set
-# CONFIG_PACKAGE_gst-plugins-good-id3demux is not set
-# CONFIG_PACKAGE_gst-plugins-ugly-lame is not set
-# CONFIG_PACKAGE_gst-plugins-ugly-mad is not set
-# CONFIG_PACKAGE_gstreamer is not set
-# CONFIG_PACKAGE_gstreamer-libgstcheck is not set
-# CONFIG_PACKAGE_gstreamer-libgstcontroller is not set
-# CONFIG_PACKAGE_gstreamer-libgstdataprotocol is not set
-# CONFIG_PACKAGE_gstreamer-libgstnet is not set
-# CONFIG_PACKAGE_hasciicam is not set
-# CONFIG_PACKAGE_kissdx is not set
-CONFIG_PACKAGE_mjpg-streamer=m
-# CONFIG_PACKAGE_motion is not set
-# CONFIG_PACKAGE_palantir is not set
-# CONFIG_PACKAGE_peercast is not set
-# CONFIG_PACKAGE_puppy is not set
-CONFIG_PACKAGE_spcacat=m
-# CONFIG_PACKAGE_streamripper is not set
-# CONFIG_PACKAGE_ushare is not set
-
-#
-# Administration
-#
-
-#
-# webif
-#
-# CONFIG_PACKAGE_webif is not set
-# CONFIG_PACKAGE_webif-applications is not set
-# CONFIG_PACKAGE_webif-batman is not set
-# CONFIG_PACKAGE_webif-fonheartbeat is not set
-# CONFIG_PACKAGE_webif-freeloader is not set
-# CONFIG_PACKAGE_webif-freeloader-lang-cs is not set
-# CONFIG_PACKAGE_webif-hotspot is not set
-# CONFIG_PACKAGE_webif-iw-lua is not set
-# CONFIG_PACKAGE_webif-iw-lua-coovachilli is not set
-# CONFIG_PACKAGE_webif-iw-lua-freeradius is not set
-# CONFIG_PACKAGE_webif-iw-lua-mesh-hotspot-freeradius is not set
-# CONFIG_PACKAGE_webif-iw-lua-mroute is not set
-# CONFIG_PACKAGE_webif-iw-lua-olsr is not set
-# CONFIG_PACKAGE_webif-lang-ca is not set
-# CONFIG_PACKAGE_webif-lang-cs is not set
-# CONFIG_PACKAGE_webif-lang-da is not set
-# CONFIG_PACKAGE_webif-lang-de is not set
-# CONFIG_PACKAGE_webif-lang-ee is not set
-# CONFIG_PACKAGE_webif-lang-es is not set
-# CONFIG_PACKAGE_webif-lang-fr is not set
-# CONFIG_PACKAGE_webif-lang-hr is not set
-# CONFIG_PACKAGE_webif-lang-hu is not set
-# CONFIG_PACKAGE_webif-lang-it is not set
-# CONFIG_PACKAGE_webif-lang-nl is not set
-# CONFIG_PACKAGE_webif-lang-no is not set
-# CONFIG_PACKAGE_webif-lang-pl is not set
-# CONFIG_PACKAGE_webif-lang-pt is not set
-# CONFIG_PACKAGE_webif-lang-ru is not set
-# CONFIG_PACKAGE_webif-lang-sq is not set
-# CONFIG_PACKAGE_webif-lang-sv is not set
-# CONFIG_PACKAGE_webif-lang-uk is not set
-# CONFIG_PACKAGE_webif-lang-zh is not set
-# CONFIG_PACKAGE_webif-mesh is not set
-# CONFIG_PACKAGE_webif-netsukuku is not set
-# CONFIG_PACKAGE_webif-theme-clubman is not set
-# CONFIG_PACKAGE_webif-theme-sedky1 is not set
-# CONFIG_PACKAGE_webif-theme-xwrt is not set
-# CONFIG_PACKAGE_webif-theme-xwrt-mini is not set
-# CONFIG_PACKAGE_webif-theme-zephyr is not set
-# CONFIG_PACKAGE_webif-vpn is not set
-
-#
-# zabbix
-#
-# CONFIG_PACKAGE_zabbix-agent is not set
-# CONFIG_PACKAGE_zabbix-sender is not set
-# CONFIG_PACKAGE_zabbix-server is not set
-# CONFIG_PACKAGE_gkrellmd is not set
-# CONFIG_PACKAGE_htop is not set
-# CONFIG_PACKAGE_monit is not set
-# CONFIG_PACKAGE_monit-nossl is not set
-# CONFIG_PACKAGE_muninlite is not set
-# CONFIG_PACKAGE_osirisd is not set
-# CONFIG_PACKAGE_sudo is not set
-# CONFIG_PACKAGE_syslog-ng is not set
-# CONFIG_PACKAGE_syslog-ng3 is not set
-
-#
-# Utilities
-#
-
-#
-# Editors
-#
-# CONFIG_PACKAGE_joe is not set
-# CONFIG_PACKAGE_mg is not set
-# CONFIG_PACKAGE_nano is not set
-# CONFIG_PACKAGE_vim is not set
-# CONFIG_PACKAGE_vim-full is not set
-# CONFIG_PACKAGE_vim-help is not set
-# CONFIG_PACKAGE_vim-runtime is not set
-# CONFIG_PACKAGE_zile is not set
-
-#
-# Filesystem
-#
-# CONFIG_PACKAGE_badblocks is not set
-# CONFIG_PACKAGE_blkid is not set
-# CONFIG_PACKAGE_cifsmount is not set
-# CONFIG_PACKAGE_dosfsck is not set
-# CONFIG_PACKAGE_dosfslabel is not set
-# CONFIG_PACKAGE_e2fsprogs is not set
-# CONFIG_PACKAGE_gadgetfs-test-bulk is not set
-# CONFIG_PACKAGE_gadgetfs-test-isoc is not set
-# CONFIG_PACKAGE_mkdosfs is not set
-# CONFIG_PACKAGE_nfs-utils is not set
-# CONFIG_PACKAGE_ntfs-3g is not set
-# CONFIG_PACKAGE_owshell is not set
-# CONFIG_PACKAGE_reiserfsprogs is not set
-# CONFIG_PACKAGE_resize2fs is not set
-# CONFIG_PACKAGE_sysfsutils is not set
-# CONFIG_PACKAGE_tune2fs is not set
-# CONFIG_PACKAGE_uuidgen is not set
-
-#
-# SSL
-#
-# CONFIG_PACKAGE_polarssl-progs is not set
-
-#
-# backup
-#
-# CONFIG_PACKAGE_rdiff-backup is not set
-
-#
-# compression
-#
-# CONFIG_PACKAGE_unzip is not set
-# CONFIG_PACKAGE_zip is not set
-
-#
-# database
-#
-# CONFIG_PACKAGE_pgsql-cli is not set
-# CONFIG_PACKAGE_pgsql-server is not set
-# CONFIG_PACKAGE_sqlite2-cli is not set
-# CONFIG_PACKAGE_sqlite3-cli is not set
-
-#
-# disc
-#
-# CONFIG_PACKAGE_block-extroot is not set
-CONFIG_EXTROOT_SETTLETIME=20
-# CONFIG_PACKAGE_cfdisk is not set
-# CONFIG_PACKAGE_devio is not set
-# CONFIG_PACKAGE_fdisk is not set
-# CONFIG_PACKAGE_hd-idle is not set
-# CONFIG_PACKAGE_hdparm is not set
-# CONFIG_PACKAGE_sdparm is not set
-# CONFIG_PACKAGE_sfdisk is not set
-CONFIG_PACKAGE_swap-utils=m
-
-#
-# filemanager
-#
-# CONFIG_PACKAGE_deco is not set
-# CONFIG_PACKAGE_mc is not set
-
-#
-# terminal
-#
-# CONFIG_PACKAGE_microcom is not set
-# CONFIG_PACKAGE_minicom is not set
-# CONFIG_PACKAGE_picocom is not set
-# CONFIG_PACKAGE_setserial is not set
-# CONFIG_PACKAGE_setterm is not set
-CONFIG_PACKAGE_alsa-utils=m
-# CONFIG_PACKAGE_alsa-utils-tests is not set
-# CONFIG_PACKAGE_anyremote is not set
-# CONFIG_PACKAGE_apcupsd is not set
-# CONFIG_PACKAGE_at is not set
-# CONFIG_PACKAGE_avrdude is not set
-# CONFIG_PACKAGE_avrusbboot is not set
-# CONFIG_PACKAGE_bandwidthd is not set
-# CONFIG_PACKAGE_bash is not set
-# CONFIG_PACKAGE_bash-completion is not set
-# CONFIG_PACKAGE_bc is not set
-# CONFIG_PACKAGE_bemusedlinuxserver is not set
-# CONFIG_PACKAGE_bluez-hcidump is not set
-# CONFIG_PACKAGE_bluez-utils is not set
-# CONFIG_PACKAGE_btrfs-progs is not set
-# CONFIG_PACKAGE_bzip2 is not set
-# CONFIG_PACKAGE_ccrypt is not set
-# CONFIG_PACKAGE_cdparanoia is not set
-# CONFIG_PACKAGE_certtool is not set
-# CONFIG_PACKAGE_cmdpad is not set
-CONFIG_PACKAGE_collectd=m
-# CONFIG_PACKAGE_collectd-mod-apache is not set
-# CONFIG_PACKAGE_collectd-mod-apcups is not set
-# CONFIG_PACKAGE_collectd-mod-ascent is not set
-# CONFIG_PACKAGE_collectd-mod-bind is not set
-# CONFIG_PACKAGE_collectd-mod-conntrack is not set
-# CONFIG_PACKAGE_collectd-mod-contextswitch is not set
-# CONFIG_PACKAGE_collectd-mod-cpu is not set
-# CONFIG_PACKAGE_collectd-mod-csv is not set
-# CONFIG_PACKAGE_collectd-mod-curl is not set
-# CONFIG_PACKAGE_collectd-mod-dbi is not set
-# CONFIG_PACKAGE_collectd-mod-df is not set
-# CONFIG_PACKAGE_collectd-mod-disk is not set
-# CONFIG_PACKAGE_collectd-mod-dns is not set
-# CONFIG_PACKAGE_collectd-mod-email is not set
-# CONFIG_PACKAGE_collectd-mod-exec is not set
-# CONFIG_PACKAGE_collectd-mod-filecount is not set
-# CONFIG_PACKAGE_collectd-mod-fscache is not set
-CONFIG_PACKAGE_collectd-mod-interface=m
-# CONFIG_PACKAGE_collectd-mod-iptables is not set
-# CONFIG_PACKAGE_collectd-mod-irq is not set
-CONFIG_PACKAGE_collectd-mod-load=m
-# CONFIG_PACKAGE_collectd-mod-logfile is not set
-# CONFIG_PACKAGE_collectd-mod-madwifi is not set
-# CONFIG_PACKAGE_collectd-mod-memory is not set
-# CONFIG_PACKAGE_collectd-mod-mysql is not set
-# CONFIG_PACKAGE_collectd-mod-netlink is not set
-# CONFIG_PACKAGE_collectd-mod-network is not set
-# CONFIG_PACKAGE_collectd-mod-nginx is not set
-# CONFIG_PACKAGE_collectd-mod-ntpd is not set
-# CONFIG_PACKAGE_collectd-mod-nut is not set
-# CONFIG_PACKAGE_collectd-mod-olsrd is not set
-# CONFIG_PACKAGE_collectd-mod-onewire is not set
-# CONFIG_PACKAGE_collectd-mod-openvpn is not set
-# CONFIG_PACKAGE_collectd-mod-ping is not set
-# CONFIG_PACKAGE_collectd-mod-postgresql is not set
-# CONFIG_PACKAGE_collectd-mod-powerdns is not set
-# CONFIG_PACKAGE_collectd-mod-processes is not set
-# CONFIG_PACKAGE_collectd-mod-protocols is not set
-CONFIG_PACKAGE_collectd-mod-rrdtool=m
-# CONFIG_PACKAGE_collectd-mod-sensors is not set
-# CONFIG_PACKAGE_collectd-mod-snmp is not set
-# CONFIG_PACKAGE_collectd-mod-syslog is not set
-# CONFIG_PACKAGE_collectd-mod-table is not set
-# CONFIG_PACKAGE_collectd-mod-tail is not set
-# CONFIG_PACKAGE_collectd-mod-tcpconns is not set
-# CONFIG_PACKAGE_collectd-mod-teamspeak2 is not set
-# CONFIG_PACKAGE_collectd-mod-ted is not set
-# CONFIG_PACKAGE_collectd-mod-thermal is not set
-# CONFIG_PACKAGE_collectd-mod-unixsock is not set
-# CONFIG_PACKAGE_collectd-mod-uptime is not set
-# CONFIG_PACKAGE_collectd-mod-users is not set
-# CONFIG_PACKAGE_collectd-mod-vmem is not set
-CONFIG_PACKAGE_collectd-mod-wireless=m
-# CONFIG_PACKAGE_collectd-mod-write_http is not set
-# CONFIG_PACKAGE_coreutils is not set
-# CONFIG_PACKAGE_crypto-tools is not set
-# CONFIG_PACKAGE_daemontools is not set
-CONFIG_PACKAGE_dbus=m
-# CONFIG_PACKAGE_dbus-launch-x is not set
-# CONFIG_PACKAGE_dbus-utils is not set
-# CONFIG_PACKAGE_dfu-util is not set
-# CONFIG_PACKAGE_dialog is not set
-# CONFIG_PACKAGE_digitemp is not set
-# CONFIG_PACKAGE_digitemp-usb is not set
-# CONFIG_PACKAGE_dir300-flash is not set
-CONFIG_PACKAGE_dropbearconvert=m
-# CONFIG_PACKAGE_dt is not set
-# CONFIG_PACKAGE_dtach is not set
-# CONFIG_PACKAGE_empty is not set
-# CONFIG_PACKAGE_event_test is not set
-CONFIG_PACKAGE_fconfig=y
-# CONFIG_PACKAGE_file is not set
-# CONFIG_PACKAGE_firmwarehotplug is not set
-# CONFIG_PACKAGE_flock is not set
-# CONFIG_PACKAGE_fortune-mod is not set
-# CONFIG_PACKAGE_fxload is not set
-# CONFIG_PACKAGE_gconf2 is not set
-# CONFIG_PACKAGE_gdb is not set
-# CONFIG_PACKAGE_gdbserver is not set
-# CONFIG_PACKAGE_gnokii is not set
-# CONFIG_PACKAGE_gnupg is not set
-# CONFIG_PACKAGE_gnutls-utils is not set
-# CONFIG_PACKAGE_gpioctl is not set
-# CONFIG_PACKAGE_gsm-utils is not set
-# CONFIG_PACKAGE_gzip is not set
-# CONFIG_PACKAGE_haserl is not set
-# CONFIG_PACKAGE_heyu is not set
-# CONFIG_PACKAGE_hplip is not set
-# CONFIG_PACKAGE_huaweiaktbbo is not set
-# CONFIG_PACKAGE_hwclock is not set
-# CONFIG_PACKAGE_i2c-tools is not set
-# CONFIG_PACKAGE_iconv is not set
-# CONFIG_PACKAGE_ink is not set
-# CONFIG_PACKAGE_input-utils is not set
-# CONFIG_PACKAGE_io is not set
-# CONFIG_PACKAGE_ipmitool is not set
-# CONFIG_PACKAGE_jpeg-tools is not set
-# CONFIG_PACKAGE_kexec-tools is not set
-CONFIG_KEXEC_TOOLS_TARGET_NAME="armeb"
-# CONFIG_PACKAGE_kmemtrace-user is not set
-# CONFIG_PACKAGE_lcd4linux is not set
-# CONFIG_PACKAGE_ldconfig is not set
-# CONFIG_PACKAGE_ldd is not set
-# CONFIG_PACKAGE_lirc is not set
-# CONFIG_PACKAGE_logrotate is not set
-# CONFIG_PACKAGE_losetup is not set
-# CONFIG_PACKAGE_lrzsz is not set
-CONFIG_PACKAGE_lsof=m
-# CONFIG_PACKAGE_macchanger is not set
-# CONFIG_PACKAGE_mdadm is not set
-# CONFIG_PACKAGE_memtester is not set
-# CONFIG_PACKAGE_mgetty is not set
-# CONFIG_PACKAGE_mount-utils is not set
-# CONFIG_PACKAGE_mountd is not set
-# CONFIG_PACKAGE_mtd-utils is not set
-# CONFIG_PACKAGE_nfc-tools is not set
-# CONFIG_PACKAGE_nprobe is not set
-# CONFIG_PACKAGE_ocf-crypto-headers is not set
-# CONFIG_PACKAGE_openldap-utils is not set
-# CONFIG_PACKAGE_openssl-util is not set
-# CONFIG_PACKAGE_pciutils is not set
-# CONFIG_PACKAGE_pcscd is not set
-# CONFIG_PACKAGE_pipacs is not set
-# CONFIG_PACKAGE_procps is not set
-# CONFIG_PACKAGE_psplash is not set
-# CONFIG_PACKAGE_pv is not set
-# CONFIG_PACKAGE_pwgen is not set
-# CONFIG_PACKAGE_qc-usb-utils is not set
-# CONFIG_PACKAGE_rcs is not set
-# CONFIG_PACKAGE_robocfg is not set
-CONFIG_PACKAGE_rrdcgi=m
-CONFIG_PACKAGE_rrdcgi1=m
-CONFIG_PACKAGE_rrdcollect=m
-# CONFIG_PACKAGE_rrdcollect-example is not set
-CONFIG_PACKAGE_rrdtool=m
-CONFIG_PACKAGE_rrdtool1=m
-# CONFIG_PACKAGE_sane-backends is not set
-# CONFIG_PACKAGE_sane-frontends is not set
-# CONFIG_PACKAGE_schedtool is not set
-# CONFIG_PACKAGE_scponly is not set
-CONFIG_PACKAGE_screen=m
-# CONFIG_PACKAGE_setpwc is not set
-# CONFIG_PACKAGE_sg3-utils is not set
-# CONFIG_PACKAGE_sispmctl is not set
-# CONFIG_PACKAGE_smartmontools is not set
-# CONFIG_PACKAGE_spidev-test is not set
-# CONFIG_PACKAGE_ssldump is not set
-# CONFIG_PACKAGE_strace is not set
-# CONFIG_PACKAGE_stress is not set
-# CONFIG_PACKAGE_sysstat is not set
-# CONFIG_PACKAGE_tar is not set
-# CONFIG_PACKAGE_tcpser is not set
-# CONFIG_PACKAGE_testusb is not set
-# CONFIG_PACKAGE_tiff-utils is not set
-# CONFIG_PACKAGE_tmux is not set
-# CONFIG_PACKAGE_uboot-envtools is not set
-# CONFIG_PACKAGE_ucmb-tools is not set
-# CONFIG_PACKAGE_unrar is not set
-# CONFIG_PACKAGE_usb-modeswitch is not set
-CONFIG_PACKAGE_usbutils=m
-# CONFIG_PACKAGE_wx200d is not set
-# CONFIG_PACKAGE_xsltproc is not set
-# CONFIG_PACKAGE_zaptel14-util is not set
-
-#
-# Extra packages
-#
-# CONFIG_PACKAGE_krb5-apps is not set
-# CONFIG_PACKAGE_krb5-client is not set
-# CONFIG_PACKAGE_krb5-daemons is not set
-# CONFIG_PACKAGE_krb5-libs is not set
-# CONFIG_PACKAGE_krb5-server is not set
-# CONFIG_PACKAGE_libdmapsharing is not set
-# CONFIG_PACKAGE_zoneinfo-africa is not set
-# CONFIG_PACKAGE_zoneinfo-asia is not set
-# CONFIG_PACKAGE_zoneinfo-atlantic is not set
-# CONFIG_PACKAGE_zoneinfo-australia-nz is not set
-# CONFIG_PACKAGE_zoneinfo-core is not set
-# CONFIG_PACKAGE_zoneinfo-europe is not set
-# CONFIG_PACKAGE_zoneinfo-india is not set
-# CONFIG_PACKAGE_zoneinfo-middleeast is not set
-# CONFIG_PACKAGE_zoneinfo-northamerica is not set
-# CONFIG_PACKAGE_zoneinfo-pacific is not set
-# CONFIG_PACKAGE_zoneinfo-poles is not set
-# CONFIG_PACKAGE_zoneinfo-simple is not set
-# CONFIG_PACKAGE_zoneinfo-southamerica is not set
-
-#
-# Sound
-#
-# CONFIG_PACKAGE_empcd is not set
-# CONFIG_PACKAGE_faad2 is not set
-CONFIG_PACKAGE_flite=m
-# CONFIG_PACKAGE_ices is not set
-# CONFIG_PACKAGE_lame is not set
-# CONFIG_PACKAGE_lame-lib is not set
-CONFIG_PACKAGE_madplay=m
-# CONFIG_PACKAGE_mpc is not set
-# CONFIG_PACKAGE_mpd is not set
-# CONFIG_PACKAGE_mpdas is not set
-# CONFIG_PACKAGE_mt-daapd is not set
-CONFIG_PACKAGE_pulseaudio=m
-# CONFIG_PACKAGE_scmpc is not set
-# CONFIG_PACKAGE_shell-fm is not set
-# CONFIG_PACKAGE_sox is not set
-
-#
-# Development
-#
-# CONFIG_PACKAGE_binutils is not set
-# CONFIG_PACKAGE_diffutils is not set
-# CONFIG_PACKAGE_make is not set
-# CONFIG_PACKAGE_objdump is not set
-# CONFIG_PACKAGE_patch is not set
-
-#
-# Emulators
-#
-
-#
-# Languages
-#
-
-#
-# Erlang
-#
-# CONFIG_PACKAGE_erlang is not set
-# CONFIG_PACKAGE_erlang-asn1 is not set
-# CONFIG_PACKAGE_erlang-compiler is not set
-# CONFIG_PACKAGE_erlang-crypto is not set
-# CONFIG_PACKAGE_erlang-hipe is not set
-# CONFIG_PACKAGE_erlang-inets is not set
-# CONFIG_PACKAGE_erlang-mnesia is not set
-# CONFIG_PACKAGE_erlang-runtime-tools is not set
-# CONFIG_PACKAGE_erlang-snmp is not set
-# CONFIG_PACKAGE_erlang-ssh is not set
-# CONFIG_PACKAGE_erlang-ssl is not set
-# CONFIG_PACKAGE_erlang-syntax-tools is not set
-
-#
-# Java
-#
-# CONFIG_PACKAGE_jamvm is not set
-# CONFIG_PACKAGE_sablevm is not set
-# CONFIG_PACKAGE_sablevm-mini is not set
-
-#
-# JavaScript
-#
-# CONFIG_PACKAGE_js is not set
-
-#
-# Lua
-#
-# CONFIG_PACKAGE_lsqlite3 is not set
-CONFIG_PACKAGE_lua=y
-# CONFIG_PACKAGE_lua-examples is not set
-# CONFIG_PACKAGE_luac is not set
-CONFIG_PACKAGE_luaexpat=m
-CONFIG_PACKAGE_luafilesystem=m
-# CONFIG_PACKAGE_luaprofiler is not set
-# CONFIG_PACKAGE_luasec is not set
-CONFIG_PACKAGE_luasocket=y
-CONFIG_PACKAGE_luaunixsocket=m
-
-#
-# PHP
-#
-# CONFIG_PACKAGE_php-pear is not set
-# CONFIG_PACKAGE_php4 is not set
-# CONFIG_PACKAGE_php5 is not set
-
-#
-# Perl
-#
-# CONFIG_PACKAGE_microperl is not set
-# CONFIG_PACKAGE_perl is not set
-
-#
-# Python
-#
-# CONFIG_PACKAGE_cython is not set
-# CONFIG_PACKAGE_dbus-python is not set
-# CONFIG_PACKAGE_gst-python is not set
-# CONFIG_PACKAGE_ipython is not set
-# CONFIG_PACKAGE_libyaml is not set
-# CONFIG_PACKAGE_logilab-astng is not set
-# CONFIG_PACKAGE_logilab-common is not set
-# CONFIG_PACKAGE_pycairo is not set
-# CONFIG_PACKAGE_pyserial is not set
-# CONFIG_PACKAGE_python is not set
-# CONFIG_PACKAGE_python-bluez is not set
-# CONFIG_PACKAGE_python-crypto is not set
-# CONFIG_PACKAGE_python-doc is not set
-# CONFIG_PACKAGE_python-egenix-mx is not set
-# CONFIG_PACKAGE_python-event is not set
-# CONFIG_PACKAGE_python-expat is not set
-# CONFIG_PACKAGE_python-gdbm is not set
-# CONFIG_PACKAGE_python-gobject is not set
-# CONFIG_PACKAGE_python-gtk is not set
-# CONFIG_PACKAGE_python-hippo-canvas is not set
-# CONFIG_PACKAGE_python-kid is not set
-# CONFIG_PACKAGE_python-mini is not set
-# CONFIG_PACKAGE_python-mysql is not set
-# CONFIG_PACKAGE_python-openssl is not set
-# CONFIG_PACKAGE_python-pcap is not set
-# CONFIG_PACKAGE_python-psycopg is not set
-# CONFIG_PACKAGE_python-rrd is not set
-# CONFIG_PACKAGE_python-sqlite is not set
-# CONFIG_PACKAGE_python-sqlite3 is not set
-# CONFIG_PACKAGE_python-vte is not set
-# CONFIG_PACKAGE_python-xapian is not set
-# CONFIG_PACKAGE_python-yapsnmp is not set
-# CONFIG_PACKAGE_pyyaml is not set
-# CONFIG_PACKAGE_telepathy-python is not set
-# CONFIG_PACKAGE_twisted is not set
-# CONFIG_PACKAGE_zope-interface is not set
-
-#
-# Ruby
-#
-# CONFIG_PACKAGE_ruby is not set
-# CONFIG_PACKAGE_eggdrop is not set
-# CONFIG_PACKAGE_tcl is not set
-# CONFIG_PACKAGE_urbi is not set
-
-#
-# Mail
-#
-# CONFIG_PACKAGE_dovecot is not set
-# CONFIG_PACKAGE_fetchmail is not set
-# CONFIG_PACKAGE_imapfilter is not set
-# CONFIG_PACKAGE_mini-sendmail is not set
-# CONFIG_PACKAGE_msmtp is not set
-# CONFIG_PACKAGE_msmtp-nossl is not set
-# CONFIG_PACKAGE_mutt is not set
-# CONFIG_PACKAGE_nullmailer is not set
-# CONFIG_PACKAGE_procmail is not set
-# CONFIG_PACKAGE_ssmtp is not set
-# CONFIG_PACKAGE_xmail is not set
-
-#
-# Xorg
-#
-
-#
-# app
-#
-# CONFIG_PACKAGE_dillo is not set
-# CONFIG_PACKAGE_gtkhtml is not set
-# CONFIG_PACKAGE_gtkperf is not set
-# CONFIG_PACKAGE_iceauth is not set
-# CONFIG_PACKAGE_qwo is not set
-# CONFIG_PACKAGE_rxvt is not set
-# CONFIG_PACKAGE_smproxy is not set
-# CONFIG_PACKAGE_x11perf is not set
-# CONFIG_PACKAGE_xauth is not set
-# CONFIG_PACKAGE_xcalc is not set
-# CONFIG_PACKAGE_xclipboard is not set
-# CONFIG_PACKAGE_xdm is not set
-# CONFIG_PACKAGE_xeyes is not set
-# CONFIG_PACKAGE_xine-ui is not set
-# CONFIG_PACKAGE_xinit is not set
-# CONFIG_PACKAGE_xkbcomp is not set
-# CONFIG_PACKAGE_xmessage is not set
-# CONFIG_PACKAGE_xrandr is not set
-# CONFIG_PACKAGE_xrdb is not set
-# CONFIG_PACKAGE_xset is not set
-# CONFIG_PACKAGE_xsetroot is not set
-# CONFIG_PACKAGE_xwd is not set
-
-#
-# data
-#
-# CONFIG_PACKAGE_xbitmaps is not set
-# CONFIG_PACKAGE_xkbdata is not set
-
-#
-# driver
-#
-
-#
-# font
-#
-# CONFIG_PACKAGE_liberation-fonts-ttf is not set
-
-#
-# font-utils
-#
-# CONFIG_PACKAGE_fontconfig is not set
-
-#
-# framework
-#
-# CONFIG_PACKAGE_fltk2 is not set
-# CONFIG_PACKAGE_gtk1 is not set
-# CONFIG_PACKAGE_gtk2 is not set
-# CONFIG_PACKAGE_gtkmm is not set
-
-#
-# libraries
-#
-# CONFIG_PACKAGE_atk is not set
-# CONFIG_PACKAGE_cairo is not set
-# CONFIG_PACKAGE_cairomm is not set
-# CONFIG_PACKAGE_hippo-canvas is not set
-# CONFIG_PACKAGE_imlib2 is not set
-# CONFIG_PACKAGE_libICE is not set
-# CONFIG_PACKAGE_libSM is not set
-# CONFIG_PACKAGE_libX11 is not set
-# CONFIG_PACKAGE_libXau is not set
-# CONFIG_PACKAGE_libXaw is not set
-# CONFIG_PACKAGE_libXcomposite is not set
-# CONFIG_PACKAGE_libXcursor is not set
-# CONFIG_PACKAGE_libXdamage is not set
-# CONFIG_PACKAGE_libXdmcp is not set
-# CONFIG_PACKAGE_libXext is not set
-# CONFIG_PACKAGE_libXfixes is not set
-# CONFIG_PACKAGE_libXfont is not set
-# CONFIG_PACKAGE_libXft is not set
-# CONFIG_PACKAGE_libXi is not set
-# CONFIG_PACKAGE_libXmu is not set
-# CONFIG_PACKAGE_libXmuu is not set
-# CONFIG_PACKAGE_libXpm is not set
-# CONFIG_PACKAGE_libXrandr is not set
-# CONFIG_PACKAGE_libXrender is not set
-# CONFIG_PACKAGE_libXt is not set
-# CONFIG_PACKAGE_libXtst is not set
-# CONFIG_PACKAGE_libXv is not set
-# CONFIG_PACKAGE_libXvMC is not set
-# CONFIG_PACKAGE_libXxf86vm is not set
-# CONFIG_PACKAGE_libast is not set
-# CONFIG_PACKAGE_libdrm is not set
-# CONFIG_PACKAGE_libfontenc is not set
-# CONFIG_PACKAGE_libgl-mesa is not set
-# CONFIG_PACKAGE_libglu-mesa is not set
-# CONFIG_PACKAGE_libmatchbox is not set
-# CONFIG_PACKAGE_libpciaccess is not set
-# CONFIG_PACKAGE_librsvg is not set
-# CONFIG_PACKAGE_libwnck is not set
-# CONFIG_PACKAGE_libxcb is not set
-# CONFIG_PACKAGE_libxcb-composite is not set
-# CONFIG_PACKAGE_libxcb-damage is not set
-# CONFIG_PACKAGE_libxcb-dpms is not set
-# CONFIG_PACKAGE_libxcb-glx is not set
-# CONFIG_PACKAGE_libxcb-randr is not set
-# CONFIG_PACKAGE_libxcb-record is not set
-# CONFIG_PACKAGE_libxcb-render is not set
-# CONFIG_PACKAGE_libxcb-res is not set
-# CONFIG_PACKAGE_libxcb-screensaver is not set
-# CONFIG_PACKAGE_libxcb-shape is not set
-# CONFIG_PACKAGE_libxcb-shm is not set
-# CONFIG_PACKAGE_libxcb-sync is not set
-# CONFIG_PACKAGE_libxcb-xevie is not set
-# CONFIG_PACKAGE_libxcb-xf86dri is not set
-# CONFIG_PACKAGE_libxcb-xfixes is not set
-# CONFIG_PACKAGE_libxcb-xinerama is not set
-# CONFIG_PACKAGE_libxcb-xlib is not set
-# CONFIG_PACKAGE_libxcb-xprint is not set
-# CONFIG_PACKAGE_libxcb-xtest is not set
-# CONFIG_PACKAGE_libxcb-xv is not set
-# CONFIG_PACKAGE_libxcb-xvmc is not set
-# CONFIG_PACKAGE_libxkbfile is not set
-# CONFIG_PACKAGE_orbit2 is not set
-# CONFIG_PACKAGE_pango is not set
-# CONFIG_PACKAGE_pangomm is not set
-# CONFIG_PACKAGE_pixman is not set
-# CONFIG_PACKAGE_tslib is not set
-# CONFIG_PACKAGE_vte is not set
-# CONFIG_PACKAGE_xine-lib is not set
-# CONFIG_PACKAGE_xtrans is not set
-
-#
-# proto
-#
-# CONFIG_PACKAGE_applewmproto is not set
-# CONFIG_PACKAGE_bigreqsproto is not set
-# CONFIG_PACKAGE_calibrateproto is not set
-# CONFIG_PACKAGE_compositeproto is not set
-# CONFIG_PACKAGE_damageproto is not set
-# CONFIG_PACKAGE_dmxproto is not set
-# CONFIG_PACKAGE_dri2proto is not set
-# CONFIG_PACKAGE_fixesproto is not set
-# CONFIG_PACKAGE_fontcacheproto is not set
-# CONFIG_PACKAGE_fontsproto is not set
-# CONFIG_PACKAGE_glproto is not set
-# CONFIG_PACKAGE_inputproto is not set
-# CONFIG_PACKAGE_kbproto is not set
-# CONFIG_PACKAGE_printproto is not set
-# CONFIG_PACKAGE_randrproto is not set
-# CONFIG_PACKAGE_recordproto is not set
-# CONFIG_PACKAGE_renderproto is not set
-# CONFIG_PACKAGE_resourceproto is not set
-# CONFIG_PACKAGE_scrnsaverproto is not set
-# CONFIG_PACKAGE_videoproto is not set
-# CONFIG_PACKAGE_windowswmproto is not set
-# CONFIG_PACKAGE_xcmiscproto is not set
-# CONFIG_PACKAGE_xextproto is not set
-# CONFIG_PACKAGE_xf86bigfontproto is not set
-# CONFIG_PACKAGE_xf86dgaproto is not set
-# CONFIG_PACKAGE_xf86driproto is not set
-# CONFIG_PACKAGE_xf86vidmodeproto is not set
-# CONFIG_PACKAGE_xineramaproto is not set
-# CONFIG_PACKAGE_xproto is not set
-
-#
-# server
-#
-# CONFIG_PACKAGE_xserver-common is not set
-
-#
-# terminals
-#
-# CONFIG_PACKAGE_eterm is not set
-# CONFIG_PACKAGE_xterm is not set
-
-#
-# utils
-#
-# CONFIG_PACKAGE_util-macros is not set
-
-#
-# window manager
-#
-# CONFIG_PACKAGE_fluxbox is not set
-# CONFIG_PACKAGE_matchbox-window-manager is not set
+++ /dev/null
-#
-# Copyright (C) 2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=luaunixsocket
-PKG_VERSION:=2.0.2
-PKG_RELEASE:=1
-
-PKG_SOURCE:=luasocket-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2664
-PKG_MD5SUM:=41445b138deb7bcfe97bff957503da8e
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/luaunixsocket
- SUBMENU:=Lua
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=LuaUnixSocket
- URL:=http://luasocket.luaforge.net/
- DEPENDS:=+luasocket
-endef
-
-define Package/luaunixsocket/description
- LuaSocket is the most comprehensive networking support
- library for the Lua language. It provides easy access to
- TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
- /bin/tar -C $(PKG_BUILD_DIR) -x --strip-components 1 -f $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR)/ \
- LIBDIR="$(TARGET_LDFLAGS)" \
- CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
- LD="$(TARGET_CROSS)ld -shared" \
- all
- $(MAKE) -C $(PKG_BUILD_DIR)/src/ \
- LIBDIR="$(TARGET_LDFLAGS)" \
- CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
- LD="$(TARGET_CROSS)ld -shared" \
- unix.so
-endef
-
-
-define Package/luaunixsocket/install
- $(INSTALL_DIR) $(1)/usr/lib/lua
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua
- $(INSTALL_DIR) $(1)/usr/lib/lua/socket
- ln -sf ../unix.so $(1)/usr/lib/lua/socket/unix.so
-endef
-
-$(eval $(call BuildPackage,luaunixsocket))
+++ /dev/null
-#
-# Copyright (C) 2006-2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=mjpg-streamer
-PKG_REV:=94
-PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer/
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_PROTO:=svn
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/mjpg-streamer
- SECTION:=multimedia
- CATEGORY:=Multimedia
- TITLE:=MJPG-streamer
- DEPENDS:=@LINUX_2_6 +libpthread +libjpeg
- URL:=http://mjpg-streamer.wiki.sourceforge.net/
-endef
-
-define Package/mjpg-streamer/description
- Streaming application for Linux-UVC compatible webcams
-endef
-
-EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)
-
-define Package/mjpg-streamer/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
- $(INSTALL_DIR) $(1)/etc/config
- $(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(foreach input_plugin,file uvc gspcav1,$(PKG_BUILD_DIR)/input_$(input_plugin).so) $(1)/usr/lib
- $(CP) $(foreach output_plugin,http file autofocus,$(PKG_BUILD_DIR)/output_$(output_plugin).so) $(1)/usr/lib
- $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
- $(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer
-endef
-
-$(eval $(call BuildPackage,mjpg-streamer))
+++ /dev/null
-config mjpg-streamer core
- option device "/dev/video0"
- option resolution "640x480"
- option fps "5"
- option port "8080"
- option enabled "true"
+++ /dev/null
-case "$ACTION" in
- add)
- # start process
- /etc/init.d/mjpg-streamer start
- ;;
- remove)
- # stop process
- /etc/init.d/mjpg-streamer stop
- ;;
-esac
-
+++ /dev/null
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2009 OpenWrt.org
-START=50
-
-SSD=start-stop-daemon
-NAME=mjpg_streamer
-PIDF=/var/run/$NAME.pid
-PROG=/usr/bin/$NAME
-
-start() {
- config_load mjpg-streamer
- config_get device core device
- config_get resolution core resolution
- config_get fps core fps
- config_get port core port
- config_get_bool enabled core enabled
- [ $enabled -gt 0 -a -c $device ] && sleep 3 && $SSD -S -m -p $PIDF -q -x $PROG -- --input "input_uvc.so --device $device --fps $fps --resolution $resolution" --output "output_http.so --port $port" &
-}
-
-stop() {
- $SSD -K -p $PIDF
-}
-
+++ /dev/null
---- ../spcav4l.c.orig 2010-03-21 22:49:39.884260157 +0100
-+++ ./plugins/input_gspcav1/spcav4l.c 2010-03-22 01:08:39.746758410 +0100
-@@ -45,7 +45,7 @@
- {BRIDGE_SPCA561,"SPCA561"},
- {BRIDGE_SPCA536,"SPCA536"},
- {BRIDGE_SONIX,"SN9C102"},
-- {BRIDGE_ZC3XX,"ZC301-2"},
-+ {BRIDGE_ZC3XX,"zc3xx"},
- {BRIDGE_CX11646,"CX11646"},
- {BRIDGE_TV8532,"TV8532"},
- {BRIDGE_ETOMS,"ET61XX51"},
-@@ -892,7 +892,8 @@
- break;
- case VIDEO_PALETTE_YUV420P:
- {
-- depth = (8 * 3) >> 1;
-+ //depth = (8 * 3) >> 1;
-+ depth = 8;
- }
- break;
- case VIDEO_PALETTE_RGB565:
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=powersensordaemon
-PKG_VERSION:=0.6
-PKG_RELEASE:=1
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/powersensordaemon
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/powersensordaemon
- SECTION:=base
- CATEGORY:=Network
- TITLE:=RealRaum Power Sensor Daemon
- URL:=http://www.realraum.at/
-endef
-
-
-define Build/Prepare
- svn export --force https://svn.spreadspace.org/realraum/powersensordaemon $(PKG_BUILD_DIR)
-endef
-
-
-define Build/Configure
- cd $(PKG_BUILD_DIR) && ./configure --target=Linux
-endef
-
-define Package/powersensordaemon/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_DIR) $(1)/etc/powersensordaemon
- # produces error
- #$(INSTALL_DIR) $(1)/var/run/powersensordaemon
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/powersensordaemon $(1)/usr/sbin/powersensordaemon
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/sampledev.txt $(1)/etc/powersensordaemon/sampledev.txt
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/powerids.txt $(1)/etc/powersensordaemon/powerids.txt
-endef
-
-$(eval $(call BuildPackage,powersensordaemon))
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=usocket
-PKG_VERSION:=0.6
-PKG_RELEASE:=1
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/usocket
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/usocket
- SECTION:=base
- CATEGORY:=Network
- TITLE:=UnixSocket/ttys-ConsoleTool to be Called from ssh and SensorSampling
- URL:=http://www.realraum.at/
-endef
-
-define Build/Prepare
- svn export --force https://svn.spreadspace.org/realraum/serial_console $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Package/usocket/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/serial $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/usocket $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/sample_sensors $(1)/usr/bin/
-endef
-
-$(eval $(call BuildPackage,usocket))
+++ /dev/null
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-import os
-import os.path
-import sys
-#import threading
-import logging
-import logging.handlers
-import time
-import signal
-import subprocess
-import types
-import ConfigParser
-import traceback
-import random
-import zmq
-import zmq.utils.jsonapi as json
-
-logger = logging.getLogger()
-logger.setLevel(logging.INFO)
-lh_syslog = logging.handlers.SysLogHandler(address="/dev/log",facility=logging.handlers.SysLogHandler.LOG_LOCAL2)
-lh_syslog.setFormatter(logging.Formatter('play-sound-status.py: %(levelname)s %(message)s'))
-logger.addHandler(lh_syslog)
-lh_stderr = logging.StreamHandler()
-logger.addHandler(lh_stderr)
-
-class UWSConfig:
- def __init__(self,configfile=None):
- self.configfile=configfile
- self.config_parser=ConfigParser.ConfigParser()
- #make option variable names case sensitive
- self.config_parser.optionxform = str
- self.config_parser.add_section('cmdlog')
- self.config_parser.set('cmdlog','cmd',"logger %ARG%")
- self.config_parser.set('cmdlog','timeout',"2.0")
- self.config_parser.set('cmdlog','delay',"0.0")
- self.config_parser.set('cmdlog','type',"shellcmd")
- self.config_parser.add_section('slugplayfile')
- self.config_parser.set('slugplayfile','remote_host',"root@slug.realraum.at")
- self.config_parser.set('slugplayfile','remote_shell',"/home/playgst.sh %ARG%")
- self.config_parser.set('slugplayfile','delay',"0.0")
- self.config_parser.set('slugplayfile','type',"remotecmd")
- self.config_parser.add_section('slugplaymp3')
- self.config_parser.set('slugplaymp3','remote_host',"root@slug.realraum.at")
- self.config_parser.set('slugplaymp3','remote_shell',"/home/playmp3.sh %ARG%")
- self.config_parser.set('slugplaymp3','delay',"0.0")
- self.config_parser.set('slugplaymp3','type',"remotecmd")
- self.config_parser.add_section('halflife2')
- self.config_parser.set('halflife2','arg',"/home/half-life-door.mp3")
- self.config_parser.set('halflife2','type',"slugplaymp3")
- self.config_parser.set('halflife2','delay',"0.2")
- self.config_parser.add_section('tardis')
- self.config_parser.set('tardis','arg',"/home/tardis.mp3")
- self.config_parser.set('tardis','type',"slugplaymp3")
- self.config_parser.add_section('sg1aliengreeting')
- self.config_parser.set('sg1aliengreeting','arg',"/home/sg1aliengreeting.mp3")
- self.config_parser.set('sg1aliengreeting','type',"slugplaymp3")
- self.config_parser.add_section('monkeyscream')
- self.config_parser.set('monkeyscream','arg',"/home/monkeyscream.mp3")
- self.config_parser.set('monkeyscream','delay',"1.5")
- self.config_parser.set('monkeyscream','type',"slugplaymp3")
- self.config_parser.add_section('gladosparty')
- self.config_parser.set('gladosparty','arg',"/home/glados_party.mp3")
- self.config_parser.set('gladosparty','type',"slugplaymp3")
- self.config_parser.add_section('gladosbaked')
- self.config_parser.set('gladosbaked','arg',"/home/glados_baked.mp3")
- self.config_parser.set('gladosbaked','type',"slugplaymp3")
- self.config_parser.add_section('gladoswelcome')
- self.config_parser.set('gladoswelcome','arg',"/home/glados_welcome.mp3")
- self.config_parser.set('gladoswelcome','type',"slugplaymp3")
- self.config_parser.add_section('gladosreplaced')
- self.config_parser.set('gladosreplaced','arg',"/home/glados_replaced_with_life_fire.mp3")
- self.config_parser.set('gladosreplaced','type',"slugplaymp3")
- self.config_parser.add_section('nothing')
- self.config_parser.set('nothing','type',"nothing")
- self.config_parser.add_section('randomset1')
- self.config_parser.set('randomset1','type',"random")
- self.config_parser.set('randomset1','one_of',"halflife2 gladosparty")
- self.config_parser.add_section('mapping')
- self.config_parser.set('mapping','DEFAULT',"halflife2")
- self.config_parser.set('mapping','PANIC',"monkeyscream")
- self.config_parser.set('mapping','ERROR',"nothing")
- self.config_parser.set('mapping','stratos',"tardis")
- self.config_parser.set('mapping','xro',"gladosreplaced")
- self.config_parser.set('mapping','equinox',"gladosparty")
- self.config_parser.set('mapping','Rachel',"nothing")
- self.config_parser.add_section('debug')
- self.config_parser.set('debug','enabled',"False")
- self.config_parser.add_section('broker')
- self.config_parser.set('broker','uri',"tcp://torwaechter.realraum.at:4244")
- self.config_parser.add_section('tracker')
- self.config_parser.set('tracker','secs_movement_before_presence_to_launch_event','1')
- self.config_parser.set('tracker','secs_presence_before_movement_to_launch_event','120')
- self.config_mtime=0
- if not self.configfile is None:
- try:
- cf_handle = open(self.configfile,"r")
- cf_handle.close()
- except IOError:
- self.writeConfigFile()
- else:
- self.checkConfigUpdates()
-
- def checkConfigUpdates(self):
- global logger
- if self.configfile is None:
- return
- logging.debug("Checking Configfile mtime: "+self.configfile)
- try:
- mtime = os.path.getmtime(self.configfile)
- except (IOError,OSError):
- return
- if self.config_mtime < mtime:
- logging.debug("Reading Configfile")
- try:
- self.config_parser.read(self.configfile)
- self.config_mtime=os.path.getmtime(self.configfile)
- except (ConfigParser.ParsingError, IOError), pe_ex:
- logging.error("Error parsing Configfile: "+str(pe_ex))
- if self.config_parser.get('debug','enabled') == "True":
- logger.setLevel(logging.DEBUG)
- else:
- logger.setLevel(logging.INFO)
-
- def writeConfigFile(self):
- if self.configfile is None:
- return
- logging.debug("Writing Configfile "+self.configfile)
- try:
- cf_handle = open(self.configfile,"w")
- self.config_parser.write(cf_handle)
- cf_handle.close()
- self.config_mtime=os.path.getmtime(self.configfile)
- except IOError, io_ex:
- logging.error("Error writing Configfile: "+str(io_ex))
- self.configfile=None
-
- def getValue(self, name):
- underscore_pos=name.find('_')
- if underscore_pos < 0:
- raise AttributeError
- return self.getSectionValue(name[0:underscore_pos], name[underscore_pos+1:])
-
- def getSectionValue(self, section, name):
- try:
- return self.config_parser.get(section,name)
- except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
- return None
-
- def __getattr__(self, name):
- underscore_pos=name.find('_')
- if underscore_pos < 0:
- raise AttributeError
- try:
- return self.config_parser.get(name[0:underscore_pos], name[underscore_pos+1:])
- except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
- raise AttributeError
-
-
-def runRandomAction(action_list,user,args=[]):
- if not type(action_list) == types.ListType:
- raise ValueError("runRandomAction: action_list must be a list")
- return executeAction(random.choice(action_list),user,args)
-
-def runRemoteCommand(remote_host,remote_shell,user,args=[]):
- global sshp,uwscfg
- sshp = None
- try:
- cmd = "ssh -i /flash/tuer/id_rsa -o PasswordAuthentication=no -o StrictHostKeyChecking=no %RHOST% %RSHELL%"
- cmd = cmd.replace("%RHOST%",remote_host).replace("%RSHELL%",remote_shell).replace("%ARG%", " ".join(args)).replace("%USER%", user)
- logging.debug("runRemoteCommand: Executing: "+cmd)
- sshp = subprocess.Popen(cmd.split(" "), bufsize=1024, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False)
- logging.debug("runRemoteCommand: pid %d: running=%d" % (sshp.pid,sshp.poll() is None))
- if not sshp.poll() is None:
- logging.error("runRemoteCommand: subprocess %d not started ?, returncode: %d" % (sshp.pid,sshp.returncode))
- return False
- return True
- except Exception, ex:
- logging.error("runRemoteCommand: "+str(ex))
- traceback.print_exc(file=sys.stdout)
- if not sshp is None and sshp.poll() is None:
- if sys.hexversion >= 0x020600F0:
- sshp.terminate()
- else:
- subprocess.call(["kill",str(sshp.pid)])
- time.sleep(1.5)
- if sshp.poll() is None:
- logging.error("runRemoteCommand: subprocess still alive, sending SIGKILL to pid %d" % (sshp.pid))
- if sys.hexversion >= 0x020600F0:
- sshp.kill()
- else:
- subprocess.call(["kill","-9",str(sshp.pid)])
- time.sleep(5)
- return False
-
-def runShellCommand(cmd,ptimeout,stdinput,user,args=[]):
- global uwscfg
- cmd = cmd.replace("%ARG%"," ".join(args)).replace("%USER%", user)
- if ptimeout is None or float(ptimeout) > 45:
- ptimeout = 45
- else:
- ptimeout = int(float(ptimeout))
- popenTimeout2(cmd,stdinput,ptimeout=ptimeout)
-
-def executeAction(action_name, user, args=[]):
- if action_name is None:
- logging.error("executeAction: action_name is None")
- return False
- action_type = uwscfg.getValue(action_name+"_type")
- if action_type is None:
- logging.error("executeAction: action %s not found or has no type" % action_name)
- return False
- action_delay=uwscfg.getValue(action_name+"_delay")
- logging.info("executeAction %s of type %s for user %s with delay %s" % (action_name,action_type,user,action_delay))
- if not action_delay is None:
- time.sleep(float(action_delay))
-
- action_arg = uwscfg.getValue(action_name+"_arg")
- if not action_arg is None:
- args += [action_arg]
-
- #"registered" actions
- if action_type == "remotecmd":
- return runRemoteCommand(uwscfg.getSectionValue(action_name,"remote_host"), uwscfg.getSectionValue(action_name,"remote_shell"), user=user, args=args)
- elif action_type == "shellcmd":
- return runShellCommand(cmd=uwscfg.getSectionValue(action_name,"cmd"), ptimeout=uwscfg.getSectionValue(action_name,"timeout"), stdinput=uwscfg.getSectionValue(action_name,"stdinput"), user=user, args=args)
- elif action_type == "nothing":
- return True
- elif action_type == "random":
- return runRandomAction(action_list=uwscfg.getSectionValue(action_name,"one_of").split(" "),user=user,args=args)
- else:
- return executeAction(action_type,user=user,args=args)
-
-def playThemeOf(user,fallback_default):
- global uwscfg
- uwscfg.checkConfigUpdates()
- if user is None:
- user = ""
- config=uwscfg.getValue("mapping_"+str(user))
- if config is None:
- config=uwscfg.getValue("mapping_"+str(fallback_default))
- logging.debug("playThemeOf: action for user %s: %s" % (user,config))
- executeAction(config,user,[])
-
-def popenTimeout1(cmd, pinput, returncode_ok=[0], ptimeout = 20.0, pcheckint = 0.25):
- logging.debug("popenTimeout1: starting: " + cmd)
- try:
- sppoo = subprocess.Popen(cmd, stdin=subprocess.PIPE, shell=True)
- sppoo.communicate(input=pinput)
- timeout_counter=ptimeout
- while timeout_counter > 0:
- time.sleep(pcheckint)
- timeout_counter -= pcheckint
- if not sppoo.poll() is None:
- logging.debug("popenTimeout1: subprocess %d finished, returncode: %d" % (sppoo.pid,sppoo.returncode))
- return (sppoo.returncode in returncode_ok)
- #timeout reached
- logging.error("popenTimeout1: subprocess took too long (>%fs), sending SIGTERM to pid %d" % (ptimeout,sppoo.pid))
- if sys.hexversion >= 0x020600F0:
- sppoo.terminate()
- else:
- subprocess.call(["kill",str(sppoo.pid)])
- time.sleep(1.0)
- if sppoo.poll() is None:
- logging.error("popenTimeout1: subprocess still alive, sending SIGKILL to pid %d" % (sppoo.pid))
- if sys.hexversion >= 0x020600F0:
- sppoo.kill()
- else:
- subprocess.call(["kill","-9",str(sppoo.pid)])
- return False
- except Exception, e:
- logging.error("popenTimeout1: "+str(e))
- return False
-
-def popenTimeout2(cmd, pinput, returncode_ok=[0], ptimeout=21):
- logging.debug("popenTimeout2: starting: " + cmd)
- try:
- sppoo = subprocess.Popen(cmd, stdin=subprocess.PIPE, shell=True)
- if sys.hexversion >= 0x020600F0:
- old_shandler = signal.signal(signal.SIGALRM,lambda sn,sf: sppoo.kill())
- else:
- old_shandler = signal.signal(signal.SIGALRM,lambda sn,sf: os.system("kill -9 %d" % sppoo.pid))
- signal.alarm(ptimeout) #schedule alarm
- if not pinput is None:
- sppoo.communicate(input=pinput)
- sppoo.wait()
- signal.alarm(0) #disable pending alarms
- signal.signal(signal.SIGALRM, old_shandler)
- logging.debug("popenTimeout2: subprocess %d finished, returncode: %d" % (sppoo.pid,sppoo.returncode))
- if sppoo.returncode < 0:
- logging.error("popenTimeout2: subprocess took too long (>%ds) and pid %d was killed" % (ptimeout,sppoo.pid))
- return (sppoo.returncode in returncode_ok)
- except Exception, e:
- logging.error("popenTimeout2: "+str(e))
- try:
- signal.signal(signal.SIGALRM, old_shandler)
- except:
- pass
- return False
-
-def decodeR3Message(multipart_msg):
- try:
- return (multipart_msg[0], json.loads(multipart_msg[1]))
- except Exception, e:
- logging.debug("decodeR3Message:"+str(e))
- return ("",{})
-
-def exitHandler(signum, frame):
- logging.info("stopping")
- try:
- zmqsub.close()
- zmqctx.destroy()
- except:
- pass
- sys.exit(0)
-
-#signals proapbly don't work because of readline
-#signal.signal(signal.SIGTERM, exitHandler)
-signal.signal(signal.SIGINT, exitHandler)
-signal.signal(signal.SIGQUIT, exitHandler)
-
-logging.info("Door Status Listener 'PlaySound' started")
-
-if len(sys.argv) > 1:
- uwscfg = UWSConfig(sys.argv[1])
-else:
- uwscfg = UWSConfig()
-
-while True:
- try:
- #Start zmq connection to publish / forward sensor data
- zmqctx = zmq.Context()
- zmqctx.linger = 0
- zmqsub = zmqctx.socket(zmq.SUB)
- zmqsub.setsockopt(zmq.SUBSCRIBE, "DoorCommandEvent")
- zmqsub.setsockopt(zmq.SUBSCRIBE, "PresenceUpdate")
- zmqsub.setsockopt(zmq.SUBSCRIBE, "BoreDoomButtonPressEvent")
-# zmqsub.setsockopt(zmq.SUBSCRIBE, "MovementSensorUpdate")
- zmqsub.setsockopt(zmq.SUBSCRIBE, "DoorAjarUpdate")
- zmqsub.setsockopt(zmq.SUBSCRIBE, "DoorProblemEvent")
- zmqsub.connect(uwscfg.broker_uri)
-
- last_status=None
- last_user=None
- unixts_panic_button=None
- unixts_last_movement=0
- unixts_last_presence=0
- while True:
- data = zmqsub.recv_multipart()
- (structname, dictdata) = decodeR3Message(data)
- logging.debug("Got data: " + structname + ":"+ str(dictdata))
-
- #uwscfg.checkConfigUpdates()
-
- if structname == "PresenceUpdate" and "Present" in dictdata:
- unixts_last_presence=time.time()
- last_status=dictdata["Present"]
- unixts_panic_button=None
- if ( time.time() - unixts_last_movement ) <= float(uwscfg.tracker_secs_movement_before_presence_to_launch_event):
- unixts_last_movement=0
- if last_status:
- playThemeOf(user=last_user, fallback_default="DEFAULT")
- continue
- elif structname == "DoorCommandEvent":
- last_user = dictdata["Who"]
- continue
- elif structname == "BoreDoomButtonPressEvent":
- playThemeOf(user="PANIC", fallback_default="nothing")
- continue
- elif structname == "MovementSensorUpdate" or structname == "DoorAjarUpdate":
- unixts_last_movement=time.time()
- if (time.time() - unixts_last_presence) <= float(uwscfg.tracker_secs_presence_before_movement_to_launch_event):
- unixts_last_presence=0
- if last_status:
- playThemeOf(user=last_user, fallback_default="DEFAULT")
- continue
- elif structname == "DoorProblemEvent" and "Severity" in dictdata:
- playThemeOf(user="ERROR", fallback_default="nothing")
- continue
-
- except Exception, ex:
- logging.error("main: "+str(ex))
- traceback.print_exc(file=sys.stdout)
- try:
- zmqsub.close()
- zmqctx.destroy()
- except:
- pass
- time.sleep(5)
+++ /dev/null
-Christian Pointner <equinox@spreadspace.org>
+++ /dev/null
-
-== Commands accepted by daemon ==
-
-COMMAND:= power (on|off) $POWERID | listen $EVENT | sample $SAMPLEDEV | log <logtext>
-POWERID:= werkzeug | stereo | labor | schreibtisch | logo | idee
-EVENT:= all | request | sensor | movement | button | none
-SAMPLEDEV:=temp[0-9]+ | photo[0-9]+ | <sensor???>[0-9]+
-
-Notes:
- * subscription to events is cummulativ
- * the "sample" command instructs the daemon to immediately get new sensor data of device $SAMPLEDEV
-
-== Replys of daemon ==
-
-CMDREPLY:= OK | Error: $ERRORSTR
-ERRORSTR:=no connection | unknown device | ....
-
-== Listener Data from Daemon ==
-(Temperature Data in Degrees Celsius)
-
-LISTENERDATA:=temp[0-9]+: [0-9]{1,3}\.[0-9]{2} | photo[0-9]+: [0-9]{1,3} | <sensor???>[0-9]+: <data> | movement | button[0-9]
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+++ /dev/null
-##
-## powersensordaemon
-##
-## Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
-##
-## This file is part of powersensordaemon.
-##
-## powersensordaemon is free software: you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## any later version.
-##
-## powersensordaemon is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
-##
-
-ifneq ($(MAKECMDGOALS),distclean)
-include include.mk
-endif
-
-EXECUTABLE := powersensordaemon
-
-OBJ := log.o \
- sig_handler.o \
- options.o \
- string_list.o \
- key_value_storage.o \
- command_queue.o \
- client_list.o \
- autosample.o \
- powersensordaemon.o
-
-
-SRC := $(OBJ:%.o=%.c)
-
-.PHONY: clean distclean
-
-all: $(EXECUTABLE)
-
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -MM $(CFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$; echo '(re)building $@'
-
-ifneq ($(MAKECMDGOALS),distclean)
--include $(SRC:%.c=%.d)
-endif
-
-powersensordaemon: $(OBJ)
- $(CC) $(OBJ) -o $@ $(LDFLAGS)
-
-%.o: %.c
- $(CC) $(CFLAGS) -c $<
-
-
-distclean: clean
- find . -name *.o -exec rm -f {} \;
- find . -name "*.\~*" -exec rm -rf {} \;
- rm -f include.mk
-
-clean:
- rm -f *.o
- rm -f *.d
- rm -f *.d.*
- rm -f $(EXECUTABLE)
-
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "datatypes.h"
-
-#include "options.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "autosample.h"
-
-int send_sample_cmd(int fd, const char* device_name)
-{
- if(!device_name)
- return -1;
-
- char* buf;
- int len = asprintf(&buf, "sample %s\n", device_name);
- if(len <= 0)
- return len;
- int offset = 0;
- int ret;
- for(;;) {
- ret = write(fd, &buf[offset], len - offset);
- if(ret < 0) {
- if(errno != EINTR) {
- free(buf);
- return ret;
- }
-
- ret = 0;
- }
-
- offset += ret;
- if(offset+1 >= len)
- break;
- }
- free(buf);
-
- if(ret > 0)
- return 0;
-
- return ret;
-}
-
-int start_autosample_process(options_t* opt, autosample_process_t* a)
-{
- int write_pipefd[2];
- int read_pipefd[2];
- pid_t cpid;
-
- if (pipe(write_pipefd) == -1) {
- log_printf(ERROR, "autosample_process: pipe() failed: %s", strerror(errno));
- return -1;
- }
-
- if (pipe(read_pipefd) == -1) {
- log_printf(ERROR, "autosample_process: pipe() failed: %s", strerror(errno));
- close(write_pipefd[0]);
- close(write_pipefd[1]);
- return -1;
- }
-
- cpid = fork();
- if (cpid == -1) {
- log_printf(ERROR, "autosample_process: fork() failed: %s", strerror(errno));
- close(write_pipefd[0]);
- close(write_pipefd[1]);
- close(read_pipefd[0]);
- close(read_pipefd[1]);
- return -1;
- }
-
- if (cpid == 0) {
- close(write_pipefd[0]);
- close(read_pipefd[1]);
- int ret = autosample_process(opt, write_pipefd[1], read_pipefd[0]);
- if(!ret)
- log_printf(NOTICE, "autosample process normal shutdown");
- else if(ret > 0)
- log_printf(NOTICE, "autosample shutdown after signal");
- else
- log_printf(NOTICE, "autosample shutdown after error");
-
- options_clear(opt);
- log_close();
- exit(0);
- }
-
- close(write_pipefd[1]);
- close(read_pipefd[0]);
- a->pid_ = cpid;
- a->write_fd_ = write_pipefd[0];
- a->read_fd_ = read_pipefd[1];
- return 0;
-}
-
-int autosample_process(options_t *opt, int writefd, int readfd)
-{
- log_printf(NOTICE, "autosample process just started");
-
- int device_num = key_value_storage_length(&opt->autosampledevs_);
- if(device_num <= 0) {
- log_printf(WARNING, "autosample no devices to sample, exiting");
- return 0;
- }
-
- autosample_device_t* devices = malloc(sizeof(autosample_device_t)*device_num);
- if(!devices) {
- log_printf(WARNING, "autosample memory error, exiting");
- return -3;
- }
-
- int i = 0;
- string_list_element_t* k = opt->autosampledevs_.keys_.first_;
- string_list_element_t* v = opt->autosampledevs_.values_.first_;
- while(k && v) {
- devices[i].delay_ = atoi(v->string_);
- devices[i].cnt_ = 0;
- devices[i].device_name_ = k->string_;
- k = k->next_;
- v = v->next_;
- i++;
- }
-
- int sig_fd = signal_init();
- if(sig_fd < 0)
- return -1;
-
- fd_set readfds, tmpfds;
- FD_ZERO(&readfds);
- FD_SET(readfd, &readfds);
- FD_SET(sig_fd, &readfds);
- int max_fd = (readfd < sig_fd) ? sig_fd : readfd;
-
- struct timeval timeout;
- int return_value = 0;
- unsigned char sample_enabled = 0;
- while(!return_value) {
- memcpy(&tmpfds, &readfds, sizeof(tmpfds));
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
- int ret = select(max_fd+1, &tmpfds, NULL, NULL, &timeout);
- if(ret == -1 && errno != EINTR) {
- log_printf(ERROR, "autosample process select returned with error: %s", strerror(errno));
- return_value = -3;
- break;
- }
- if(ret == -1)
- continue;
- if(!ret) {
- int i;
- for(i = 0; i < device_num; i++) {
- devices[i].cnt_++;
- if(devices[i].cnt_ >= devices[i].delay_) {
- if(sample_enabled) {
- log_printf(DEBUG, "autosample send sample command for '%s'", devices[i].device_name_);
- send_sample_cmd(writefd, devices[i].device_name_);
- }
- devices[i].cnt_ = 0;
- }
- }
- }
-
- if(FD_ISSET(readfd, &tmpfds)) {
- int ret;
- do {
- ret = read(readfd, &sample_enabled, 1);
- } while(!ret || (ret == -1 && errno == EINTR));
- log_printf(NOTICE, "autosample %s", sample_enabled == 0 ? "disabled" : "enabled");
- }
-
- if(FD_ISSET(sig_fd, &tmpfds)) {
- if(signal_handle()) {
- return_value = 1;
- break;
- }
- }
- }
-
- signal_stop();
- free(devices);
- return return_value;
-}
-
-
-
-
-
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef POWERSENSORDAEMON_autosample_h_INCLUDED
-#define POWERSENSORDAEMON_autosample_h_INCLUDED
-
-#include "options.h"
-
-struct autosample_process_struct {
- pid_t pid_;
- int read_fd_;
- int write_fd_;
-};
-typedef struct autosample_process_struct autosample_process_t;
-
-struct autosample_device_struct {
- int delay_;
- int cnt_;
- char* device_name_;
-};
-typedef struct autosample_device_struct autosample_device_t;
-
-int send_sample_cmd(int fd, const char* device_name);
-int start_autosample_process(options_t* opt, autosample_process_t* a);
-int autosample_process(options_t *opt, int writefd, int readfd);
-
-#endif
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <stdlib.h>
-
-#include "client_list.h"
-#include "datatypes.h"
-
-client_t* client_get_last(client_t* first)
-{
- if(!first)
- return NULL;
-
- while(first->next) {
- first = first->next;
- }
-
- return first;
-}
-
-int client_add(client_t** first, int fd)
-{
- if(!first)
- return -1;
-
- client_t* new_client = malloc(sizeof(client_t));
- if(!new_client)
- return -2;
-
- new_client->fd = fd;
- new_client->request_listener = 0;
- new_client->error_listener = 0;
- new_client->sensor_listener = 0;
- new_client->movement_listener = 0;
- new_client->button_listener = 0;
- new_client->next = NULL;
- new_client->buffer.offset = 0;
-
- if(!(*first)) {
- *first = new_client;
- return 0;
- }
-
- client_get_last(*first)->next = new_client;
-
- return 0;
-}
-
-void client_remove(client_t** first, int fd)
-{
- if(!first || !(*first))
- return;
-
- client_t* deletee = *first;
- if((*first)->fd == fd) {
- *first = (*first)->next;
- close(deletee->fd);
- free(deletee);
- return;
- }
-
- client_t* prev = deletee;
- deletee = deletee->next;
- while(deletee) {
- if(deletee->fd == fd) {
- prev->next = deletee->next;
- close(deletee->fd);
- free(deletee);
- return;
- }
- prev = deletee;
- deletee = deletee->next;
- }
-}
-
-client_t* client_find(client_t* first, int fd)
-{
- if(!first)
- return NULL;
-
- while(first) {
- if(first->fd == fd)
- return first;
-
- first = first->next;
- }
- return NULL;
-}
-
-void client_clear(client_t** first)
-{
- if(!first || !(*first))
- return;
-
- while(*first) {
- client_t* deletee = *first;
- *first = (*first)->next;
- close(deletee->fd);
- free(deletee);
- }
-}
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef POWERSENSORDAEMON_client_list_h_INCLUDED
-#define POWERSENSORDAEMON_client_list_h_INCLUDED
-
-#include "datatypes.h"
-
-struct client_struct {
- int fd;
- int request_listener;
- int error_listener;
- int sensor_listener;
- int movement_listener;
- int button_listener;
- struct client_struct* next;
- read_buffer_t buffer;
-};
-typedef struct client_struct client_t;
-
-int client_add(client_t** first, int fd);
-void client_remove(client_t** first, int fd);
-client_t* client_find(client_t* first, int fd);
-void client_clear(client_t** first);
-
-#endif
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "command_queue.h"
-#include "datatypes.h"
-
-cmd_t* cmd_get_last(cmd_t* first)
-{
- if(!first)
- return NULL;
-
- while(first->next) {
- first = first->next;
- }
-
- return first;
-}
-
-int cmd_push(cmd_t** first, int fd, cmd_id_t cmd, const char* param)
-{
- if(!first)
- return -1;
-
- cmd_t* new_cmd = malloc(sizeof(cmd_t));
- if(!new_cmd)
- return -2;
-
- new_cmd->fd = fd;
- new_cmd->cmd = cmd;
- if(param) {
- new_cmd->param = strdup(param);
- if(!new_cmd->param) {
- free(new_cmd);
- return -2;
- }
- }
- else
- new_cmd->param = NULL;
- new_cmd->sent = 0;
- new_cmd->tv_start.tv_sec = 0;
- new_cmd->tv_start.tv_usec = 0;
- new_cmd->next = NULL;
-
- if(!(*first)) {
- *first = new_cmd;
- return 0;
- }
-
- cmd_get_last(*first)->next = new_cmd;
-
- return 0;
-}
-
-void cmd_sent(cmd_t* cmd)
-{
- if(!cmd)
- return;
-
- cmd->sent = 1;
- gettimeofday(&cmd->tv_start, NULL);
-}
-
-int cmd_has_expired(cmd_t cmd)
-{
- struct timeval now;
- timerclear(&now);
- gettimeofday(&now, NULL);
- cmd.tv_start.tv_sec+=2;
-
- return timercmp(&cmd.tv_start, &now, <);
-}
-
-void cmd_pop(cmd_t** first)
-{
- if(!first || !(*first))
- return;
-
- cmd_t* deletee = *first;
- *first = (*first)->next;
- if(deletee->param)
- free(deletee->param);
- free(deletee);
-}
-
-void cmd_clear(cmd_t** first)
-{
- if(!first || !(*first))
- return;
-
- while(*first) {
- cmd_t* deletee = *first;
- *first = (*first)->next;
- if(deletee->param)
- free(deletee->param);
- free(deletee);
- }
-}
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef POWERSENSORDAEMON_command_queue_h_INCLUDED
-#define POWERSENSORDAEMON_command_queue_h_INCLUDED
-
-#include <sys/time.h>
-
-enum cmd_id_enum { POWER_ON, POWER_OFF, SAMPLE, LOG , LISTEN };
-typedef enum cmd_id_enum cmd_id_t;
-
-struct cmd_struct {
- int fd;
- cmd_id_t cmd;
- char* param;
- int sent;
- struct timeval tv_start;
- struct cmd_struct* next;
-};
-typedef struct cmd_struct cmd_t;
-
-int cmd_push(cmd_t** first, int fd, cmd_id_t cmd, const char* param);
-void cmd_sent(cmd_t* cmd);
-int cmd_has_expired(cmd_t cmd);
-void cmd_pop(cmd_t** first);
-void cmd_clear(cmd_t** first);
-
-#endif
+++ /dev/null
-#!/bin/sh
-#
-#
-# powersensordaemon
-#
-# Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
-#
-# This file is part of powersensordaemon.
-#
-# powersensordaemon is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# any later version.
-#
-# powersensordaemon is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
-#
-
-TARGET=`uname -s`
-
-CFLAGS='-g -O2'
-LDFLAGS='-g -Wall -O2'
-
-PREFIX='/usr/local'
-USERNAME='uanytun'
-USERHOME='/var/run/uanytun'
-
-print_usage() {
- echo "configure --help print this"
- echo " --target=<TARGET> build target i.e. Linux (default: autodetect)"
- echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
- echo " --username=<USERNAME> create this user when installing (default: uanytun)"
- echo " --userhome=<PATH> the home directory of the user to be created (default: /var/run/uanytun)"
-}
-
-for arg
-do
- case $arg in
- --target=*)
- TARGET=${arg#--target=}
- ;;
- --prefix=*)
- PREFIX=${arg#--prefix=}
- ;;
- --username=*)
- USERNAME=${arg#--username=}
- ;;
- --userhome=*)
- USERHOME=${arg#--userhome=}
- ;;
- --help)
- print_usage
- exit 0
- ;;
- *)
- echo "Unknown argument: $arg"
- print_usage
- exit 1
- ;;
- esac
-done
-
-rm -f include.mk
-case $TARGET in
- Linux)
- echo "Linux specific build options"
- ;;
- OpenBSD|FreeBSD|NetBSD)
- echo "BSD specific build options"
- CFLAGS=$CFLAGS' -I/usr/local/include'
- LDFLAGS=$LDFLAGS' -L/usr/local/lib'
- ;;
- *)
- echo "Plattform not supported"
- exit 1;
- ;;
-esac
-
-if [ "x$PREFIX" = "x/usr" ]; then
- ETCDIR=/etc
-else
- ETCDIR=$PREFIX/etc
-fi
-
-cat >> include.mk <<EOF
-# this file was created automatically
-# do not edit this file directly
-# use ./configure instead
-
-TARGET := $TARGET
-CC := gcc
-CFLAGS := $CFLAGS
-LDFLAGS := $LDFLAGS
-
-SBINDIR := $PREFIX/sbin
-MANDIR := $PREFIX/share/man
-ETCDIR := $ETCDIR
-USERNAME := $USERNAME
-USERHOME := $USERHOME
-EOF
-
-exit 0
+++ /dev/null
-/*
- * uAnytun
- *
- * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
- * featured implementation uAnytun has no support for multiple connections
- * or synchronisation. It is a small single threaded implementation intended
- * to act as a client on small platforms.
- * The secure anycast tunneling protocol (satp) defines a protocol used
- * for communication between any combination of unicast and anycast
- * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
- * mode and allows tunneling of every ETHER TYPE protocol (e.g.
- * ethernet, ip, arp ...). satp directly includes cryptography and
- * message authentication based on the methodes used by SRTP. It is
- * intended to deliver a generic, scaleable and secure solution for
- * tunneling and relaying of packets of any protocol.
- *
- *
- * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
- *
- * This file is part of uAnytun.
- *
- * uAnytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * uAnytun is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef UANYTUN_daemon_h_INCLUDED
-#define UANYTUN_daemon_h_INCLUDED
-
-#include <poll.h>
-#include <fcntl.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-struct priv_info_struct {
- struct passwd* pw_;
- struct group* gr_;
-};
-typedef struct priv_info_struct priv_info_t;
-
-int priv_init(priv_info_t* priv, const char* username, const char* groupname)
-{
- if(!priv)
- return -1;
-
- priv->pw_ = NULL;
- priv->gr_ = NULL;
-
- priv->pw_ = getpwnam(username);
- if(!priv->pw_) {
- log_printf(ERROR, "unkown user %s", username);
- return -1;
- }
-
- if(groupname)
- priv->gr_ = getgrnam(groupname);
- else
- priv->gr_ = getgrgid(priv->pw_->pw_gid);
-
- if(!priv->gr_) {
- log_printf(ERROR, "unkown group %s", groupname);
- return -1;
- }
-
- return 0;
-}
-
-int priv_drop(priv_info_t* priv)
-{
- if(!priv || !priv->pw_ || !priv->gr_) {
- log_printf(ERROR, "privileges not initialized properly");
- return -1;
- }
-
- if(setgid(priv->gr_->gr_gid)) {
- log_printf(ERROR, "setgid('%s') failed: %s", priv->gr_->gr_name, strerror(errno));
- return -1;
- }
-
- gid_t gr_list[1];
- gr_list[0] = priv->gr_->gr_gid;
- if(setgroups (1, gr_list)) {
- log_printf(ERROR, "setgroups(['%s']) failed: %s", priv->gr_->gr_name, strerror(errno));
- return -1;
- }
-
- if(setuid(priv->pw_->pw_uid)) {
- log_printf(ERROR, "setuid('%s') failed: %s", priv->pw_->pw_name, strerror(errno));
- return -1;
- }
-
- log_printf(NOTICE, "dropped privileges to %s:%s", priv->pw_->pw_name, priv->gr_->gr_name);
- return 0;
-}
-
-
-int do_chroot(const char* chrootdir)
-{
- if(getuid() != 0) {
- log_printf(ERROR, "this programm has to be run as root in order to run in a chroot");
- return -1;
- }
-
- if(chroot(chrootdir)) {
- log_printf(ERROR, "can't chroot to %s: %s", chrootdir, strerror(errno));
- return -1;
- }
- log_printf(NOTICE, "we are in chroot jail (%s) now", chrootdir);
- if(chdir("/")) {
- log_printf(ERROR, "can't change to /: %s", strerror(errno));
- return -1;
- }
-}
-
-void daemonize()
-{
- pid_t pid;
-
- pid = fork();
- if(pid < 0) {
- log_printf(ERROR, "daemonizing failed at fork(): %s, exitting", strerror(errno));
- exit(-1);
- }
- if(pid) exit(0);
-
- umask(0);
-
- if(setsid() < 0) {
- log_printf(ERROR, "daemonizing failed at setsid(): %s, exitting", strerror(errno));
- exit(-1);
- }
-
- pid = fork();
- if(pid < 0) {
- log_printf(ERROR, "daemonizing failed at fork(): %s, exitting", strerror(errno));
- exit(-1);
- }
- if(pid) exit(0);
-
- if ((chdir("/")) < 0) {
- log_printf(ERROR, "daemonizing failed at chdir(): %s, exitting", strerror(errno));
- exit(-1);
- }
-
- int fd;
- for (fd=0;fd<=2;fd++) // close all file descriptors
- close(fd);
- fd = open("/dev/null",O_RDWR); // stdin
- if(fd == -1)
- log_printf(WARNING, "can't open stdin (chroot and no link to /dev/null?)");
- else {
- if(dup(fd) == -1) // stdout
- log_printf(WARNING, "can't open stdout");
- if(dup(fd) == -1) // stderr
- log_printf(WARNING, "can't open stderr");
- }
- umask(027);
-}
-
-#endif
-
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef POWERSENSORDAEMON_datatypes_h_INCLUDED
-#define POWERSENSORDAEMON_datatypes_h_INCLUDED
-
-#include <stdint.h>
-#include <arpa/inet.h>
-
-typedef uint8_t u_int8_t;
-typedef uint16_t u_int16_t;
-typedef uint32_t u_int32_t;
-typedef uint64_t u_int64_t;
-/* typedef int8_t int8_t; */
-/* typedef int16_t int16_t; */
-/* typedef int32_t int32_t; */
-/* typedef int64_t int64_t; */
-
-struct buffer_struct {
- u_int32_t length_;
- u_int8_t* buf_;
-};
-typedef struct buffer_struct buffer_t;
-
-struct read_buffer_struct {
- u_int32_t offset;
- u_int8_t buf[100];
-};
-typedef struct read_buffer_struct read_buffer_t;
-
-#endif
+++ /dev/null
-/*
- * rhctl
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of rhctl.
- *
- * rhctl is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * rhctl is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with rhctl. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "key_value_storage.h"
-
-void key_value_storage_init(key_value_storage_t* stor)
-{
- if(!stor)
- return;
-
- string_list_init(&(stor->keys_));
- string_list_init(&(stor->values_));
-}
-
-void key_value_storage_clear(key_value_storage_t* stor)
-{
- if(!stor)
- return;
-
- string_list_clear(&(stor->keys_));
- string_list_clear(&(stor->values_));
-}
-
-int key_value_storage_add(key_value_storage_t* stor, const char* key, const char* value)
-{
- if(!stor || !key || !value)
- return -1;
-
- int ret = string_list_add(&(stor->keys_), key);
- if(ret!=0)
- return ret;
-
- ret = string_list_add(&(stor->values_), value);
- if(ret!=0)
- return ret;
-
- return 0;
-}
-
-char* key_value_storage_find(key_value_storage_t* stor, const char* key)
-{
- if(!stor || !key)
- return NULL;
-
- string_list_element_t* k = stor->keys_.first_;
- string_list_element_t* v = stor->values_.first_;
- while(v && k) {
- if(!strcmp(k->string_, key))
- return v->string_;
-
- k = k->next_;
- v = v->next_;
- }
-
- return NULL;
-}
-
-/* Warning: this function only works if you actually store \0-terminated strings as values!! */
-char const * key_value_storage_find_first_stringvalue(key_value_storage_t* stor, char const * value)
-{
- if(!stor || !value)
- return NULL;
-
- string_list_element_t* k = stor->keys_.first_;
- string_list_element_t* v = stor->values_.first_;
- while(v && k) {
- if(!strcmp(v->string_, value))
- return k->string_;
-
- k = k->next_;
- v = v->next_;
- }
-
- return NULL;
-}
-
-int key_value_storage_length(key_value_storage_t* stor)
-{
- if(!stor)
- return 0;
-
- int length = 0;
- string_list_element_t* k = stor->keys_.first_;
- while(k) {
- length++;
- k = k->next_;
- }
-
- return length;
-}
-
-void key_value_storage_print(key_value_storage_t* stor, const char* head, const char* sep, const char* tail)
-{
- if(!stor)
- return;
-
- string_list_element_t* k = stor->keys_.first_;
- string_list_element_t* v = stor->values_.first_;
- while(v && k) {
- printf("%s%s%s%s%s", head, k->string_, sep, v->string_, tail);
- k = k->next_;
- v = v->next_;
- }
- printf("\n");
-}
+++ /dev/null
-/*
- * rhctl
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of rhctl.
- *
- * rhctl is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * rhctl is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with rhctl. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef RHCTL_key_value_storage_h_INCLUDED
-#define RHCTL_key_value_storage_h_INCLUDED
-
-#include "string_list.h"
-
-struct key_value_storage_struct {
- string_list_t keys_;
- string_list_t values_;
-};
-typedef struct key_value_storage_struct key_value_storage_t;
-
-void key_value_storage_init(key_value_storage_t* stor);
-void key_value_storage_clear(key_value_storage_t* stor);
-int key_value_storage_add(key_value_storage_t* stor, const char* key, const char* value);
-char* key_value_storage_find(key_value_storage_t* stor, const char* key);
-/* Warning: this function only works if you actually store \0-terminated strings as values!! */
-char const * key_value_storage_find_first_stringvalue(key_value_storage_t* stor, char const * value);
-int key_value_storage_length(key_value_storage_t* stor);
-
-void key_value_storage_print(key_value_storage_t* stor, const char* head, const char* sep, const char* tail);
-
-
-#endif
+++ /dev/null
-#!/bin/sh
-UNIXSOCK=/var/run/powersensordaemon/cmd.sock
-TMPFILE=$(mktemp)
-echo "sample photo0" | usocket $UNIXSOCK -n > $TMPFILE &
-PID=$!
-echo "Content-type: text/html"
-echo ""
-A=0
-while [ ! -s $TMPFILE ]; do
- if [ $((A++)) -gt 2000 ]; then
- break
- else
- continue
- fi
-done
-cat $TMPFILE | cut -d' ' -f 2
-rm $TMPFILE
-kill $PID
-exit 0
+++ /dev/null
-/*
- * uAnytun
- *
- * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
- * featured implementation uAnytun has no support for multiple connections
- * or synchronisation. It is a small single threaded implementation intended
- * to act as a client on small platforms.
- * The secure anycast tunneling protocol (satp) defines a protocol used
- * for communication between any combination of unicast and anycast
- * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
- * mode and allows tunneling of every ETHER TYPE protocol (e.g.
- * ethernet, ip, arp ...). satp directly includes cryptography and
- * message authentication based on the methodes used by SRTP. It is
- * intended to deliver a generic, scaleable and secure solution for
- * tunneling and relaying of packets of any protocol.
- *
- *
- * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
- *
- * This file is part of uAnytun.
- *
- * uAnytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * uAnytun is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "datatypes.h"
-
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#define SYSLOG_NAMES
-#include <syslog.h>
-
-#include "log.h"
-
-log_t stdlog;
-
-#include "log_targets.h"
-
-const char* log_prio_to_string(log_prio_t prio)
-{
- switch(prio) {
- case ERROR: return "ERROR";
- case WARNING: return "WARNING";
- case NOTICE: return "NOTICE";
- case INFO: return "INFO";
- case DEBUG: return "DEBUG";
- }
- return "UNKNOWN";
-}
-
-log_target_type_t log_target_parse_type(const char* conf)
-{
- if(!conf)
- return TARGET_UNKNOWN;
-
- if(!strncmp(conf, "syslog", 6)) return TARGET_SYSLOG;
- if(!strncmp(conf, "file", 4)) return TARGET_FILE;
- if(!strncmp(conf, "stdout", 6)) return TARGET_STDOUT;
- if(!strncmp(conf, "stderr", 6)) return TARGET_STDERR;
-
- return TARGET_UNKNOWN;
-}
-
-int log_targets_target_exists(log_targets_t* targets, log_target_type_t type)
-{
- if(!targets && !targets->first_)
- return 0;
-
- log_target_t* tmp = targets->first_;
- while(tmp) {
- if(tmp->type_ == type)
- return 1;
- tmp = tmp->next_;
- }
- return 0;
-}
-
-int log_targets_add(log_targets_t* targets, const char* conf)
-{
- if(!targets)
- return -1;
-
- log_target_t* new_target = NULL;
- int duplicates_allowed = 0;
- switch(log_target_parse_type(conf)) {
- case TARGET_SYSLOG: new_target = log_target_syslog_new(); break;
- case TARGET_FILE: new_target = log_target_file_new(); duplicates_allowed = 1; break;
- case TARGET_STDOUT: new_target = log_target_stdout_new(); break;
- case TARGET_STDERR: new_target = log_target_stderr_new(); break;
- default: return -3;
- }
- if(!new_target)
- return -2;
-
- if(!duplicates_allowed && log_targets_target_exists(targets, new_target->type_)) {
- free(new_target);
- return -4;
- }
-
- const char* prioptr = strchr(conf, ':');
- if(!prioptr || prioptr[1] == 0) {
- free(new_target);
- return -1;
- }
- prioptr++;
- if(!isdigit(prioptr[0]) || (prioptr[1] != 0 && prioptr[1] != ',')) {
- free(new_target);
- return -1;
- }
- new_target->max_prio_ = prioptr[0] - '0';
- if(new_target->max_prio_ > 0)
- new_target->enabled_ = 1;
-
- if(new_target->init != NULL) {
- const char* confptr = NULL;
- if(prioptr[1] != 0)
- confptr = prioptr+2;
-
- int ret = (*new_target->init)(new_target, confptr);
- if(ret) {
- free(new_target);
- return ret;
- }
- }
-
- if(new_target->open != NULL)
- (*new_target->open)(new_target);
-
-
- if(!targets->first_) {
- targets->first_ = new_target;
- }
- else {
- log_target_t* tmp = targets->first_;
- while(tmp->next_)
- tmp = tmp->next_;
-
- tmp->next_ = new_target;
- }
- return 0;
-}
-
-void log_targets_log(log_targets_t* targets, log_prio_t prio, const char* msg)
-{
- if(!targets)
- return;
-
- log_target_t* tmp = targets->first_;
- while(tmp) {
- if(tmp->log != NULL && tmp->enabled_ && tmp->max_prio_ >= prio)
- (*tmp->log)(tmp, prio, msg);
-
- tmp = tmp->next_;
- }
-}
-
-void log_targets_clear(log_targets_t* targets)
-{
- if(!targets)
- return;
-
- while(targets->first_) {
- log_target_t* tmp = targets->first_;
- targets->first_ = tmp->next_;
- if(tmp->close != NULL)
- (*tmp->close)(tmp);
- if(tmp->clear != NULL)
- (*tmp->clear)(tmp);
- free(tmp);
- }
-}
-
-
-void log_init()
-{
- stdlog.max_prio_ = 0;
- stdlog.targets_.first_ = NULL;
-}
-
-void log_close()
-{
- log_targets_clear(&stdlog.targets_);
-}
-
-void update_max_prio()
-{
- log_target_t* tmp = stdlog.targets_.first_;
- while(tmp) {
- if(tmp->enabled_ && tmp->max_prio_ > stdlog.max_prio_)
- stdlog.max_prio_ = tmp->max_prio_;
-
- tmp = tmp->next_;
- }
-}
-
-int log_add_target(const char* conf)
-{
- if(!conf)
- return -1;
-
- int ret = log_targets_add(&stdlog.targets_, conf);
- if(!ret) update_max_prio();
- return ret;
-}
-
-void log_printf(log_prio_t prio, const char* fmt, ...)
-{
- if(stdlog.max_prio_ < prio)
- return;
-
- static char msg[MSG_LENGTH_MAX];
- va_list args;
-
- va_start(args, fmt);
- vsnprintf(msg, MSG_LENGTH_MAX, fmt, args);
- va_end(args);
-
- log_targets_log(&stdlog.targets_, prio, msg);
-}
-
-void log_print_hex_dump(log_prio_t prio, const u_int8_t* buf, u_int32_t len)
-{
- if(stdlog.max_prio_ < prio)
- return;
-
- static char msg[MSG_LENGTH_MAX];
-
- if(!buf) {
- snprintf(msg, MSG_LENGTH_MAX, "(NULL)");
- }
- else {
- u_int32_t i;
- int offset = snprintf(msg, MSG_LENGTH_MAX, "dump(%d): ", len);
- if(offset < 0)
- return;
- u_int8_t* ptr = &msg[offset];
-
- for(i=0; i < len; i++) {
- if(((i+1)*3) >= (MSG_LENGTH_MAX - offset))
- break;
- snprintf(ptr, 3, "%02X ", buf[i]);
- ptr+=3;
- }
- }
- log_targets_log(&stdlog.targets_, prio, msg);
-}
+++ /dev/null
-/*
- * uAnytun
- *
- * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
- * featured implementation uAnytun has no support for multiple connections
- * or synchronisation. It is a small single threaded implementation intended
- * to act as a client on small platforms.
- * The secure anycast tunneling protocol (satp) defines a protocol used
- * for communication between any combination of unicast and anycast
- * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
- * mode and allows tunneling of every ETHER TYPE protocol (e.g.
- * ethernet, ip, arp ...). satp directly includes cryptography and
- * message authentication based on the methodes used by SRTP. It is
- * intended to deliver a generic, scaleable and secure solution for
- * tunneling and relaying of packets of any protocol.
- *
- *
- * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
- *
- * This file is part of uAnytun.
- *
- * uAnytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * uAnytun is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef UANYTUN_log_h_INCLUDED
-#define UANYTUN_log_h_INCLUDED
-
-#define MSG_LENGTH_MAX 150
-
-enum log_prio_enum { ERROR = 1, WARNING = 2, NOTICE = 3,
- INFO = 4, DEBUG = 5 };
-typedef enum log_prio_enum log_prio_t;
-
-const char* log_prio_to_string(log_prio_t prio);
-
-enum log_target_type_enum { TARGET_SYSLOG , TARGET_STDOUT, TARGET_STDERR, TARGET_FILE , TARGET_UNKNOWN };
-typedef enum log_target_type_enum log_target_type_t;
-
-struct log_target_struct {
- log_target_type_t type_;
- int (*init)(struct log_target_struct* self, const char* conf);
- void (*open)(struct log_target_struct* self);
- void (*log)(struct log_target_struct* self, log_prio_t prio, const char* msg);
- void (*close)(struct log_target_struct* self);
- void (*clear)(struct log_target_struct* self);
- int opened_;
- int enabled_;
- log_prio_t max_prio_;
- void* param_;
- struct log_target_struct* next_;
-};
-typedef struct log_target_struct log_target_t;
-
-
-struct log_targets_struct {
- log_target_t* first_;
-};
-typedef struct log_targets_struct log_targets_t;
-
-int log_targets_target_exists(log_targets_t* targets, log_target_type_t type);
-int log_targets_add(log_targets_t* targets, const char* conf);
-void log_targets_log(log_targets_t* targets, log_prio_t prio, const char* msg);
-void log_targets_clear(log_targets_t* targets);
-
-
-struct log_struct {
- log_prio_t max_prio_;
- log_targets_t targets_;
-};
-typedef struct log_struct log_t;
-
-void log_init();
-void log_close();
-void update_max_prio();
-int log_add_target(const char* conf);
-void log_printf(log_prio_t prio, const char* fmt, ...);
-void log_print_hex_dump(log_prio_t prio, const u_int8_t* buf, u_int32_t len);
-
-#endif
+++ /dev/null
-/*
- * uAnytun
- *
- * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
- * featured implementation uAnytun has no support for multiple connections
- * or synchronisation. It is a small single threaded implementation intended
- * to act as a client on small platforms.
- * The secure anycast tunneling protocol (satp) defines a protocol used
- * for communication between any combination of unicast and anycast
- * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
- * mode and allows tunneling of every ETHER TYPE protocol (e.g.
- * ethernet, ip, arp ...). satp directly includes cryptography and
- * message authentication based on the methodes used by SRTP. It is
- * intended to deliver a generic, scaleable and secure solution for
- * tunneling and relaying of packets of any protocol.
- *
- *
- * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
- *
- * This file is part of uAnytun.
- *
- * uAnytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * uAnytun is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef UANYTUN_log_targets_h_INCLUDED
-#define UANYTUN_log_targets_h_INCLUDED
-
-#include <time.h>
-
-static char* get_time_formatted()
-{
- char* time_string;
- time_t t = time(NULL);
- if(t < 0)
- time_string = "<time read error>";
- else {
- time_string = ctime(&t);
- if(!time_string)
- time_string = "<time format error>";
- else {
- char* newline = strchr(time_string, '\n');
- if(newline)
- newline[0] = 0;
- }
- }
- return time_string;
-}
-
-enum syslog_facility_enum { USER = LOG_USER, MAIL = LOG_MAIL,
- DAEMON = LOG_DAEMON, AUTH = LOG_AUTH,
- SYSLOG = LOG_SYSLOG, LPR = LOG_LPR,
- NEWS = LOG_NEWS, UUCP = LOG_UUCP,
- CRON = LOG_CRON, AUTHPRIV = LOG_AUTHPRIV,
- FTP = LOG_FTP, LOCAL0 = LOG_LOCAL0,
- LOCAL1 = LOG_LOCAL1, LOCAL2 = LOG_LOCAL2,
- LOCAL3 = LOG_LOCAL3, LOCAL4 = LOG_LOCAL4,
- LOCAL5 = LOG_LOCAL5, LOCAL6 = LOG_LOCAL6,
- LOCAL7 = LOG_LOCAL7 };
-typedef enum syslog_facility_enum syslog_facility_t;
-
-struct log_target_syslog_param_struct {
- char* logname_;
- syslog_facility_t facility_;
-};
-typedef struct log_target_syslog_param_struct log_target_syslog_param_t;
-
-int log_target_syslog_init(log_target_t* self, const char* conf)
-{
- if(!self || (conf && conf[0] == 0))
- return -1;
-
- self->param_ = malloc(sizeof(log_target_syslog_param_t));
- if(!self->param_)
- return -2;
-
- char* logname;
- const char* end = NULL;
- if(!conf)
- logname = strdup("uanytun");
- else {
- end = strchr(conf, ',');
- if(end) {
- size_t len = (size_t)(end - conf);
- if(!len) {
- free(self->param_);
- return -1;
- }
- logname = malloc(len+1);
- if(logname) {
- strncpy(logname, conf, len);
- logname[len] = 0;
- }
- }
- else
- logname = strdup(conf);
- }
-
- if(!logname) {
- free(self->param_);
- return -2;
- }
- ((log_target_syslog_param_t*)(self->param_))->logname_ = logname;
-
- if(!end) {
- ((log_target_syslog_param_t*)(self->param_))->facility_ = DAEMON;
- return 0;
- }
-
- if(end[1] == 0 || end[1] == ',') {
- free(logname);
- free(self->param_);
- return -1;
- }
-
- const char* start = end + 1;
- end = strchr(start, ',');
- int i;
- for(i=0;;++i) {
- if(facilitynames[i].c_name == NULL) {
- free(logname);
- free(self->param_);
- return -1;
- }
-
- if(( end && !strncmp(start, facilitynames[i].c_name, (size_t)(end - start)) && facilitynames[i].c_name[(size_t)(end-start)] == 0) ||
- (!end && !strcmp(start, facilitynames[i].c_name))) {
- ((log_target_syslog_param_t*)(self->param_))->facility_ = facilitynames[i].c_val;
- break;
- }
- }
-
- return 0;
-}
-
-void log_target_syslog_open(log_target_t* self)
-{
- if(!self || !self->param_)
- return;
-
- openlog(((log_target_syslog_param_t*)(self->param_))->logname_, LOG_PID, ((log_target_syslog_param_t*)(self->param_))->facility_);
- self->opened_ = 1;
-}
-
-void log_target_syslog_log(log_target_t* self, log_prio_t prio, const char* msg)
-{
- if(!self || !self->param_ || !self->opened_)
- return;
-
- syslog((prio + 2) | ((log_target_syslog_param_t*)(self->param_))->facility_, "%s", msg);
-}
-
-void log_target_syslog_close(log_target_t* self)
-{
- closelog();
- self->opened_ = 0;
-}
-
-void log_target_syslog_clear(log_target_t* self)
-{
- if(!self || !self->param_)
- return;
-
- if(((log_target_syslog_param_t*)(self->param_))->logname_)
- free(((log_target_syslog_param_t*)(self->param_))->logname_);
-
- free(self->param_);
-}
-
-log_target_t* log_target_syslog_new()
-{
- log_target_t* tmp = malloc(sizeof(log_target_t));
- if(!tmp)
- return NULL;
-
- tmp->type_ = TARGET_SYSLOG;
- tmp->init = &log_target_syslog_init;
- tmp->open = &log_target_syslog_open;
- tmp->log = &log_target_syslog_log;
- tmp->close = &log_target_syslog_close;
- tmp->clear = &log_target_syslog_clear;
- tmp->opened_ = 0;
- tmp->enabled_ = 0;
- tmp->max_prio_ = NOTICE;
- tmp->param_ = NULL;
- tmp->next_ = NULL;
-
- return tmp;
-}
-
-
-struct log_target_file_param_struct {
- char* logfilename_;
- FILE* file_;
-};
-typedef struct log_target_file_param_struct log_target_file_param_t;
-
-int log_target_file_init(log_target_t* self, const char* conf)
-{
- if(!self || (conf && conf[0] == 0))
- return -1;
-
- self->param_ = malloc(sizeof(log_target_file_param_t));
- if(!self->param_)
- return -2;
-
- char* logfilename;
- if(!conf)
- logfilename = strdup("uanytun.log");
- else {
- const char* end = strchr(conf, ',');
- if(end) {
- size_t len = (size_t)(end - conf);
- if(!len) {
- free(self->param_);
- return -1;
- }
- logfilename = malloc(len+1);
- if(logfilename) {
- strncpy(logfilename, conf, len);
- logfilename[len] = 0;
- }
- }
- else
- logfilename = strdup(conf);
- }
-
- if(!logfilename) {
- free(self->param_);
- return -2;
- }
- ((log_target_file_param_t*)(self->param_))->logfilename_ = logfilename;
- ((log_target_file_param_t*)(self->param_))->file_ = NULL;
-
- return 0;
-}
-
-void log_target_file_open(log_target_t* self)
-{
- if(!self || !self->param_)
- return;
-
- ((log_target_file_param_t*)(self->param_))->file_ = fopen(((log_target_file_param_t*)(self->param_))->logfilename_, "w");
- if(((log_target_file_param_t*)(self->param_))->file_)
- self->opened_ = 1;
-}
-
-void log_target_file_log(log_target_t* self, log_prio_t prio, const char* msg)
-{
- if(!self || !self->param_ || !self->opened_)
- return;
-
- fprintf(((log_target_file_param_t*)(self->param_))->file_, "%s %s: %s\n", get_time_formatted(), log_prio_to_string(prio), msg);
- fflush(((log_target_file_param_t*)(self->param_))->file_);
-}
-
-void log_target_file_close(log_target_t* self)
-{
- if(!self || !self->param_)
- return;
-
- fclose(((log_target_file_param_t*)(self->param_))->file_);
- self->opened_ = 0;
-}
-
-void log_target_file_clear(log_target_t* self)
-{
- if(!self || !self->param_)
- return;
-
- if(((log_target_file_param_t*)(self->param_))->logfilename_)
- free(((log_target_file_param_t*)(self->param_))->logfilename_);
-
- free(self->param_);
-}
-
-
-log_target_t* log_target_file_new()
-{
- log_target_t* tmp = malloc(sizeof(log_target_t));
- if(!tmp)
- return NULL;
-
- tmp->type_ = TARGET_FILE;
- tmp->init = &log_target_file_init;
- tmp->open = &log_target_file_open;
- tmp->log = &log_target_file_log;
- tmp->close = &log_target_file_close;
- tmp->clear = &log_target_file_clear;
- tmp->opened_ = 0;
- tmp->enabled_ = 0;
- tmp->max_prio_ = NOTICE;
- tmp->param_ = NULL;
- tmp->next_ = NULL;
-
- return tmp;
-}
-
-
-void log_target_stdout_log(log_target_t* self, log_prio_t prio, const char* msg)
-{
- printf("%s %s: %s\n", get_time_formatted(), log_prio_to_string(prio), msg);
-}
-
-log_target_t* log_target_stdout_new()
-{
- log_target_t* tmp = malloc(sizeof(log_target_t));
- if(!tmp)
- return NULL;
-
- tmp->type_ = TARGET_STDOUT;
- tmp->init = NULL;
- tmp->open = NULL;
- tmp->log = &log_target_stdout_log;
- tmp->close = NULL;
- tmp->clear = NULL;
- tmp->opened_ = 0;
- tmp->enabled_ = 0;
- tmp->max_prio_ = NOTICE;
- tmp->param_ = NULL;
- tmp->next_ = NULL;
-
- return tmp;
-}
-
-
-void log_target_stderr_log(log_target_t* self, log_prio_t prio, const char* msg)
-{
- fprintf(stderr, "%s %s: %s\n", get_time_formatted(), log_prio_to_string(prio), msg);
-}
-
-log_target_t* log_target_stderr_new()
-{
- log_target_t* tmp = malloc(sizeof(log_target_t));
- if(!tmp)
- return NULL;
-
- tmp->type_ = TARGET_STDERR;
- tmp->init = NULL;
- tmp->open = NULL;
- tmp->log = &log_target_stderr_log;
- tmp->close = NULL;
- tmp->clear = NULL;
- tmp->opened_ = 0;
- tmp->enabled_ = 0;
- tmp->max_prio_ = NOTICE;
- tmp->param_ = NULL;
- tmp->next_ = NULL;
-
- return tmp;
-}
-
-#endif
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "datatypes.h"
-
-#include "options.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include "log.h"
-
-#define PARSE_BOOL_PARAM(SHORT, LONG, VALUE) \
- else if(!strcmp(str,SHORT) || !strcmp(str,LONG)) \
- VALUE = 1;
-
-#define PARSE_INVERSE_BOOL_PARAM(SHORT, LONG, VALUE) \
- else if(!strcmp(str,SHORT) || !strcmp(str,LONG)) \
- VALUE = 0;
-
-#define PARSE_INT_PARAM(SHORT, LONG, VALUE) \
- else if(!strcmp(str,SHORT) || !strcmp(str,LONG)) \
- { \
- if(argc < 1) \
- return i; \
- VALUE = atoi(argv[i+1]); \
- argc--; \
- i++; \
- }
-
-#define PARSE_STRING_PARAM(SHORT, LONG, VALUE) \
- else if(!strcmp(str,SHORT) || !strcmp(str,LONG)) \
- { \
- if(argc < 1 || argv[i+1][0] == '-') \
- return i; \
- if(VALUE) free(VALUE); \
- VALUE = strdup(argv[i+1]); \
- if(!VALUE) \
- return -2; \
- argc--; \
- i++; \
- }
-
-#define PARSE_STRING_PARAM_SEC(SHORT, LONG, VALUE) \
- else if(!strcmp(str,SHORT) || !strcmp(str,LONG)) \
- { \
- if(argc < 1 || argv[i+1][0] == '-') \
- return i; \
- if(VALUE) free(VALUE); \
- VALUE = strdup(argv[i+1]); \
- if(!VALUE) \
- return -2; \
- size_t j; \
- for(j=0; j < strlen(argv[i+1]); ++j) \
- argv[i+1][j] = '#'; \
- argc--; \
- i++; \
- }
-
-#define PARSE_HEXSTRING_PARAM_SEC(SHORT, LONG, VALUE) \
- else if(!strcmp(str,SHORT) || !strcmp(str,LONG)) \
- { \
- if(argc < 1 || argv[i+1][0] == '-') \
- return i; \
- int ret; \
- ret = options_parse_hex_string(argv[i+1], &VALUE); \
- if(ret > 0) \
- return i+1; \
- else if(ret < 0) \
- return ret; \
- size_t j; \
- for(j=0; j < strlen(argv[i+1]); ++j) \
- argv[i+1][j] = '#'; \
- argc--; \
- i++; \
- }
-
-#define PARSE_STRING_LIST(SHORT, LONG, LIST) \
- else if(!strcmp(str,SHORT) || !strcmp(str,LONG)) \
- { \
- if(argc < 1 || argv[i+1][0] == '-') \
- return i; \
- int ret = string_list_add(&LIST, argv[i+1]); \
- if(ret == -2) \
- return ret; \
- else if(ret) \
- return i+1; \
- argc--; \
- i++; \
- }
-
-#define PARSE_KEY_VALUE(SHORT, LONG, SEP, KV) \
- else if(!strcmp(str,SHORT) || !strcmp(str,LONG)) \
- { \
- if(argc < 1 || argv[i+1][0] == '-') \
- return i; \
- char* value = strchr(argv[i+1], SEP); \
- if(!value || value[1] == 0) \
- return i+1; \
- value[0] = 0; \
- value++; \
- if(key_value_storage_add(&KV, argv[i+1], value)) \
- return -2; \
- argc--; \
- i++; \
- }
-
-int options_parse_hex_string(const char* hex, buffer_t* buffer)
-{
- if(!hex || !buffer)
- return -1;
-
- u_int32_t hex_len = strlen(hex);
- if(hex_len%2)
- return 1;
-
- if(buffer->buf_)
- free(buffer->buf_);
-
- buffer->length_ = hex_len/2;
- buffer->buf_ = malloc(buffer->length_);
- if(!buffer->buf_) {
- buffer->length_ = 0;
- return -2;
- }
-
- const char* ptr = hex;
- int i;
- for(i=0;i<buffer->length_;++i) {
- u_int32_t tmp;
- sscanf(ptr, "%2X", &tmp);
- buffer->buf_[i] = (u_int8_t)tmp;
- ptr += 2;
- }
-
- return 0;
-}
-
-
-
-int options_parse(options_t* opt, int argc, char* argv[])
-{
- if(!opt)
- return -1;
-
- options_default(opt);
-
- if(opt->progname_)
- free(opt->progname_);
- opt->progname_ = strdup(argv[0]);
- if(!opt->progname_)
- return -2;
-
- argc--;
-
- int i;
- for(i=1; argc > 0; ++i)
- {
- char* str = argv[i];
- argc--;
-
- if(!strcmp(str,"-h") || !strcmp(str,"--help"))
- return -1;
- PARSE_INVERSE_BOOL_PARAM("-D","--nodaemonize", opt->daemonize_)
- PARSE_STRING_PARAM("-u","--username", opt->username_)
- PARSE_STRING_PARAM("-g","--groupname", opt->groupname_)
- PARSE_STRING_PARAM("-C","--chroot", opt->chroot_dir_)
- PARSE_STRING_PARAM("-P","--write-pid", opt->pid_file_)
- PARSE_STRING_LIST("-L","--log", opt->log_targets_)
- PARSE_STRING_PARAM("-d","--device", opt->tty_dev_)
- PARSE_STRING_PARAM("-s","--socket", opt->command_sock_)
- PARSE_STRING_PARAM("-p","--powerid-file", opt->powerid_file_)
- PARSE_STRING_PARAM("-a","--sampledev-file", opt->sampledev_file_)
- PARSE_KEY_VALUE("-A","--autosampledev", ',', opt->autosampledevs_)
- else
- return i;
- }
-
- return 0;
-}
-
-
-int options_parse_key_value_file(const char* filename, key_value_storage_t* storage)
-{
- FILE* file = fopen(filename, "r");
- if(file) {
- char buf[100];
- while(fgets(buf, 100, file) != NULL) {
- char* tmp, *key, *value;
- for(tmp = buf;*tmp == ' '; ++tmp);
- if(*(key = tmp) == 0) continue;
- for(;*tmp != ' ' && *tmp != 0;++tmp);
- if(*tmp == 0) continue;
- *tmp=0;
- ++tmp;
- for(;*tmp == ' ';++tmp);
- if(*(value = tmp) == 0) continue;
- for(;*tmp != ' ' && *tmp != 0 && *tmp != '\n';++tmp);
- *tmp = 0;
-
- if(key_value_storage_add(storage, key, value))
- return -2;
- }
- fclose(file);
- }
- else {
- log_printf(ERROR,"unable to open conf file (%s): %s", filename, strerror(errno));
- return -1;
- }
-}
-
-int options_parse_post(options_t* opt)
-{
- if(!opt)
- return -1;
-
- if(opt->powerid_file_) {
- int ret = options_parse_key_value_file(opt->powerid_file_, &opt->powerids_);
- if(ret)
- return ret;
- }
-
- if(opt->sampledev_file_) {
- int ret = options_parse_key_value_file(opt->sampledev_file_, &opt->sampledevs_);
- if(ret)
- return ret;
- }
-
- string_list_element_t* k = opt->autosampledevs_.keys_.first_;
- string_list_element_t* v = opt->autosampledevs_.values_.first_;
- while(k && v) {
- if(!key_value_storage_find(&opt->sampledevs_, k->string_)) {
- log_printf(ERROR, "sample dev '%s' not in file '%s'", k->string_, opt->sampledev_file_);
- return -1;
- }
- if(atoi(v->string_) <= 0) {
- log_printf(ERROR, "invalid rate '%s' for sample dev '%s'", v->string_, k->string_);
- return -1;
- }
- k = k->next_;
- v = v->next_;
- }
-
- return 0;
-}
-
-void options_default(options_t* opt)
-{
- if(!opt)
- return;
-
- opt->progname_ = strdup("powersensordaemon");
- opt->daemonize_ = 1;
- opt->username_ = NULL;
- opt->groupname_ = NULL;
- opt->chroot_dir_ = NULL;
- opt->pid_file_ = NULL;
- string_list_init(&opt->log_targets_);
-
- opt->tty_dev_ = strdup("/dev/ttyUSB0");
- opt->command_sock_ = strdup("/var/run/powersensordaemon/cmd.sock");
- opt->powerid_file_ = NULL;
- key_value_storage_init(&opt->powerids_);
- opt->sampledev_file_ = NULL;
- key_value_storage_init(&opt->sampledevs_);
- key_value_storage_init(&opt->autosampledevs_);
-}
-
-void options_clear(options_t* opt)
-{
- if(!opt)
- return;
-
- if(opt->progname_)
- free(opt->progname_);
- if(opt->username_)
- free(opt->username_);
- if(opt->groupname_)
- free(opt->groupname_);
- if(opt->chroot_dir_)
- free(opt->chroot_dir_);
- if(opt->pid_file_)
- free(opt->pid_file_);
- string_list_clear(&opt->log_targets_);
-
- if(opt->tty_dev_)
- free(opt->tty_dev_);
- if(opt->command_sock_)
- free(opt->command_sock_);
- if(opt->powerid_file_)
- free(opt->powerid_file_);
- key_value_storage_clear(&opt->powerids_);
- if(opt->sampledev_file_)
- free(opt->sampledev_file_);
- key_value_storage_clear(&opt->sampledevs_);
- key_value_storage_clear(&opt->autosampledevs_);
-}
-
-void options_print_usage()
-{
- printf("USAGE:\n");
- printf("powersensordaemon [-h|--help] prints this...\n");
- printf(" [-D|--nodaemonize] don't run in background\n");
- printf(" [-u|--username] <username> change to this user\n");
- printf(" [-g|--groupname] <groupname> change to this group\n");
- printf(" [-C|--chroot] <path> chroot to this directory\n");
- printf(" [-P|--write-pid] <path> write pid to this file\n");
- printf(" [-L|--log] <target>:<level>[,<param1>[,<param2>..]]\n");
- printf(" add a log target, can be invoked several times\n");
-
- printf(" [-d|--device] <tty device> the device file e.g. /dev/ttyUSB0\n");
- printf(" [-s|--command-sock] <unix sock> the command socket e.g. /var/run/powersensordaemon/cmd.sock\n");
- printf(" [-p|--powerid-file] <path> file that contains the power ids\n");
- printf(" [-a|--sampledev-file] <path> file that contains all sample devices\n");
- printf(" [-A|--autosampledev] <device>,<delay between samples in seconds>\n");
- printf(" automatic sample this devices, can be invoked several times\n");
-}
-
-void options_print(options_t* opt)
-{
- if(!opt)
- return;
-
- printf("progname: '%s'\n", opt->progname_);
- printf("daemonize: %d\n", opt->daemonize_);
- printf("username: '%s'\n", opt->username_);
- printf("groupname: '%s'\n", opt->groupname_);
- printf("chroot_dir: '%s'\n", opt->chroot_dir_);
- printf("pid_file: '%s'\n", opt->pid_file_);
- printf("log_targets: \n");
- string_list_print(&opt->log_targets_, " '", "'\n");
-
- printf("tty_dev: '%s'\n", opt->tty_dev_);
- printf("command_sock: '%s'\n", opt->command_sock_);
- printf("powerid_file: '%s'\n", opt->powerid_file_);
- printf("powerids: \n");
- key_value_storage_print(&opt->powerids_, " '", "' -> '", "'\n");
- printf("sampledev_file: '%s'\n", opt->sampledev_file_);
- printf("sampledevs: \n");
- key_value_storage_print(&opt->sampledevs_, " '", "' -> '", "'\n");
- printf("autosampledevs: \n");
- key_value_storage_print(&opt->autosampledevs_, " '", "' -> '", "'\n");
-}
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef POWERSENSORDAEMON_options_h_INCLUDED
-#define POWERSENSORDAEMON_options_h_INCLUDED
-
-#include "string_list.h"
-#include "key_value_storage.h"
-
-struct options_struct {
- char* progname_;
- int daemonize_;
- char* username_;
- char* groupname_;
- char* chroot_dir_;
- char* pid_file_;
- string_list_t log_targets_;
-
- char* tty_dev_;
- char* command_sock_;
- char* powerid_file_;
- key_value_storage_t powerids_;
- char* sampledev_file_;
- key_value_storage_t sampledevs_;
- key_value_storage_t autosampledevs_;
-};
-typedef struct options_struct options_t;
-
-int options_parse_hex_string(const char* hex, buffer_t* buffer);
-
-int options_parse(options_t* opt, int argc, char* argv[]);
-int options_parse_key_value_file(const char* filename, key_value_storage_t* storage);
-int options_parse_post(options_t* opt);
-void options_default(options_t* opt);
-void options_clear(options_t* opt);
-void options_print_usage();
-void options_print(options_t* opt);
-
-#endif
+++ /dev/null
-/*
- * powersensordaemon
- *
- * Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of powersensordaemon.
- *
- * powersensordaemon is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * powersensordaemon is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "datatypes.h"
-
-#include <termios.h>
-#include <unistd.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-#include <sys/un.h>
-
-#include "log.h"
-#include "sig_handler.h"
-#include "options.h"
-
-#include "command_queue.h"
-#include "client_list.h"
-
-#include "daemon.h"
-
-#include "autosample.h"
-
-int init_command_socket(const char* path)
-{
- int fd = socket(AF_UNIX, SOCK_STREAM, 0);
- if(fd < 0) {
- log_printf(ERROR, "unable to open socket: %s", strerror(errno));
- return -1;
- }
-
- struct sockaddr_un local;
- local.sun_family = AF_UNIX;
- if(sizeof(local.sun_path) <= strlen(path)) {
- log_printf(ERROR, "socket path is to long (max %d)", sizeof(local.sun_path)-1);
- return -1;
- }
- strcpy(local.sun_path, path);
- unlink(local.sun_path);
- int len = SUN_LEN(&local);
- int ret = bind(fd, (struct sockaddr*)&local, len);
- if(ret) {
- log_printf(ERROR, "unable to bind to '%s': %s", local.sun_path, strerror(errno));
- return -1;
- }
-
- ret = listen(fd, 4);
- if(ret) {
- log_printf(ERROR, "unable to listen on command socket: %s", local.sun_path, strerror(errno));
- return -1;
- }
-
- log_printf(INFO, "now listening on %s for incoming commands", path);
-
- return fd;
-}
-
-void clear_fd(int fd)
-{
- fd_set fds;
- struct timeval tv;
- FD_ZERO(&fds);
- FD_SET(fd, &fds);
- tv.tv_sec = 0;
- tv.tv_usec = 50000;
- for(;;) {
- int ret = select(fd+1, &fds, NULL, NULL, &tv);
- if(ret > 0) {
- char buffer[100];
- ret = read(fd, buffer, sizeof(buffer));
- }
- else
- break;
- }
-}
-
-int send_command(int tty_fd, cmd_t* cmd)
-{
- if(!cmd)
- return -1;
-
- if(!cmd->param)
- return 0;
-
- unsigned int j,cmd_param_len = strnlen(cmd->param,60);
-
- char c[cmd_param_len];
- switch(cmd->cmd) {
- case POWER_ON: {
- for (j=0; j< cmd_param_len; j++)
- c[j] = toupper(cmd->param[j]);
- break;
- }
- case POWER_OFF: {
- for (j=0; j< cmd_param_len; j++)
- c[j] = tolower(cmd->param[j]);
- break;
- }
- case SAMPLE: {
- for (j=0; j< cmd_param_len; j++)
- c[j] = cmd->param[j];
- break;
- }
- default: return 0;
- }
-
- int ret;
- do {
- ret = write(tty_fd, c, cmd_param_len);
- } while(!ret || (ret == -1 && errno == EINTR));
-
- if(ret > 0) {
- cmd_sent(cmd);
- return 0;
- }
-
- return ret;
-}
-
-int send_response(int fd, const char* response)
-{
- if(!response)
- return -1;
-
- int len = strlen(response);
- int offset = 0;
- int ret;
- for(;;) {
- ret = write(fd, &response[offset], len - offset);
- if(ret < 0) {
- if(errno != EINTR)
- return ret;
-
- ret = 0;
- }
-
- offset += ret;
- if(offset+1 >= len)
- break;
- }
- do {
- ret = write(fd, "\n", 1);
- } while(!ret || (ret == -1 && errno == EINTR));
-
- if(ret > 0)
- return 0;
-
- return ret;
-}
-
-#define SEND_TO_LISTENER(LISTENER_TYPE, TYPE_NAME, FD, STRING) \
- client_t* client; \
- int listener_cnt = 0; \
- for(client = client_lst; client; client = client->next) \
- if(client->LISTENER_TYPE && client->fd != FD) { \
- send_response(client->fd, STRING); \
- listener_cnt++; \
- } \
- log_printf(DEBUG, "sent %s to %d additional listeners", TYPE_NAME,listener_cnt);
-
-
-int process_cmd(char* cmd, int fd, cmd_t **cmd_q, client_t* client_lst, options_t* opt)
-{
- log_printf(DEBUG, "processing command from %d", fd);
-
- if(!cmd_q || !cmd)
- return -1;
-
- cmd_id_t cmd_id;
- if(!strncmp(cmd, "power on", 8)) {
- cmd_id = POWER_ON;
- cmd[5] = '_';
- }
- else if(!strncmp(cmd, "power off", 9)) {
- cmd_id = POWER_OFF;
- cmd[5] = '_';
- }
- else if(!strncmp(cmd, "sample", 6))
- cmd_id = SAMPLE;
- else if(!strncmp(cmd, "log", 3))
- cmd_id = LOG;
- else if(!strncmp(cmd, "listen", 6)) {
- cmd_id = LISTEN;
- }
- else {
- log_printf(WARNING, "unknown command '%s'", cmd);
- return 0;
- }
- char* param = strchr(cmd, ' ');
- if(param)
- param++;
-
- if(cmd_id == POWER_ON || cmd_id == POWER_OFF) {
- char* orig_param = param;
- param = key_value_storage_find(&(opt->powerids_), param);
- if(!param) {
- send_response(fd, "Error: invalid power id");
- log_printf(WARNING, "invalid power id '%s' in command from %d", orig_param, fd);
- }
- }
-
- if(cmd_id == SAMPLE) {
- char* orig_param = param;
- param = key_value_storage_find(&(opt->sampledevs_), param);
- if(!param) {
- send_response(fd, "Error: invalid sample device");
- log_printf(WARNING, "invalid sample device '%s' in command from %d", orig_param, fd);
- }
- }
-
- if(cmd_id == POWER_ON || cmd_id == POWER_OFF || cmd_id == SAMPLE) {
- char* resp;
- asprintf(&resp, "Request: %s", cmd);
- if(resp) {
- char* linefeed = strchr(resp, '\n');
- if(linefeed) linefeed[0] = 0;
- SEND_TO_LISTENER(request_listener, "request", fd, resp);
- free(resp);
- }
-// else silently ignore memory alloc error
- }
-
- switch(cmd_id) {
- case POWER_ON:
- case POWER_OFF:
- case SAMPLE: {
- int ret = cmd_push(cmd_q, fd, cmd_id, param);
- if(ret)
- return ret;
-
- log_printf(NOTICE, "command: %s", cmd);
- break;
- }
- case LOG: {
- if(param && param[0])
- log_printf(NOTICE, "ext msg: %s", param);
- else
- log_printf(DEBUG, "ignoring empty ext log message");
- break;
- }
- case LISTEN: {
- client_t* listener = client_find(client_lst, fd);
- if(listener) {
- if(!param || !strncmp(param, "all", 3)) {
- listener->request_listener = 1;
- listener->error_listener = 1;
- listener->sensor_listener = 1;
- listener->movement_listener = 1;
- listener->button_listener = 1;
- }
- else if(!strncmp(param, "none", 4)) {
- listener->request_listener = 0;
- listener->error_listener = 0;
- listener->sensor_listener = 0;
- listener->movement_listener = 0;
- listener->button_listener = 0;
- }
- else if(!strncmp(param, "request", 7))
- listener->request_listener = 1;
- else if(!strncmp(param, "error", 5))
- listener->error_listener = 1;
- else if(!strncmp(param, "sensor", 6))
- listener->sensor_listener = 1;
- else if(!strncmp(param, "movement", 8))
- listener->movement_listener = 1;
- else if(!strncmp(param, "button", 6))
- listener->button_listener = 1;
- else {
- log_printf(DEBUG, "unkown listener type '%s'", param);
- break;
- }
- log_printf(DEBUG, "listener %d requests %s messages", fd, param ? param:"all");
- }
- else {
- log_printf(ERROR, "unable to add listener %d", fd);
- }
- break;
- }
- }
-
- return 0;
-}
-
-int nonblock_readline(read_buffer_t* buffer, int fd, cmd_t** cmd_q, client_t* client_lst, options_t* opt)
-{
- int ret = 0;
- for(;;) {
- ret = read(fd, &buffer->buf[buffer->offset], 1);
- if(!ret || (ret == -1 && errno == EBADF))
- return 2;
- if(ret == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))
- return 0;
- else if(ret < 0)
- break;
-
- if(buffer->buf[buffer->offset] == '\n') {
- buffer->buf[buffer->offset] = 0;
- ret = process_cmd(buffer->buf, fd, cmd_q, client_lst, opt);
- buffer->offset = 0;
- break;
- }
-
- buffer->offset++;
- if(buffer->offset >= sizeof(buffer->buf)) {
- log_printf(DEBUG, "string too long (fd=%d)", fd);
- buffer->offset = 0;
- return 0;
- }
- }
-
- return ret;
-}
-
-int process_tty(read_buffer_t* buffer, int tty_fd, cmd_t **cmd_q, client_t* client_lst, options_t* opt)
-{
- u_int8_t *response_data;
- int ret = 0;
- struct timeval tv;
- fd_set fds;
- FD_ZERO(&fds);
- FD_SET(tty_fd, &fds);
-
- for(;;) {
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- ret = select(tty_fd+1, &fds, NULL, NULL, &tv);
- if(!ret)
- return 0;
- else if(ret < 0)
- return ret;
-
- ret = read(tty_fd, &buffer->buf[buffer->offset], 1);
- if(!ret)
- return 2;
- if(ret == -1 && errno == EAGAIN)
- return 0;
- else if(ret < 0)
- break;
-
- if(buffer->buf[buffer->offset] == '\n') {
- buffer->buf[buffer->offset] = 0;
-
- if(buffer->offset > 0 && buffer->buf[buffer->offset-1] == '\r')
- buffer->buf[buffer->offset-1] = 0;
-
- log_printf(NOTICE, "firmware: %s", buffer->buf);
-
- /* modify response if necessary */
- response_data = buffer->buf;
- if(!strncmp(buffer->buf, "Sensor ", 7)) {
- if (buffer->buf[7] != 0)
- {
- char *sampledev_key;
- if (asprintf(&sampledev_key, "%c",buffer->buf[7]))
- {
- char const *sampledev_name = key_value_storage_find_first_stringvalue(&(opt->sampledevs_), sampledev_key);
- if(sampledev_name)
- {
- char *rev_lookuped_output;
- if (asprintf(&rev_lookuped_output, "%s%s", sampledev_name, &(buffer->buf[8]) ))
- response_data = rev_lookuped_output;
- }
- else
- log_printf(WARNING, "unknown sample device key '%s' encountered", sampledev_key);
- free(sampledev_key);
- }
- }
- }
-
- int cmd_fd = -1;
- if(cmd_q && (*cmd_q)) {
- cmd_fd = (*cmd_q)->fd;
- send_response(cmd_fd, response_data);
- }
-
- if(!strncmp(buffer->buf, "Error:", 6)) {
- SEND_TO_LISTENER(error_listener, "error", cmd_fd, response_data);
- }
-
- if(!strncmp(buffer->buf, "movement", 8)) {
- SEND_TO_LISTENER(movement_listener, "movement", cmd_fd, response_data);
- }
-
- if(!strncmp(buffer->buf, "PanicButton", 11)) {
- SEND_TO_LISTENER(button_listener, "panic button", cmd_fd, response_data);
- }
-
- if(!strncmp(buffer->buf, "Sensor ", 7)) {
- SEND_TO_LISTENER(sensor_listener, "sensor data", cmd_fd, response_data);
- }
-
- /* free allocated buffer if response was modified */
- if (response_data != buffer->buf)
- free(response_data);
-
- cmd_pop(cmd_q);
- buffer->offset = 0;
- return 0;
- }
-
- buffer->offset++;
- if(buffer->offset >= sizeof(buffer->buf)) {
- log_printf(DEBUG, "string too long (fd=%d)", tty_fd);
- buffer->offset = 0;
- return 0;
- }
- }
-
- return ret;
-}
-
-int main_loop(int tty_fd, int cmd_listen_fd, autosample_process_t* autosample, options_t* opt)
-{
- log_printf(NOTICE, "entering main loop");
-
- fd_set readfds, tmpfds;
- FD_ZERO(&readfds);
-
- clear_fd(tty_fd);
- FD_SET(tty_fd, &readfds);
- FD_SET(cmd_listen_fd, &readfds);
- int max_fd = tty_fd > cmd_listen_fd ? tty_fd : cmd_listen_fd;
-
- u_int8_t autosample_enabled = 0;
- if(autosample->pid_ > 0) {
- clear_fd(autosample->write_fd_);
- FD_SET(autosample->write_fd_, &readfds);
- max_fd = (max_fd < autosample->write_fd_) ? autosample->write_fd_ : max_fd;
- }
- cmd_t* cmd_q = NULL;
- client_t* client_lst = NULL;
-
- read_buffer_t tty_buffer;
- tty_buffer.offset = 0;
- read_buffer_t autosample_buffer;
- autosample_buffer.offset = 0;
-
- int sig_fd = signal_init();
- if(sig_fd < 0)
- return -1;
- FD_SET(sig_fd, &readfds);
- max_fd = (max_fd < sig_fd) ? sig_fd : max_fd;
-
- struct timeval timeout;
- int return_value = 0;
- while(!return_value) {
- memcpy(&tmpfds, &readfds, sizeof(tmpfds));
-
- timeout.tv_sec = 0;
- timeout.tv_usec = 200000;
- int ret = select(max_fd+1, &tmpfds, NULL, NULL, &timeout);
- if(ret == -1 && errno != EINTR) {
- log_printf(ERROR, "select returned with error: %s", strerror(errno));
- return_value = -1;
- break;
- }
- if(ret == -1)
- continue;
- if(!ret) {
- if(cmd_q && cmd_has_expired(*cmd_q)) {
- log_printf(ERROR, "last command expired");
- cmd_pop(&cmd_q);
- }
- else
- continue;
- }
-
- if(FD_ISSET(sig_fd, &tmpfds)) {
- if(signal_handle()) {
- return_value = 1;
- break;
- }
- }
-
- if(FD_ISSET(tty_fd, &tmpfds)) {
- return_value = process_tty(&tty_buffer, tty_fd, &cmd_q, client_lst, opt);
- if(return_value)
- break;
- }
-
- if(FD_ISSET(cmd_listen_fd, &tmpfds)) {
- int new_fd = accept(cmd_listen_fd, NULL, NULL);
- if(new_fd < 0) {
- log_printf(ERROR, "accept returned with error: %s", strerror(errno));
- return_value = -1;
- break;
- }
- log_printf(DEBUG, "new command connection (fd=%d)", new_fd);
- FD_SET(new_fd, &readfds);
- max_fd = (max_fd < new_fd) ? new_fd : max_fd;
- fcntl(new_fd, F_SETFL, O_NONBLOCK);
- client_add(&client_lst, new_fd);
- }
-
- if(autosample->pid_ > 0 && FD_ISSET(autosample->write_fd_, &tmpfds)) {
- return_value = nonblock_readline(&autosample_buffer, autosample->write_fd_, &cmd_q, client_lst, opt);
- if(return_value == 2) {
- log_printf(WARNING, "autosample not running, removing pipe to it");
- FD_CLR(autosample->write_fd_, &readfds);
- return_value = 0;
- continue;
- }
- if(return_value)
- break;
- }
-
- client_t* lst = client_lst;
- while(lst) {
- if(FD_ISSET(lst->fd, &tmpfds)) {
- return_value = nonblock_readline(&(lst->buffer), lst->fd, &cmd_q, client_lst, opt);
- if(return_value == 2) {
- log_printf(DEBUG, "removing closed command connection (fd=%d)", lst->fd);
- client_t* deletee = lst;
- lst = lst->next;
- FD_CLR(deletee->fd, &readfds);
- client_remove(&client_lst, deletee->fd);
- return_value = 0;
- continue;
- }
- if(return_value)
- break;
-
- }
- if(lst)
- lst = lst->next;
- }
-
- if(cmd_q && !cmd_q->sent)
- send_command(tty_fd, cmd_q);
-
- if(autosample->pid_ > 0) {
- lst = client_lst;
- int listener_cnt = 0;
- while(lst) {
- if(lst->sensor_listener)
- listener_cnt++;
- lst = lst->next;
- }
- if((!autosample_enabled && listener_cnt > 0) ||
- (autosample_enabled && listener_cnt == 0)) {
- if(autosample_enabled) autosample_enabled = 0;
- else autosample_enabled = 1;
- int ret;
- do {
- ret = write(autosample->read_fd_, &autosample_enabled, 1);
- } while(!ret || (ret == -1 && errno == EINTR));
- }
- }
- }
-
- cmd_clear(&cmd_q);
- client_clear(&client_lst);
- signal_stop();
- return return_value;
-}
-
-int setup_tty(int fd)
-{
- struct termios tmio;
-
- int ret = tcgetattr(fd, &tmio);
- if(ret) {
- log_printf(ERROR, "Error on tcgetattr(): %s", strerror(errno));
- return ret;
- }
-
- ret = cfsetospeed(&tmio, B9600);
- if(ret) {
- log_printf(ERROR, "Error on cfsetospeed(): %s", strerror(errno));
- return ret;
- }
-
- ret = cfsetispeed(&tmio, B9600);
- if(ret) {
- log_printf(ERROR, "Error on cfsetispeed(): %s", strerror(errno));
- return ret;
- }
-
- tmio.c_lflag &= ~ECHO;
-
- ret = tcsetattr(fd, TCSANOW, &tmio);
- if(ret) {
- log_printf(ERROR, "Error on tcsetattr(): %s", strerror(errno));
- return ret;
- }
-
- ret = tcflush(fd, TCIFLUSH);
- if(ret) {
- log_printf(ERROR, "Error on tcflush(): %s", strerror(errno));
- return ret;
- }
-
- clear_fd(fd);
-
- return 0;
-}
-
-int main(int argc, char* argv[])
-{
- log_init();
-
- options_t opt;
- int ret = options_parse(&opt, argc, argv);
- if(ret) {
- if(ret > 0) {
- fprintf(stderr, "syntax error near: %s\n\n", argv[ret]);
- }
- if(ret == -2) {
- fprintf(stderr, "memory error on options_parse, exiting\n");
- }
-
- if(ret != -2)
- options_print_usage();
-
- options_clear(&opt);
- log_close();
- exit(ret);
- }
- string_list_element_t* tmp = opt.log_targets_.first_;
- if(!tmp) {
- log_add_target("syslog:3,powersensordaemon,daemon");
- }
- else {
- while(tmp) {
- ret = log_add_target(tmp->string_);
- if(ret) {
- switch(ret) {
- case -2: fprintf(stderr, "memory error on log_add_target, exitting\n"); break;
- case -3: fprintf(stderr, "unknown log target: '%s', exitting\n", tmp->string_); break;
- case -4: fprintf(stderr, "this log target is only allowed once: '%s', exitting\n", tmp->string_); break;
- default: fprintf(stderr, "syntax error near: '%s', exitting\n", tmp->string_); break;
- }
-
- options_clear(&opt);
- log_close();
- exit(ret);
- }
- tmp = tmp->next_;
- }
- }
- log_printf(NOTICE, "just started...");
- if(options_parse_post(&opt)) {
- options_clear(&opt);
- log_close();
- exit(-1);
- }
-
- priv_info_t priv;
- if(opt.username_)
- if(priv_init(&priv, opt.username_, opt.groupname_)) {
- options_clear(&opt);
- log_close();
- exit(-1);
- }
-
- FILE* pid_file = NULL;
- if(opt.pid_file_) {
- pid_file = fopen(opt.pid_file_, "w");
- if(!pid_file) {
- log_printf(WARNING, "unable to open pid file: %s", strerror(errno));
- }
- }
-
- if(opt.chroot_dir_)
- if(do_chroot(opt.chroot_dir_)) {
- options_clear(&opt);
- log_close();
- exit(-1);
- }
- if(opt.username_)
- if(priv_drop(&priv)) {
- options_clear(&opt);
- log_close();
- exit(-1);
- }
-
- if(opt.daemonize_) {
- pid_t oldpid = getpid();
- daemonize();
- log_printf(INFO, "running in background now (old pid: %d)", oldpid);
- }
-
- if(pid_file) {
- pid_t pid = getpid();
- fprintf(pid_file, "%d", pid);
- fclose(pid_file);
- }
-
- autosample_process_t autosample;
- autosample.pid_ = -1;
- autosample.write_fd_ = -1;
- autosample.read_fd_ = -1;
- if(key_value_storage_length(&opt.autosampledevs_) > 0) {
- log_printf(NOTICE, "starting autosample process");
- int ret = start_autosample_process(&opt, &autosample);
- if(ret == -1) {
- options_clear(&opt);
- log_close();
- exit(1);
- }
- }
-
- int cmd_listen_fd = init_command_socket(opt.command_sock_);
- if(cmd_listen_fd < 0) {
- options_clear(&opt);
- log_close();
- exit(-1);
- }
-
- int tty_fd = 0;
- for(;;) {
- tty_fd = open(opt.tty_dev_, O_RDWR | O_NOCTTY);
- if(tty_fd < 0)
- ret = 2;
- else {
- ret = setup_tty(tty_fd);
- if(ret)
- ret = 2;
- else
- ret = main_loop(tty_fd, cmd_listen_fd, &autosample, &opt);
- }
-
- if(ret == 2) {
- log_printf(ERROR, "%s error, trying to reopen in 5 seconds..", opt.tty_dev_);
- if(tty_fd > 0)
- close(tty_fd);
- sleep(5);
- }
- else
- break;
- }
-
- close(cmd_listen_fd);
- if(tty_fd > 0)
- close(tty_fd);
- if(autosample.pid_ > 0)
- kill(autosample.pid_, SIGTERM);
-
- if(!ret)
- log_printf(NOTICE, "normal shutdown");
- else if(ret < 0)
- log_printf(NOTICE, "shutdown after error");
- else
- log_printf(NOTICE, "shutdown after signal");
-
- options_clear(&opt);
- log_close();
-
- return ret;
-}
+++ /dev/null
-temp0 *
-photo0 ?
+++ /dev/null
-/*
- * uAnytun
- *
- * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
- * featured implementation uAnytun has no support for multiple connections
- * or synchronisation. It is a small single threaded implementation intended
- * to act as a client on small platforms.
- * The secure anycast tunneling protocol (satp) defines a protocol used
- * for communication between any combination of unicast and anycast
- * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
- * mode and allows tunneling of every ETHER TYPE protocol (e.g.
- * ethernet, ip, arp ...). satp directly includes cryptography and
- * message authentication based on the methodes used by SRTP. It is
- * intended to deliver a generic, scaleable and secure solution for
- * tunneling and relaying of packets of any protocol.
- *
- *
- * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
- *
- * This file is part of uAnytun.
- *
- * uAnytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * uAnytun is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "datatypes.h"
-
-#include "log.h"
-#include <signal.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/select.h>
-#include <errno.h>
-
-#include "sig_handler.h"
-
-#include <stdio.h>
-
-
-static int sig_pipe_fds[2];
-
-
-static void sig_handler(int sig)
-{
- sigset_t set;
- int ret = read(sig_pipe_fds[0], &set, sizeof(sigset_t));
- if(ret != sizeof(sigset_t))
- sigemptyset(&set);
-
- sigaddset(&set, sig);
- ret = write(sig_pipe_fds[1], &set, sizeof(sigset_t));
-}
-
-
-int signal_init()
-{
- if(pipe(sig_pipe_fds)) {
- log_printf(ERROR, "signal handling init failed (pipe error: %s)", strerror(errno));
- return -1;
- }
-
- int i;
- for(i=0; i<2; ++i) {
- int fd_flags = fcntl(sig_pipe_fds[i], F_GETFL);
- if(fd_flags == -1) {
- log_printf(ERROR, "signal handling init failed (pipe fd[%d] read flags error: %s)", i, strerror(errno));
- return -1;
- }
- if(fcntl(sig_pipe_fds[i], F_SETFL, fd_flags | O_NONBLOCK) == -1){
- log_printf(ERROR, "signal handling init failed (pipe fd[%d] write flags error: %s)", i, strerror(errno));
- return -1;
- }
- }
-
- struct sigaction act, ign;
- act.sa_handler = sig_handler;
- sigfillset(&act.sa_mask);
- act.sa_flags = 0;
- ign.sa_handler = SIG_IGN;
- sigfillset(&ign.sa_mask);
- ign.sa_flags = 0;
-
- if((sigaction(SIGINT, &act, NULL) < 0) ||
- (sigaction(SIGQUIT, &act, NULL) < 0) ||
- (sigaction(SIGTERM, &act, NULL) < 0) ||
- (sigaction(SIGHUP, &act, NULL) < 0) ||
- (sigaction(SIGUSR1, &act, NULL) < 0) ||
- (sigaction(SIGUSR2, &act, NULL) < 0) ||
- (sigaction(SIGCHLD, &ign, NULL) < 0) ||
- (sigaction(SIGPIPE, &ign, NULL) < 0)) {
-
- log_printf(ERROR, "signal handling init failed (sigaction error: %s)", strerror(errno));
- close(sig_pipe_fds[0]);
- close(sig_pipe_fds[1]);
- }
-
- return sig_pipe_fds[0];
-}
-
-int signal_handle()
-{
- sigset_t set, oldset, tmpset;
-
- sigemptyset(&tmpset);
- sigaddset(&tmpset, SIGINT);
- sigaddset(&tmpset, SIGQUIT);
- sigaddset(&tmpset, SIGTERM);
- sigaddset(&tmpset, SIGHUP);
- sigaddset(&tmpset, SIGUSR1);
- sigaddset(&tmpset, SIGUSR2);
- sigprocmask(SIG_BLOCK, &tmpset, &oldset);
-
- int ret = read(sig_pipe_fds[0], &set, sizeof(sigset_t));
- if(ret != sizeof(sigset_t))
- sigemptyset(&set);
-
- int return_value = 0;
- int sig;
- for(sig=1; sig < NSIG; ++sig) {
- if(sigismember(&set, sig)) {
- switch(sig) {
- case SIGINT: log_printf(NOTICE, "SIG-Int caught, exitting"); return_value = 1; break;
- case SIGQUIT: log_printf(NOTICE, "SIG-Quit caught, exitting"); return_value = 1; break;
- case SIGTERM: log_printf(NOTICE, "SIG-Term caught, exitting"); return_value = 1; break;
- case SIGHUP: log_printf(NOTICE, "SIG-Hup caught"); break;
- case SIGUSR1: log_printf(NOTICE, "SIG-Usr1 caught"); break;
- case SIGUSR2: log_printf(NOTICE, "SIG-Usr2 caught"); break;
- default: log_printf(WARNING, "unknown signal %d caught, ignoring", sig); break;
- }
- sigdelset(&set, sig);
- }
- }
-
- sigprocmask(SIG_SETMASK, &oldset, NULL);
- return return_value;
-}
-
-void signal_stop()
-{
- struct sigaction act;
- act.sa_handler = SIG_DFL;
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
-
- sigaction(SIGINT, &act, NULL);
- sigaction(SIGQUIT, &act, NULL);
- sigaction(SIGTERM, &act, NULL);
- sigaction(SIGHUP, &act, NULL);
- sigaction(SIGUSR1, &act, NULL);
- sigaction(SIGUSR2, &act, NULL);
- sigaction(SIGPIPE, &act, NULL);
- sigaction(SIGCHLD, &act, NULL);
-
- close(sig_pipe_fds[0]);
- close(sig_pipe_fds[1]);
-}
+++ /dev/null
-/*
- * uAnytun
- *
- * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
- * featured implementation uAnytun has no support for multiple connections
- * or synchronisation. It is a small single threaded implementation intended
- * to act as a client on small platforms.
- * The secure anycast tunneling protocol (satp) defines a protocol used
- * for communication between any combination of unicast and anycast
- * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
- * mode and allows tunneling of every ETHER TYPE protocol (e.g.
- * ethernet, ip, arp ...). satp directly includes cryptography and
- * message authentication based on the methodes used by SRTP. It is
- * intended to deliver a generic, scaleable and secure solution for
- * tunneling and relaying of packets of any protocol.
- *
- *
- * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
- *
- * This file is part of uAnytun.
- *
- * uAnytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * uAnytun is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef UANYTUN_sig_handler_h_INCLUDED
-#define UANYTUN_sig_handler_h_INCLUDED
-
-int signal_init();
-int signal_handle();
-void signal_stop();
-
-#endif
+++ /dev/null
-/*
- * uAnytun
- *
- * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
- * featured implementation uAnytun has no support for multiple connections
- * or synchronisation. It is a small single threaded implementation intended
- * to act as a client on small platforms.
- * The secure anycast tunneling protocol (satp) defines a protocol used
- * for communication between any combination of unicast and anycast
- * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
- * mode and allows tunneling of every ETHER TYPE protocol (e.g.
- * ethernet, ip, arp ...). satp directly includes cryptography and
- * message authentication based on the methodes used by SRTP. It is
- * intended to deliver a generic, scaleable and secure solution for
- * tunneling and relaying of packets of any protocol.
- *
- *
- * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
- *
- * This file is part of uAnytun.
- *
- * uAnytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * uAnytun is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "string_list.h"
-
-void string_list_init(string_list_t* list)
-{
- if(!list)
- return;
-
- list->first_ = NULL;
-}
-
-void string_list_clear(string_list_t* list)
-{
- if(!list)
- return;
-
- while(list->first_) {
- string_list_element_t* tmp;
- tmp = list->first_;
- list->first_ = tmp->next_;
- if(tmp->string_)
- free(tmp->string_);
- free(tmp);
- }
-}
-
-int string_list_add(string_list_t* list, const char* string)
-{
- if(!list)
- return -1;
-
- if(!list->first_) {
- list->first_ = malloc(sizeof(string_list_element_t));
- if(!list->first_)
- return -2;
-
- list->first_->next_ = 0;
- list->first_->string_ = strdup(string);
- if(!list->first_->string_) {
- free(list->first_);
- list->first_ = NULL;
- return -2;
- }
- }
- else {
- string_list_element_t* tmp = list->first_;
- while(tmp->next_)
- tmp = tmp->next_;
-
- tmp->next_ = malloc(sizeof(string_list_element_t));
- if(!tmp->next_)
- return -2;
-
- tmp->next_->next_ = 0;
- tmp->next_->string_ = strdup(string);
- if(!tmp->next_->string_) {
- free(tmp->next_);
- tmp->next_ = NULL;
- return -2;
- }
- }
- return 0;
-}
-
-void string_list_print(string_list_t* list, const char* head, const char* tail)
-{
- if(!list)
- return;
-
- string_list_element_t* tmp = list->first_;
- while(tmp) {
- printf("%s%s%s", head, tmp->string_, tail);
- tmp = tmp->next_;
- }
-}
+++ /dev/null
-/*
- * uAnytun
- *
- * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
- * featured implementation uAnytun has no support for multiple connections
- * or synchronisation. It is a small single threaded implementation intended
- * to act as a client on small platforms.
- * The secure anycast tunneling protocol (satp) defines a protocol used
- * for communication between any combination of unicast and anycast
- * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
- * mode and allows tunneling of every ETHER TYPE protocol (e.g.
- * ethernet, ip, arp ...). satp directly includes cryptography and
- * message authentication based on the methodes used by SRTP. It is
- * intended to deliver a generic, scaleable and secure solution for
- * tunneling and relaying of packets of any protocol.
- *
- *
- * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
- *
- * This file is part of uAnytun.
- *
- * uAnytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * uAnytun is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef UANYTUN_string_list_h_INCLUDED
-#define UANYTUN_string_list_h_INCLUDED
-
-struct string_list_element_struct {
- char* string_;
- struct string_list_element_struct* next_;
-};
-typedef struct string_list_element_struct string_list_element_t;
-
-struct string_list_struct {
- string_list_element_t* first_;
-};
-typedef struct string_list_struct string_list_t;
-
-void string_list_init(string_list_t* list);
-void string_list_clear(string_list_t* list);
-int string_list_add(string_list_t* list, const char* string);
-
-void string_list_print(string_list_t* list, const char* head, const char* tail);
-
-#endif
+++ /dev/null
-#!/bin/sh
-
-for QUERY in `echo $QUERY_STRING | tr '&' ' '`; do
- for VALUE in `echo $QUERY | tr '=' ' '`; do
- if [ "$VALUE" == "id" ]; then
- ID='?'
- elif [ "$ID" == "?" ]; then
- ID=$VALUE
- elif [ "$VALUE" == "power" ]; then
- POWER='?'
- elif [ "$POWER" == "?" ]; then
- POWER=$VALUE
- elif [ "$VALUE" == "mobile" ]; then
- MOBILE='1'
- NOFLOAT='1'
- elif [ "$VALUE" == "nofloat" ]; then
- NOFLOAT='1'
- fi
- i=$i+1
- done
-done
-
-
-UNIXSOCK=/var/run/powersensordaemon/cmd.sock
-VALID_ONOFF_IDS="regalleinwand labortisch bluebar couchred couchwhite all lichter ambientlights cxleds mashadecke boiler"
-VALID_SEND_IDS_CUSTOM_DISPLAY="ymhpoweroff ymhpower ymhvolup ymhvoldown"
-VALID_SEND_IDS="ymhpoweron ymhcd ymhwdtv ymhtuner ymhaux ymhsattv ymhvolmute ymhmenu ymhplus ymhminus ymhtest ymhtimelevel ymheffect ymhprgup ymhprgdown ymhtunplus ymhtunminus ymhtunabcde ymhtape ymhvcr ymhextdec ymhsleep ymhp5 panicled blueled moviemode"
-#VALID_BANSHEE_IDS="playPause next prev"
-#VALID_CAM_MOTOR_IDS="c C w W"
-
-[ "$POWER" == "send" ] && POWER=on
-if [ "$POWER" == "on" -o "$POWER" == "off" ]; then
- for CHECKID in $VALID_ONOFF_IDS $VALID_SEND_IDS $VALID_SEND_IDS_CUSTOM_DISPLAY; do
- if [ "$CHECKID" == "$ID" ]; then
- echo "power $POWER $ID" | usocket $UNIXSOCK
- echo "Content-type: text/html"
- echo ""
- echo "<html>"
- echo "<head>"
- echo "<title>Realraum rf433ctl</title>"
- echo '<script type="text/javascript">window.location="http://slug.realraum.at/cgi-bin/switch.cgi";</script>'
- echo "</head></html>"
- exit 0
- fi
- done
-
- for CHECKID in $VALID_BANSHEE_IDS; do
- if [ "$CHECKID" == "$ID" ]; then
- echo "$ID/" | nc wuerfel.realraum.at 8484
- echo "Content-type: text/html"
- echo ""
- echo "<html>"
- echo "<head>"
- echo "<title>Realraum rf433ctl</title>"
- echo '<script type="text/javascript">window.location="http://slug.realraum.at/cgi-bin/switch.cgi";</script>'
- echo "</head></html>"
- exit 0
- fi
- done
-
- for CHECKID in $VALID_CAM_MOTOR_IDS; do
- if [ "$CHECKID" == "$ID" ]; then
- echo "$ID" > /dev/ttyACM0
- echo "Content-type: text/html"
- echo ""
- echo "<html>"
- echo "<head>"
- echo "<title>Realraum rf433ctl</title>"
- echo '<script type="text/javascript">window.location="http://slug.realraum.at/cgi-bin/switch.cgi";</script>'
- echo "</head></html>"
- exit 0
- fi
- done
-fi
-
-DESC_regalleinwand="LEDs Regal Leinwand"
-DESC_bluebar="Blaue LEDs Bar"
-DESC_labortisch="Labortisch"
-DESC_couchred="LEDs Couch Red"
-DESC_couchwhite="LEDS Couch White"
-DESC_cxleds="CX Leds"
-DESC_mashadecke="MaSha Decke"
-DESC_ambientlights="Ambient Lichter"
-DESC_boiler="Warmwasser Küche"
-DESC_lichter="Alle Lichter"
-DESC_all="Alles"
-DESC_ymhpoweron="Receiver On (off+tgl)"
-DESC_ymhpoweroff="Receiver Off"
-DESC_ymhpower="Receiver On/Off"
-DESC_ymhvolup="VolumeUp"
-DESC_ymhvoldown="VolumeDown"
-DESC_ymhcd="Input CD"
-DESC_ymhwdtv="Input S/PDIF Wuerfel"
-DESC_ymhtuner="Input Tuner"
-DESC_ymhvolmute="Mute"
-DESC_ymhmenu="Menu"
-DESC_ymhplus="+"
-DESC_ymhminus="-"
-DESC_ymhtest="Test"
-DESC_ymhtimelevel="Time/Levels"
-DESC_ymheffect="DSP Effect Toggle"
-DESC_ymhprgup="DSP Up"
-DESC_ymhprgdown="DSP Down"
-DESC_ymhtunplus="Tuner +"
-DESC_ymhtunminus="Tuner -"
-DESC_ymhtunabcde="Tuner ABCDE"
-DESC_ymhtape="Tape"
-DESC_ymhvcr="VCR"
-DESC_ymhextdec="ExtDec Toggle"
-DESC_seep="Sleep Modus"
-DESC_panicled="HAL9000 says hi"
-DESC_blueled="Blue Led"
-DESC_moviemode="Movie Mode"
-DESC_w="Cam >"
-DESC_W="Cam >>"
-DESC_c="Cam <"
-DESC_C="Cam <<"
-
-echo "Content-type: text/html"
-echo ""
-echo "<html>"
-echo "<head>"
-echo "<title>Realraum rf433ctl</title>"
-echo '<script type="text/javascript">'
-echo 'function sendButton( onoff, btn )'
-echo '{'
-echo ' var req = new XMLHttpRequest();'
-echo ' url = "http://slug.realraum.at/cgi-bin/switch.cgi?power="+onoff+"&id="+btn;'
-echo ' req.open("GET", url ,false);'
-echo ' //google chrome workaround'
-echo ' req.setRequestHeader("googlechromefix","");'
-echo ' req.send(null);'
-echo '}'
-[ "$NOFLOAT" == "1" ] && tail -n+6 /www/ymhremote.html | head -n 58
-echo '</script>'
-[ "$NOFLOAT" == "1" ] && tail -n+67 /www/ymhremote.html | head -n 37
-echo '<style>'
-echo 'div.switchbox {'
-echo ' float:left;'
-echo ' margin:2px;'
-#echo ' max-width:236px;'
-echo ' max-width:300px;'
-echo ' font-size:10pt;'
-echo ' border:1px solid black;'
-#echo ' height: 32px;'
-echo ' padding:0;'
-echo '}'
-
-echo 'div.switchnameleft {'
-echo ' width:12em; display:inline-block; vertical-align:middle; margin-left:3px;'
-echo '}'
-
-echo 'span.alignbuttonsright {'
-echo ' top:0px; float:right; display:inline-block; text-align:right; padding:0;'
-echo '}'
-
-echo 'div.switchnameright {'
-echo ' width:12em; display:inline-block; vertical-align:middle; float:right; display:inline-block; margin-left:1ex; margin-right:3px; margin-top:3px; margin-bottom:3px;'
-echo '}'
-
-echo 'span.alignbuttonsleft {'
-echo ' float:left; text-align:left; padding:0;'
-echo '}'
-
-echo '.onbutton {'
-echo ' font-size:11pt;'
-echo ' width: 40px;'
-echo ' height: 32px;'
-echo ' background-color: lime;'
-echo ' margin: 0px;'
-echo '}'
-
-echo '.offbutton {'
-echo ' font-size:11pt;'
-echo ' width: 40px;'
-echo ' height: 32px;'
-echo ' background-color: red;'
-echo ' margin: 0px;'
-echo '}'
-
-echo '.sendbutton {'
-echo ' font-size:11pt;'
-echo ' width: 40px;'
-echo ' height: 32px;'
-#echo ' background-color: grey;'
-echo ' margin: 0px;'
-echo '}'
-echo '</style>'
-echo "</head>"
-echo "<body>"
-#echo "<h1>Realraum rf433ctl</h1>"
-#echo "<div style=\"float:left; border:1px solid black;\">"
-echo "<div style=\"float:left;\">"
-echo "<div style=\"float:left; border:1px solid black; margin-right:2ex; margin-bottom:2ex;\">"
-for DISPID in $VALID_ONOFF_IDS; do
- NAME="$(eval echo \$DESC_$DISPID)"
- [ -z "$NAME" ] && NAME=$DISPID
-
-echo "<div class=\"switchbox\">"
- echo "<span class=\"alignbuttonsleft\">"
- echo " <button class=\"onbutton\" onClick='sendButton(\"on\",\"$DISPID\");'>On</button>"
- echo " <button class=\"offbutton\" onClick='sendButton(\"off\",\"$DISPID\");'>Off</button>"
- echo "</span>"
- echo "<div class=\"switchnameright\">$NAME</div>"
- echo "</div>"
-
- if [ "$NOFLOAT" == "1" ]; then
- echo "<br/>"
- fi
-done
-
-#Custom Buttons Start
-echo "<div class=\"switchbox\">"
-echo "<span class=\"alignbuttonsleft\">"
-echo " <button class=\"sendbutton\" onClick='sendButton(\"on\",\"ymhpower\");'>Tgl</button>"
-echo " <button class=\"offbutton\" onClick='sendButton(\"on\",\"ymhpoweroff\");'>Off</button>"
-echo "</span>"
-echo "<div class=\"switchnameright\">Receiver Power</div>"
-echo "</div>"
- if [ "$NOFLOAT" == "1" ]; then
- echo "<br/>"
- fi
-echo "<div class=\"switchbox\">"
-echo "<span class=\"alignbuttonsleft\">"
-echo " <button class=\"sendbutton\" onClick='sendButton(\"on\",\"ymhvolup\");'>↑</button>"
-echo " <button class=\"sendbutton\" onClick='sendButton(\"on\",\"ymhvoldown\");'>↓</button>"
-echo "</span>"
-echo "<div class=\"switchnameright\">Receiver Volume</div>"
-echo "</div>"
- if [ "$NOFLOAT" == "1" ]; then
- echo "<br/>"
- fi
-#Custom Buttons End
-
-echo "</div>"
-
-if [ "$MOBILE" != "1" ]; then
-
-echo "<div style=\"float:left; border:1px solid black; margin-right:2ex; margin-bottom:2ex;\">"
-
-ITEMCOUNT=0
-
-for DISPID in $VALID_SEND_IDS; do
- ITEMCOUNT=$((ITEMCOUNT+1))
- NAME="$(eval echo \$DESC_$DISPID)"
- [ -z "$NAME" ] && NAME=$DISPID
-
- echo "<div class=\"switchbox\">"
- echo "<span class=\"alignbuttonsleft\">"
- echo " <button class=\"sendbutton\" onClick='sendButton(\"on\",\"$DISPID\");'> </button>"
- echo "</span>"
- echo "<div class=\"switchnameright\">$NAME</div>"
- echo "</div>"
- if [ "$NOFLOAT" == "1" -a $((ITEMCOUNT % 2 )) -ne 1 ]; then
- echo "<br/>"
- fi
-
-done
-echo '<div class="switchbox">Goto <a href="/ymhremote.html">Yamaha Receiver Remote</a></div>'
-echo "</div>"
-
- if [ "$NOFLOAT" == "1" ]; then
- echo "<div style=\"float:left; border:1px solid black;\">"
- tail -n+107 /www/ymhremote.html | head -n 5
- echo "</div>"
- fi
-
-echo "<div style=\"float:left; border:1px solid black; margin-top:5px;\">"
-for DISPID in $VALID_BANSHEE_IDS $VALID_CAM_MOTOR_IDS; do
- NAME="$(eval echo \$DESC_$DISPID)"
- [ -z "$NAME" ] && NAME=$DISPID
-
- echo "<div class=\"switchbox\">"
- echo "<span class=\"alignbuttonsleft\">"
- echo " <button class=\"sendbutton\" onClick='sendButton(\"on\",\"$DISPID\");'> </button>"
- echo "</span>"
- echo "<div class=\"switchnameright\">$NAME</div>"
- echo "</div>"
- if [ "$NOFLOAT" == "1" ]; then
- echo "<br/>"
- fi
-
-done
-echo "</div>"
-fi
-echo "</div>"
-echo "</body>"
-echo "</html>"
+++ /dev/null
-<html>
-<head>
-<title>Realraum Yamaha Remote</title>
-<script type="text/javascript">
-
-function sendYmhButton( btn )
-{
- //alert(btn);
- document.getElementById('indicator').style.backgroundColor="red";
- document.getElementById('commandlabel').innerHTML=btn;
- var req = new XMLHttpRequest();
- url = "http://slug.realraum.at/cgi-bin/switch.cgi?power=send&id="+btn;
- req.open("GET", url ,false);
- //google chrome workaround
- req.setRequestHeader("googlechromefix","");
- req.send(null);
- //response = req.responseText;
- //document.getElementById('output').innerHTML = response;
- document.getElementById('indicator').style.backgroundColor="white";
- document.getElementById('commandlabel').innerHTML=' ';
-}
-
-function remoteKeyboard( e )
-{
- e = e || window.event;
- switch( e.keyCode )
- {
- //case 81: sendYmhButton( ( e.altKey ? 'REBOOT' : 'w' ) ); break; // ALT-Q = reboot, Q = Power
- case 38: sendYmhButton( 'ymhprgup' ); break; //up
- case 37: sendYmhButton( 'ymhminus' ); break; //left
- //case 13: sendYmhButton( '' ); break; //enter
- case 39: sendYmhButton( 'ymhplus' ); break; //right
- case 40: sendYmhButton( 'ymhprgdown' ); break; //down
- //case 8: sendYmhButton( 'T_back' ); break; //backspace
- //case 27: sendYmhButton( 't_stop' ); break; // ESC
- case 77: sendYmhButton( 'ymhmenu' ); break; // M
- case 84: sendYmhButton( 'ymhtimelevel' ); break; // T
- //case 32: sendYmhButton( '' ); break; // Space
- case 83: sendYmhButton( 'ymhsleep' ); break; // S
- case 36: sendYmhButton( 'ymhmute' ); break; //pos1
- case 33: sendYmhButton( 'ymhvolup' ); break; // P = 80, PAGEUP = 33
- case 43: sendYmhButton( 'ymhvolup' ); break; // +
- case 34: sendYmhButton( 'ymhvoldown' ); break; // N = 78, PAGEDOWN = 34
- case 45: sendYmhButton( 'ymhvoldown' ); break; // -
- case 46: sendYmhButton( 'ymhtunplus' ); break; // .
- case 44: sendYmhButton( 'ymhtunminus' ); break; // ,
- case 59: sendYmhButton( 'ymhtunabcde' ); break; // ;
- case 69: sendYmhButton( 'ymheffect' ); break; // E
- case 80: sendYmhButton( 'ymhpower' ); break; // P
- case 48: sendYmhButton( 'ymhtest' ); break; // 0
- case 49: sendYmhButton( 'ymhcd' ); break; // 1
- case 50: sendYmhButton( 'ymhtuner' ); break; // 2
- case 51: sendYmhButton( 'ymhtape' ); break; // 3
- case 52: sendYmhButton( 'ymhwdtv' ); break; // 4
- case 53: sendYmhButton( 'ymhsattv' ); break; // 5
- case 54: sendYmhButton( 'ymhvcr' ); break; // 6
- case 55: sendYmhButton( 'ymh7' ); break; // 7
- case 56: sendYmhButton( 'ymhaux' ); break; // 8
- case 57: sendYmhButton( 'ymhextdec' ); break; // 9
- }
-}
-
-document.onkeydown = remoteKeyboard;
-
-
-</script>
-<map name="ymhremote">
-<area shape ="rect" coords ="57,36,121,59" onClick="sendYmhButton('ymhpower');" />
-
-<area shape ="circle" coords ="36,98,17" onClick="sendYmhButton('ymhcd');" alt="ymhcd" />
-<area shape ="circle" coords ="88,98,17" onClick="sendYmhButton('ymhtuner');" alt="ymhtuner" />
-<area shape ="circle" coords ="142,98,17" onClick="sendYmhButton('ymhtape');" alt="ymhtape" />
-<area shape ="circle" coords ="36,145,17" onClick="sendYmhButton('ymhwdtv');" alt="ymhwdtv" />
-<area shape ="circle" coords ="88,145,17" onClick="sendYmhButton('ymhsattv');" alt="ymhsattv" />
-<area shape ="circle" coords ="142,145,17" onClick="sendYmhButton('ymhvcr');" alt="ymhvcr" />
-<area shape ="circle" coords ="36,192,17" onClick="sendYmhButton('ymh7');" alt="ymh7" />
-<area shape ="circle" coords ="88,192,17" onClick="sendYmhButton('ymhaux');" alt="ymhaux" />
-<area shape ="circle" coords ="142,192,17" onClick="sendYmhButton('ymhextdec');" alt="ymhextdec" />
-<area shape ="circle" coords ="36,240,17" onClick="sendYmhButton('ymhtest');" alt="ymhtest" />
-<area shape ="circle" coords ="88,240,17" onClick="sendYmhButton('ymhtunabcde');" alt="ymhtunabcde" />
-<area shape ="circle" coords ="142,240,17" onClick="sendYmhButton('ymheffect');" alt="ymheffect" />
-
-<!--area shape ="polygon" coords ="57,336,89,308,119,333,110,445,66,445" onClick="sendYmhButton('ymhtvlolup');" alt="ymhtvlolup" /-->
-<!--area shape ="polygon" coords ="57,418,66,407,110,407,119,418,89,445" onClick="sendYmhButton('ymhtvvoldown');" alt="ymhtvvoldown" /-->
-<area shape ="polygon" coords ="19,377,47,347,59,355,59,398,47,408" onClick="sendYmhButton('ymhvoldown');" alt="ymhvoldown" />
-<area shape ="polygon" coords ="118,355,129,346,158,377,130,408,118,398" onClick="sendYmhButton('ymhvolup');" alt="ymhvolup" />
-<area shape ="circle" coords ="89,377,16" onClick="sendYmhButton('ymhmute');" alt="ymhmute" />
-
-<area shape ="circle" coords ="36,455,17" onClick="sendYmhButton('ymhsleep');" alt="ymhsleep" />
-<area shape ="circle" coords ="142,455,17" onClick="sendYmhButton('ymhp5');" alt="ymhp5" />
-
-<area shape ="rect" coords ="18,278,67,301" onClick="sendYmhButton('ymhtunminus');" />
-<area shape ="rect" coords ="111,278,160,301" onClick="sendYmhButton('ymhtunplus');" />
-
-<area shape ="polygon" coords ="57,524,89,496,119,521,110,524,66,533" onClick="sendYmhButton('ymhprgup');" alt="ymhprgup" />
-<area shape ="polygon" coords ="57,606,66,595,110,595,119,606,89,634" onClick="sendYmhButton('ymhprgdown');" alt="ymhprgdown" />
-<area shape ="polygon" coords ="19,565,47,534,59,543,59,586,47,595" onClick="sendYmhButton('ymhminus');" alt="ymhminus" />
-<area shape ="polygon" coords ="118,543,129,534,158,565,130,595,118,586" onClick="sendYmhButton('ymhplus');" alt="ymhplus" />
-
-<area shape ="circle" coords ="36,634,17" onClick="sendYmhButton('ymhtimelevel');" alt="ymhtimelevel" />
-<area shape ="circle" coords ="142,634,17" onClick="sendYmhButton('ymhmenu');" alt="ymhmenu" />
-<!-- href ="./cgi-bin/switch.cgi" target ="_blank" -->
-</map>
-</head>
-<body>
-<center>
-<table border="0" cellspacing="0" cellpadding="0" width="180">
-<tr><td id="indicator" style="background-color:white; height:2px;"></td></tr>
-<tr><td><img src="/rx-v396-remote.png" width="180" height="714" usemap="#ymhremote" id="remoteimg" border="0" /></td></tr>
-</table>
-<p id="commandlabel" style="display:hidden; width:180px;"> </p>
-</center>
-</body>
-</html>
+++ /dev/null
-
-TARGET=reset_tty
-
-all: reset_tty
-
-.PHONY: clean
-
-clean:
- rm -f $(TARGET)
+++ /dev/null
-#include <stdlib.h>
-#include <termios.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <time.h>
-#include <stdio.h>
-#include <sys/select.h>
-
-#define STATE_OFF 0
-#define STATE_ON 1
-
-void setDTRState (int fd, int state) {
- int flags;
-
- ioctl(fd, TIOCMGET, &flags);
- flags = (state == STATE_ON ? flags | TIOCM_DTR : flags & ~TIOCM_DTR);
- ioctl(fd, TIOCMSET, &flags);
-}
-
-int
-main(int argc, char* argv[])
-{
- char* device = argc < 2 ? "/dev/ttyUSB0" : argv[1];
- int fd = open(device, O_RDWR);
- if (fd == 0) {
- fprintf(stderr, "Could not open %s\n", device);
- return EXIT_FAILURE;
- }
-
- setDTRState(fd, STATE_ON);
- struct timeval sleeptime = {0, 100000}; // 100ms
- select(0, NULL, NULL, NULL, &sleeptime);
- setDTRState(fd, STATE_OFF);
- sleeptime.tv_sec = 0;
- sleeptime.tv_usec = 100000;
- select(0, NULL, NULL, NULL, &sleeptime);
- setDTRState(fd, STATE_ON);
- close(fd);
-
- return EXIT_SUCCESS;
-}
-
+++ /dev/null
-// This library is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU Lesser General Public\r
-// License as published by the Free Software Foundation; either\r
-// version 2.1 of the License, or (at your option) any later version.\r
-\r
-#include "DallasTemperature.h"\r
-#include "Arduino.h"\r
-extern "C" {\r
- \r
-}\r
-\r
-DallasTemperature::DallasTemperature(OneWire* _oneWire) \r
- #if REQUIRESALARMS\r
- : _AlarmHandler(&defaultAlarmHandler)\r
- #endif\r
-{\r
- _wire = _oneWire;\r
- devices = 0;\r
- parasite = false;\r
- conversionDelay = TEMP_9_BIT;\r
-}\r
-\r
-// initialize the bus\r
-void DallasTemperature::begin(void)\r
-{\r
- DeviceAddress deviceAddress;\r
-\r
- _wire->reset_search();\r
-\r
- while (_wire->search(deviceAddress))\r
- {\r
- if (validAddress(deviceAddress))\r
- { \r
- if (!parasite && readPowerSupply(deviceAddress)) parasite = true;\r
-\r
- ScratchPad scratchPad;\r
-\r
- readScratchPad(deviceAddress, scratchPad);\r
-\r
- if (deviceAddress[0] == DS18S20MODEL) conversionDelay = TEMP_12_BIT; // 750 ms\r
- else if (scratchPad[CONFIGURATION] > conversionDelay) conversionDelay = scratchPad[CONFIGURATION];\r
-\r
- devices++;\r
- }\r
- }\r
-}\r
-\r
-// returns the number of devices found on the bus\r
-uint8_t DallasTemperature::getDeviceCount(void)\r
-{\r
- return devices;\r
-}\r
-\r
-// returns true if address is valid\r
-bool DallasTemperature::validAddress(uint8_t* deviceAddress)\r
-{\r
- return (_wire->crc8(deviceAddress, 7) == deviceAddress[7]);\r
-}\r
-\r
-// finds an address at a given index on the bus\r
-// returns true if the device was found\r
-bool DallasTemperature::getAddress(uint8_t* deviceAddress, uint8_t index)\r
-{\r
- uint8_t depth = 0;\r
-\r
- _wire->reset_search();\r
-\r
- while (depth <= index && _wire->search(deviceAddress))\r
- {\r
- if (depth == index && validAddress(deviceAddress)) return true;\r
- depth++;\r
- }\r
-\r
- return false;\r
-}\r
-\r
-// attempt to determine if the device at the given address is connected to the bus\r
-bool DallasTemperature::isConnected(uint8_t* deviceAddress)\r
-{\r
- ScratchPad scratchPad;\r
- return isConnected(deviceAddress, scratchPad);\r
-}\r
-\r
-// attempt to determine if the device at the given address is connected to the bus\r
-// also allows for updating the read scratchpad\r
-bool DallasTemperature::isConnected(uint8_t* deviceAddress, uint8_t* scratchPad)\r
-{\r
- readScratchPad(deviceAddress, scratchPad);\r
- return (_wire->crc8(scratchPad, 8) == scratchPad[SCRATCHPAD_CRC]);\r
-}\r
-\r
-// read device's scratch pad\r
-void DallasTemperature::readScratchPad(uint8_t* deviceAddress, uint8_t* scratchPad)\r
-{\r
- // send the command\r
- _wire->reset();\r
- _wire->select(deviceAddress);\r
- _wire->write(READSCRATCH);\r
-\r
- // read the response \r
-\r
- // byte 0: temperature LSB\r
- scratchPad[TEMP_LSB] = _wire->read();\r
-\r
- // byte 1: temperature MSB\r
- scratchPad[TEMP_MSB] = _wire->read();\r
-\r
- // byte 2: high alarm temp\r
- scratchPad[HIGH_ALARM_TEMP] = _wire->read();\r
-\r
- // byte 3: low alarm temp\r
- scratchPad[LOW_ALARM_TEMP] = _wire->read();\r
-\r
- // byte 4:\r
- // DS18S20: store for crc\r
- // DS18B20 & DS1822: configuration register\r
- scratchPad[CONFIGURATION] = _wire->read();\r
-\r
- // byte 5:\r
- // internal use & crc\r
- scratchPad[INTERNAL_BYTE] = _wire->read();\r
-\r
- // byte 6:\r
- // DS18S20: COUNT_REMAIN\r
- // DS18B20 & DS1822: store for crc\r
- scratchPad[COUNT_REMAIN] = _wire->read();\r
- \r
- // byte 7:\r
- // DS18S20: COUNT_PER_C\r
- // DS18B20 & DS1822: store for crc\r
- scratchPad[COUNT_PER_C] = _wire->read();\r
- \r
- // byte 8:\r
- // SCTRACHPAD_CRC\r
- scratchPad[SCRATCHPAD_CRC] = _wire->read();\r
-\r
- _wire->reset();\r
-}\r
-\r
-// writes device's scratch pad\r
-void DallasTemperature::writeScratchPad(uint8_t* deviceAddress, const uint8_t* scratchPad)\r
-{\r
- _wire->reset();\r
- _wire->select(deviceAddress);\r
- _wire->write(WRITESCRATCH);\r
- _wire->write(scratchPad[HIGH_ALARM_TEMP]); // high alarm temp\r
- _wire->write(scratchPad[LOW_ALARM_TEMP]); // low alarm temp\r
- // DS18S20 does not use the configuration register\r
- if (deviceAddress[0] != DS18S20MODEL) _wire->write(scratchPad[CONFIGURATION]); // configuration\r
- _wire->reset();\r
- // save the newly written values to eeprom\r
- _wire->write(COPYSCRATCH, parasite);\r
- if (parasite) delay(10); // 10ms delay \r
- _wire->reset();\r
-}\r
-\r
-// reads the device's power requirements\r
-bool DallasTemperature::readPowerSupply(uint8_t* deviceAddress)\r
-{\r
- bool ret = false;\r
- _wire->reset();\r
- _wire->select(deviceAddress);\r
- _wire->write(READPOWERSUPPLY);\r
- if (_wire->read_bit() == 0) ret = true;\r
- _wire->reset();\r
- return ret;\r
-}\r
-\r
-// returns the current resolution, 9-12\r
-uint8_t DallasTemperature::getResolution(uint8_t* deviceAddress)\r
-{\r
- if (deviceAddress[0] == DS18S20MODEL) return 9; // this model has a fixed resolution\r
-\r
- ScratchPad scratchPad;\r
- readScratchPad(deviceAddress, scratchPad);\r
- switch (scratchPad[CONFIGURATION])\r
- {\r
- case TEMP_12_BIT:\r
- return 12;\r
- break;\r
- case TEMP_11_BIT:\r
- return 11;\r
- break;\r
- case TEMP_10_BIT:\r
- return 10;\r
- break;\r
- case TEMP_9_BIT:\r
- return 9;\r
- break;\r
- }\r
-}\r
-\r
-// set resolution of a device to 9, 10, 11, or 12 bits\r
-void DallasTemperature::setResolution(uint8_t* deviceAddress, uint8_t newResolution)\r
-{\r
- ScratchPad scratchPad;\r
- if (isConnected(deviceAddress, scratchPad))\r
- {\r
- // DS18S20 has a fixed 9-bit resolution\r
- if (deviceAddress[0] != DS18S20MODEL)\r
- {\r
- switch (newResolution)\r
- {\r
- case 12:\r
- scratchPad[CONFIGURATION] = TEMP_12_BIT;\r
- break;\r
- case 11:\r
- scratchPad[CONFIGURATION] = TEMP_11_BIT;\r
- break;\r
- case 10:\r
- scratchPad[CONFIGURATION] = TEMP_10_BIT;\r
- break;\r
- case 9:\r
- default:\r
- scratchPad[CONFIGURATION] = TEMP_9_BIT;\r
- break;\r
- }\r
- writeScratchPad(deviceAddress, scratchPad);\r
- }\r
- }\r
-} \r
-\r
-// sends command for all devices on the bus to perform a temperature\r
-void DallasTemperature::requestTemperatures(void)\r
-{\r
- _wire->reset();\r
- _wire->skip();\r
- _wire->write(STARTCONVO, parasite);\r
-\r
- switch (conversionDelay)\r
- {\r
- case TEMP_9_BIT:\r
- delay(94);\r
- break;\r
- case TEMP_10_BIT:\r
- delay(188);\r
- break;\r
- case TEMP_11_BIT:\r
- delay(375);\r
- break;\r
- case TEMP_12_BIT:\r
- default:\r
- delay(750);\r
- break;\r
- }\r
-}\r
-\r
-// sends command for one device to perform a temperature by address\r
-void DallasTemperature::requestTemperaturesByAddress(uint8_t* deviceAddress)\r
-{\r
- _wire->reset();\r
- _wire->select(deviceAddress);\r
- _wire->write(STARTCONVO, parasite);\r
-\r
- switch (conversionDelay)\r
- {\r
- case TEMP_9_BIT:\r
- delay(94);\r
- break;\r
- case TEMP_10_BIT:\r
- delay(188);\r
- break;\r
- case TEMP_11_BIT:\r
- delay(375);\r
- break;\r
- case TEMP_12_BIT:\r
- default:\r
- delay(750);\r
- break;\r
- }\r
-}\r
-\r
-// sends command for one device to perform a temp conversion by index\r
-void DallasTemperature::requestTemperaturesByIndex(uint8_t deviceIndex)\r
-{\r
- DeviceAddress deviceAddress;\r
- getAddress(deviceAddress, deviceIndex);\r
- requestTemperaturesByAddress(deviceAddress);\r
-}\r
-\r
-\r
-// Fetch temperature for device index\r
-float DallasTemperature::getTempCByIndex(uint8_t deviceIndex)\r
-{\r
- DeviceAddress deviceAddress;\r
- getAddress(deviceAddress, deviceIndex);\r
- return getTempC((uint8_t*)deviceAddress);\r
-}\r
-\r
-// Fetch temperature for device index\r
-float DallasTemperature::getTempFByIndex(uint8_t deviceIndex)\r
-{\r
- return DallasTemperature::toFahrenheit(getTempCByIndex(deviceIndex));\r
-}\r
-\r
-// reads scratchpad and returns the temperature in degrees C\r
-float DallasTemperature::calculateTemperature(uint8_t* deviceAddress, uint8_t* scratchPad)\r
-{\r
- int16_t rawTemperature = (((int16_t)scratchPad[TEMP_MSB]) << 8) | scratchPad[TEMP_LSB];\r
-\r
- switch (deviceAddress[0])\r
- {\r
- case DS18B20MODEL:\r
- case DS1822MODEL:\r
- switch (scratchPad[CONFIGURATION])\r
- {\r
- case TEMP_12_BIT:\r
- return (float)rawTemperature * 0.0625;\r
- break;\r
- case TEMP_11_BIT:\r
- return (float)(rawTemperature >> 1) * 0.125;\r
- break;\r
- case TEMP_10_BIT:\r
- return (float)(rawTemperature >> 2) * 0.25;\r
- break;\r
- case TEMP_9_BIT:\r
- return (float)(rawTemperature >> 3) * 0.5;\r
- break;\r
- }\r
- break;\r
- case DS18S20MODEL:\r
- /*\r
- \r
- Resolutions greater than 9 bits can be calculated using the data from \r
- the temperature, COUNT REMAIN and COUNT PER °C registers in the \r
- scratchpad. Note that the COUNT PER °C register is hard-wired to 16 \r
- (10h). After reading the scratchpad, the TEMP_READ value is obtained \r
- by truncating the 0.5°C bit (bit 0) from the temperature data. The \r
- extended resolution temperature can then be calculated using the \r
- following equation:\r
- \r
- COUNT_PER_C - COUNT_REMAIN\r
- TEMPERATURE = TEMP_READ - 0.25 + --------------------------\r
- COUNT_PER_C\r
- */\r
- \r
- // Good spot. Thanks Nic Johns for your contribution\r
- return (float)(rawTemperature >> 1) - 0.25 +((float)(scratchPad[COUNT_PER_C] - scratchPad[COUNT_REMAIN]) / (float)scratchPad[COUNT_PER_C] ); \r
- break;\r
- }\r
-}\r
-\r
-// returns temperature in degrees C or DEVICE_DISCONNECTED if the \r
-// device's scratch pad cannot be read successfully.\r
-// the numeric value of DEVICE_DISCONNECTED is defined in \r
-// DallasTemperature.h. it is a large negative number outside the \r
-// operating range of the device\r
-float DallasTemperature::getTempC(uint8_t* deviceAddress)\r
-{\r
- // TODO: Multiple devices (up to 64) on the same bus may take some time to negotiate a response\r
- // What happens in case of collision?\r
-\r
- ScratchPad scratchPad;\r
- if (isConnected(deviceAddress, scratchPad)) return calculateTemperature(deviceAddress, scratchPad);\r
- return DEVICE_DISCONNECTED;\r
-}\r
-\r
-// returns temperature in degrees F\r
-float DallasTemperature::getTempF(uint8_t* deviceAddress)\r
-{\r
- return toFahrenheit(getTempC(deviceAddress));\r
-}\r
-\r
-// returns true if the bus requires parasite power\r
-bool DallasTemperature::isParasitePowerMode(void)\r
-{\r
- return parasite;\r
-}\r
-\r
-#if REQUIRESALARMS\r
-\r
-/*\r
-\r
-ALARMS:\r
-\r
-TH and TL Register Format\r
-\r
-BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0\r
- S 2^6 2^5 2^4 2^3 2^2 2^1 2^0\r
-\r
-Only bits 11 through 4 of the temperature register are used \r
-in the TH and TL comparison since TH and TL are 8-bit \r
-registers. If the measured temperature is lower than or equal \r
-to TL or higher than or equal to TH, an alarm condition exists \r
-and an alarm flag is set inside the DS18B20. This flag is \r
-updated after every temperature measurement; therefore, if the \r
-alarm condition goes away, the flag will be turned off after \r
-the next temperature conversion.\r
-\r
-*/\r
-\r
-// sets the high alarm temperature for a device in degrees celsius\r
-// accepts a float, but the alarm resolution will ignore anything \r
-// after a decimal point. valid range is -55C - 125C\r
-void DallasTemperature::setHighAlarmTemp(uint8_t* deviceAddress, char celsius)\r
-{\r
- // make sure the alarm temperature is within the device's range\r
- if (celsius > 125) celsius = 125;\r
- else if (celsius < -55) celsius = -55;\r
- \r
- ScratchPad scratchPad;\r
- if (isConnected(deviceAddress, scratchPad))\r
- { \r
- scratchPad[HIGH_ALARM_TEMP] = (uint8_t)celsius;\r
- writeScratchPad(deviceAddress, scratchPad);\r
- }\r
-}\r
-\r
-// sets the low alarm temperature for a device in degreed celsius\r
-// accepts a float, but the alarm resolution will ignore anything \r
-// after a decimal point. valid range is -55C - 125C\r
-void DallasTemperature::setLowAlarmTemp(uint8_t* deviceAddress, char celsius)\r
-{\r
- // make sure the alarm temperature is within the device's range\r
- if (celsius > 125) celsius = 125;\r
- else if (celsius < -55) celsius = -55;\r
-\r
- ScratchPad scratchPad;\r
- if (isConnected(deviceAddress, scratchPad))\r
- {\r
- scratchPad[LOW_ALARM_TEMP] = (uint8_t)celsius;\r
- writeScratchPad(deviceAddress, scratchPad);\r
- }\r
-}\r
-\r
-// returns a char with the current high alarm temperature or \r
-// DEVICE_DISCONNECTED for an address\r
-char DallasTemperature::getHighAlarmTemp(uint8_t* deviceAddress)\r
-{\r
- ScratchPad scratchPad;\r
- if (isConnected(deviceAddress, scratchPad)) return (char)scratchPad[HIGH_ALARM_TEMP];\r
- return DEVICE_DISCONNECTED;\r
-}\r
-\r
-// returns a char with the current low alarm temperature or \r
-// DEVICE_DISCONNECTED for an address\r
-char DallasTemperature::getLowAlarmTemp(uint8_t* deviceAddress)\r
-{\r
- ScratchPad scratchPad;\r
- if (isConnected(deviceAddress, scratchPad)) return (char)scratchPad[LOW_ALARM_TEMP];\r
- return DEVICE_DISCONNECTED;\r
-}\r
-\r
-// resets internal variables used for the alarm search\r
-void DallasTemperature::resetAlarmSearch()\r
-{\r
- alarmSearchJunction = -1;\r
- alarmSearchExhausted = 0;\r
- for(uint8_t i = 0; i < 7; i++)\r
- alarmSearchAddress[i] = 0;\r
-}\r
-\r
-// This is a modified version of the OneWire::search method. \r
-//\r
-// Also added the OneWire search fix documented here:\r
-// http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238032295\r
-//\r
-// Perform an alarm search. If this function returns a '1' then it has\r
-// enumerated the next device and you may retrieve the ROM from the\r
-// OneWire::address variable. If there are no devices, no further\r
-// devices, or something horrible happens in the middle of the\r
-// enumeration then a 0 is returned. If a new device is found then\r
-// its address is copied to newAddr. Use \r
-// DallasTemperature::resetAlarmSearch() to start over.\r
-bool DallasTemperature::alarmSearch(uint8_t* newAddr)\r
-{\r
- uint8_t i;\r
- char lastJunction = -1;\r
- uint8_t done = 1;\r
- \r
- if (alarmSearchExhausted) return false;\r
- if (!_wire->reset()) return false;\r
-\r
- // send the alarm search command\r
- _wire->write(0xEC, 0);\r
- \r
- for(i = 0; i < 64; i++)\r
- {\r
- uint8_t a = _wire->read_bit( );\r
- uint8_t nota = _wire->read_bit( );\r
- uint8_t ibyte = i / 8;\r
- uint8_t ibit = 1 << (i & 7);\r
- \r
- // I don't think this should happen, this means nothing responded, but maybe if\r
- // something vanishes during the search it will come up.\r
- if (a && nota) return false;\r
-\r
- if (!a && !nota)\r
- {\r
- if (i == alarmSearchJunction)\r
- {\r
- // this is our time to decide differently, we went zero last time, go one.\r
- a = 1;\r
- alarmSearchJunction = lastJunction;\r
- }\r
- else if (i < alarmSearchJunction) \r
- {\r
- // take whatever we took last time, look in address\r
- if (alarmSearchAddress[ibyte] & ibit) a = 1;\r
- else\r
- {\r
- // Only 0s count as pending junctions, we've already exhasuted the 0 side of 1s\r
- a = 0;\r
- done = 0;\r
- lastJunction = i;\r
- }\r
- }\r
- else\r
- {\r
- // we are blazing new tree, take the 0\r
- a = 0;\r
- alarmSearchJunction = i;\r
- done = 0;\r
- }\r
- // OneWire search fix\r
- // See: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238032295\r
- }\r
-\r
- if (a) alarmSearchAddress[ibyte] |= ibit;\r
- else alarmSearchAddress[ibyte] &= ~ibit;\r
- \r
- _wire->write_bit(a);\r
- }\r
-\r
- if (done) alarmSearchExhausted = 1;\r
- for (i = 0; i < 8; i++) newAddr[i] = alarmSearchAddress[i];\r
- return true; \r
-}\r
-\r
-// returns true if device address has an alarm condition\r
-bool DallasTemperature::hasAlarm(uint8_t* deviceAddress)\r
-{\r
- ScratchPad scratchPad;\r
- if (isConnected(deviceAddress, scratchPad))\r
- {\r
- float temp = calculateTemperature(deviceAddress, scratchPad);\r
- \r
- // check low alarm\r
- if ((char)temp <= (char)scratchPad[LOW_ALARM_TEMP]) return true;\r
- \r
- // check high alarm\r
- if ((char)temp >= (char)scratchPad[HIGH_ALARM_TEMP]) return true;\r
- }\r
-\r
- // no alarm\r
- return false;\r
-}\r
-\r
-// returns true if any device is reporting an alarm condition on the bus\r
-bool DallasTemperature::hasAlarm(void)\r
-{\r
- DeviceAddress deviceAddress;\r
- resetAlarmSearch();\r
- return alarmSearch(deviceAddress);\r
-}\r
-\r
-// runs the alarm handler for all devices returned by alarmSearch()\r
-void DallasTemperature::processAlarms(void)\r
-{\r
- resetAlarmSearch();\r
- DeviceAddress alarmAddr;\r
-\r
- while (alarmSearch(alarmAddr))\r
- {\r
- if (validAddress(alarmAddr))\r
- _AlarmHandler(alarmAddr);\r
- }\r
-}\r
-\r
-// sets the alarm handler\r
-void DallasTemperature::setAlarmHandler(AlarmHandler *handler)\r
-{\r
- _AlarmHandler = handler;\r
-}\r
-\r
-// The default alarm handler\r
-void DallasTemperature::defaultAlarmHandler(uint8_t* deviceAddress)\r
-{\r
-}\r
-\r
-#endif\r
-\r
-// Convert float celsius to fahrenheit\r
-float DallasTemperature::toFahrenheit(float celsius)\r
-{\r
- return (celsius * 1.8) + 32;\r
-}\r
-\r
-// Convert float fahrenheit to celsius\r
-float DallasTemperature::toCelsius(float fahrenheit)\r
-{\r
- return (fahrenheit - 32) / 1.8;\r
-}\r
-\r
-#if REQUIRESNEW\r
-\r
-// MnetCS - Allocates memory for DallasTemperature. Allows us to instance a new object\r
-void* DallasTemperature::operator new(unsigned int size) // Implicit NSS obj size\r
-{\r
- void * p; // void pointer\r
- p = malloc(size); // Allocate memory\r
- memset((DallasTemperature*)p,0,size); // Initalise memory\r
-\r
- //!!! CANT EXPLICITLY CALL CONSTRUCTOR - workaround by using an init() methodR - workaround by using an init() method\r
- return (DallasTemperature*) p; // Cast blank region to NSS pointer\r
-}\r
-\r
-// MnetCS 2009 - Unallocates the memory used by this instance\r
-void DallasTemperature::operator delete(void* p)\r
-{\r
- DallasTemperature* pNss = (DallasTemperature*) p; // Cast to NSS pointer\r
- pNss->~DallasTemperature(); // Destruct the object\r
-\r
- free(p); // Free the memory\r
-}\r
-\r
-#endif\r
+++ /dev/null
-#ifndef DallasTemperature_h\r
-#define DallasTemperature_h\r
-\r
-// This library is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU Lesser General Public\r
-// License as published by the Free Software Foundation; either\r
-// version 2.1 of the License, or (at your option) any later version.\r
-\r
-// set to true to include code for new and delete operators\r
-#ifndef REQUIRESNEW\r
-#define REQUIRESNEW false\r
-#endif\r
-\r
-// set to true to include code implementing alarm search functions\r
-#ifndef REQUIRESALARMS\r
-#define REQUIRESALARMS true\r
-#endif\r
-\r
-#include <inttypes.h>\r
-#include <OneWire.h>\r
-\r
-// Model IDs\r
-#define DS18S20MODEL 0x10\r
-#define DS18B20MODEL 0x28\r
-#define DS1822MODEL 0x22\r
-\r
-// OneWire commands\r
-#define STARTCONVO 0x44 // Tells device to take a temperature reading and put it on the scratchpad\r
-#define COPYSCRATCH 0x48 // Copy EEPROM\r
-#define READSCRATCH 0xBE // Read EEPROM\r
-#define WRITESCRATCH 0x4E // Write to EEPROM\r
-#define RECALLSCRATCH 0xB8 // Reload from last known\r
-#define READPOWERSUPPLY 0xB4 // Determine if device needs parasite power\r
-#define ALARMSEARCH 0xEC // Query bus for devices with an alarm condition\r
-\r
-// Scratchpad locations\r
-#define TEMP_LSB 0\r
-#define TEMP_MSB 1\r
-#define HIGH_ALARM_TEMP 2\r
-#define LOW_ALARM_TEMP 3\r
-#define CONFIGURATION 4\r
-#define INTERNAL_BYTE 5\r
-#define COUNT_REMAIN 6\r
-#define COUNT_PER_C 7\r
-#define SCRATCHPAD_CRC 8\r
-\r
-// Device resolution\r
-#define TEMP_9_BIT 0x1F // 9 bit\r
-#define TEMP_10_BIT 0x3F // 10 bit\r
-#define TEMP_11_BIT 0x5F // 11 bit\r
-#define TEMP_12_BIT 0x7F // 12 bit\r
-\r
-// Error Codes\r
-#define DEVICE_DISCONNECTED -127\r
-\r
-typedef uint8_t DeviceAddress[8];\r
-\r
-class DallasTemperature\r
-{\r
- public:\r
-\r
- DallasTemperature(OneWire*);\r
-\r
- // initalize bus\r
- void begin(void);\r
-\r
- // returns the number of devices found on the bus\r
- uint8_t getDeviceCount(void);\r
- \r
- // returns true if address is valid\r
- bool validAddress(uint8_t*);\r
-\r
- // finds an address at a given index on the bus \r
- bool getAddress(uint8_t*, const uint8_t);\r
- \r
- // attempt to determine if the device at the given address is connected to the bus\r
- bool isConnected(uint8_t*);\r
-\r
- // attempt to determine if the device at the given address is connected to the bus\r
- // also allows for updating the read scratchpad\r
- bool isConnected(uint8_t*, uint8_t*);\r
-\r
- // read device's scratchpad\r
- void readScratchPad(uint8_t*, uint8_t*);\r
-\r
- // write device's scratchpad\r
- void writeScratchPad(uint8_t*, const uint8_t*);\r
-\r
- // read device's power requirements\r
- bool readPowerSupply(uint8_t*);\r
-\r
- // returns the current resolution, 9-12\r
- uint8_t getResolution(uint8_t*);\r
-\r
- // set resolution of a device to 9, 10, 11, or 12 bits\r
- void setResolution(uint8_t*, uint8_t);\r
-\r
- // sends command for all devices on the bus to perform a temperature conversion\r
- void requestTemperatures(void);\r
- \r
- // sends command for one device to perform a temperature conversion by address\r
- void requestTemperaturesByAddress(uint8_t*);\r
-\r
- // sends command for one device to perform a temperature conversion by index\r
- void requestTemperaturesByIndex(uint8_t);\r
-\r
- // returns temperature in degrees C\r
- float getTempC(uint8_t*);\r
-\r
- // returns temperature in degrees F\r
- float getTempF(uint8_t*);\r
-\r
- // Get temperature for device index (slow)\r
- float getTempCByIndex(uint8_t);\r
- \r
- // Get temperature for device index (slow)\r
- float getTempFByIndex(uint8_t);\r
- \r
- // returns true if the bus requires parasite power\r
- bool isParasitePowerMode(void);\r
-\r
- #if REQUIRESALARMS\r
- \r
- typedef void AlarmHandler(uint8_t*);\r
-\r
- // sets the high alarm temperature for a device\r
- // accepts a char. valid range is -55C - 125C\r
- void setHighAlarmTemp(uint8_t*, const char);\r
-\r
- // sets the low alarm temperature for a device\r
- // accepts a char. valid range is -55C - 125C\r
- void setLowAlarmTemp(uint8_t*, const char);\r
-\r
- // returns a signed char with the current high alarm temperature for a device\r
- // in the range -55C - 125C\r
- char getHighAlarmTemp(uint8_t*);\r
-\r
- // returns a signed char with the current low alarm temperature for a device\r
- // in the range -55C - 125C\r
- char getLowAlarmTemp(uint8_t*);\r
- \r
- // resets internal variables used for the alarm search\r
- void resetAlarmSearch(void);\r
-\r
- // search the wire for devices with active alarms\r
- bool alarmSearch(uint8_t*);\r
-\r
- // returns true if ia specific device has an alarm\r
- bool hasAlarm(uint8_t*);\r
-\r
- // returns true if any device is reporting an alarm on the bus\r
- bool hasAlarm(void);\r
-\r
- // runs the alarm handler for all devices returned by alarmSearch()\r
- void processAlarms(void);\r
- \r
- // sets the alarm handler\r
- void setAlarmHandler(AlarmHandler *);\r
- \r
- // The default alarm handler\r
- static void defaultAlarmHandler(uint8_t*);\r
-\r
- #endif\r
-\r
- // convert from celcius to farenheit\r
- static float toFahrenheit(const float);\r
-\r
- // convert from farenheit to celsius\r
- static float toCelsius(const float);\r
-\r
- #if REQUIRESNEW\r
-\r
- // initalize memory area\r
- void* operator new (unsigned int);\r
-\r
- // delete memory reference\r
- void operator delete(void*);\r
- \r
- #endif\r
-\r
- private:\r
- typedef uint8_t ScratchPad[9];\r
- \r
- // parasite power on or off\r
- bool parasite;\r
-\r
- // used to determine the delay amount needed to allow for the\r
- // temperature conversion to take place\r
- int conversionDelay;\r
-\r
- // count of devices on the bus\r
- uint8_t devices;\r
- \r
- // Take a pointer to one wire instance\r
- OneWire* _wire;\r
-\r
- // reads scratchpad and returns the temperature in degrees C\r
- float calculateTemperature(uint8_t*, uint8_t*);\r
- \r
- #if REQUIRESALARMS\r
-\r
- // required for alarmSearch \r
- uint8_t alarmSearchAddress[8];\r
- char alarmSearchJunction;\r
- uint8_t alarmSearchExhausted;\r
-\r
- // the alarm handler function pointer\r
- AlarmHandler *_AlarmHandler;\r
-\r
- #endif\r
- \r
-};\r
-#endif\r
+++ /dev/null
-Arduino Library for Dallas Temperature ICs
-==========================================
-
-Usage
------
-
-This library supports the following devices:
- DS18B20
- DS18S20 - Please note there appears to be an issue with this series.
- DS1822
-
-You will need a pull-up resistor of about 5 KOhm between the 1-Wire data line
-and your 5V power. If you are using the DS18B20, ground pins 1 and 3. The
-centre pin is the data line '1-wire'.
-
-We have included a "REQUIRESNEW" and "REQUIRESALARMS" definition. If you
-want to slim down the code feel free to use either of these by including
-#define REQUIRESNEW or #define REQUIRESALARMS a the top of DallasTemperature.h
-
-Credits
--------
-
-The OneWire code has been derived from
-http://www.arduino.cc/playground/Learning/OneWire.
-Miles Burton <miles@mnetcs.com> originally developed this library.
-Tim Newsome <nuisance@casualhacker.net> added support for multiple sensors on
-the same bus.
-Guil Barros [gfbarros@bappos.com] added getTempByAddress (v3.5)
-
-Website
--------
-
-You can find the latest version of the library at
-http://milesburton.com/index.php?title=Dallas_Temperature_Control_Library
-
-License
--------
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+++ /dev/null
-#include <OneWire.h>
-#include <DallasTemperature.h>
-
-// Data wire is plugged into port 2 on the Arduino
-#define ONE_WIRE_BUS 3
-
-// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
-OneWire oneWire(ONE_WIRE_BUS);
-
-// Pass our oneWire reference to Dallas Temperature.
-DallasTemperature sensors(&oneWire);
-
-// arrays to hold device addresses
-DeviceAddress insideThermometer, outsideThermometer;
-
-void setup(void)
-{
- // start serial port
- Serial.begin(9600);
- Serial.println("Dallas Temperature IC Control Library Demo");
-
- // Start up the library
- sensors.begin();
-
- // locate devices on the bus
- Serial.print("Found ");
- Serial.print(sensors.getDeviceCount(), DEC);
- Serial.println(" devices.");
-
- // search for devices on the bus and assign based on an index.
- if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0");
- if (!sensors.getAddress(outsideThermometer, 1)) Serial.println("Unable to find address for Device 1");
-
- // show the addresses we found on the bus
- Serial.print("Device 0 Address: ");
- printAddress(insideThermometer);
- Serial.println();
-
- Serial.print("Device 0 Alarms: ");
- printAlarms(insideThermometer);
- Serial.println();
-
- Serial.print("Device 1 Address: ");
- printAddress(outsideThermometer);
- Serial.println();
-
- Serial.print("Device 1 Alarms: ");
- printAlarms(outsideThermometer);
- Serial.println();
-
- Serial.println("Setting alarm temps...");
-
- // alarm when temp is higher than 30C
- sensors.setHighAlarmTemp(insideThermometer, 30);
-
- // alarm when temp is lower than -10C
- sensors.setLowAlarmTemp(insideThermometer, -10);
-
- // alarm when temp is higher than 31C
- sensors.setHighAlarmTemp(outsideThermometer, 31);
-
- // alarn when temp is lower than 27C
- sensors.setLowAlarmTemp(outsideThermometer, 27);
-
- Serial.print("New Device 0 Alarms: ");
- printAlarms(insideThermometer);
- Serial.println();
-
- Serial.print("New Device 1 Alarms: ");
- printAlarms(outsideThermometer);
- Serial.println();
-}
-
-// function to print a device address
-void printAddress(DeviceAddress deviceAddress)
-{
- for (uint8_t i = 0; i < 8; i++)
- {
- if (deviceAddress[i] < 16) Serial.print("0");
- Serial.print(deviceAddress[i], HEX);
- }
-}
-
-// function to print the temperature for a device
-void printTemperature(DeviceAddress deviceAddress)
-{
- float tempC = sensors.getTempC(deviceAddress);
- Serial.print("Temp C: ");
- Serial.print(tempC);
- Serial.print(" Temp F: ");
- Serial.print(DallasTemperature::toFahrenheit(tempC));
-}
-
-void printAlarms(uint8_t deviceAddress[])
-{
- char temp;
- temp = sensors.getHighAlarmTemp(deviceAddress);
- Serial.print("High Alarm: ");
- Serial.print(temp, DEC);
- Serial.print("C/");
- Serial.print(DallasTemperature::toFahrenheit(temp));
- Serial.print("F | Low Alarm: ");
- temp = sensors.getLowAlarmTemp(deviceAddress);
- Serial.print(temp, DEC);
- Serial.print("C/");
- Serial.print(DallasTemperature::toFahrenheit(temp));
- Serial.print("F");
-}
-
-// main function to print information about a device
-void printData(DeviceAddress deviceAddress)
-{
- Serial.print("Device Address: ");
- printAddress(deviceAddress);
- Serial.print(" ");
- printTemperature(deviceAddress);
- Serial.println();
-}
-
-void checkAlarm(DeviceAddress deviceAddress)
-{
- if (sensors.hasAlarm(deviceAddress))
- {
- Serial.print("ALARM: ");
- printData(deviceAddress);
- }
-}
-
-void loop(void)
-{
- // call sensors.requestTemperatures() to issue a global temperature
- // request to all devices on the bus
- Serial.print("Requesting temperatures...");
- sensors.requestTemperatures();
- Serial.println("DONE");
-
- // Method 1:
- // check each address individually for an alarm condition
- checkAlarm(insideThermometer);
- checkAlarm(outsideThermometer);
-/*
- // Alternate method:
- // Search the bus and iterate through addresses of devices with alarms
-
- // space for the alarm device's address
- DeviceAddress alarmAddr;
-
- Serial.println("Searching for alarms...");
-
- // resetAlarmSearch() must be called before calling alarmSearch()
- sensors.resetAlarmSearch();
-
- // alarmSearch() returns 0 when there are no devices with alarms
- while (sensors.alarmSearch(alarmAddr))
- {
- Serial.print("ALARM: ");
- printData(alarmAddr);
- }
-*/
-
-}
-\r
+++ /dev/null
-#include <OneWire.h>
-#include <DallasTemperature.h>
-
-// Data wire is plugged into port 2 on the Arduino
-#define ONE_WIRE_BUS 3
-#define TEMPERATURE_PRECISION 9
-
-// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
-OneWire oneWire(ONE_WIRE_BUS);
-
-// Pass our oneWire reference to Dallas Temperature.
-DallasTemperature sensors(&oneWire);
-
-// arrays to hold device addresses
-DeviceAddress insideThermometer, outsideThermometer;
-
-// function that will be called when an alarm condition exists during DallasTemperatures::processAlarms();
-void newAlarmHandler(uint8_t* deviceAddress)
-{
- Serial.println("Alarm Handler Start");
- printAlarmInfo(deviceAddress);
- printTemp(deviceAddress);
- Serial.println();
- Serial.println("Alarm Handler Finish");
-}
-
-void printCurrentTemp(DeviceAddress deviceAddress)
-{
- printAddress(deviceAddress);
- printTemp(deviceAddress);
- Serial.println();
-}
-
-void printAddress(DeviceAddress deviceAddress)
-{
- Serial.print("Address: ");
- for (uint8_t i = 0; i < 8; i++)
- {
- if (deviceAddress[i] < 16) Serial.print("0");
- Serial.print(deviceAddress[i], HEX);
- }
- Serial.print(" ");
-}
-
-void printTemp(DeviceAddress deviceAddress)
-{
- float tempC = sensors.getTempC(deviceAddress);
- if (tempC != DEVICE_DISCONNECTED)
- {
- Serial.print("Current Temp C: ");
- Serial.print(tempC);
- }
- else Serial.print("DEVICE DISCONNECTED");
- Serial.print(" ");
-}
-
-void printAlarmInfo(DeviceAddress deviceAddress)
-{
- char temp;
- printAddress(deviceAddress);
- temp = sensors.getHighAlarmTemp(deviceAddress);
- Serial.print("High Alarm: ");
- Serial.print(temp, DEC);
- Serial.print("C");
- Serial.print(" Low Alarm: ");
- temp = sensors.getLowAlarmTemp(deviceAddress);
- Serial.print(temp, DEC);
- Serial.print("C");
- Serial.print(" ");
-}
-
-void setup(void)
-{
- // start serial port
- Serial.begin(9600);
- Serial.println("Dallas Temperature IC Control Library Demo");
-
- // Start up the library
- sensors.begin();
-
- // locate devices on the bus
- Serial.print("Found ");
- Serial.print(sensors.getDeviceCount(), DEC);
- Serial.println(" devices.");
-
- // search for devices on the bus and assign based on an index
- if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0");
- if (!sensors.getAddress(outsideThermometer, 1)) Serial.println("Unable to find address for Device 1");
-
- Serial.print("Device insideThermometer ");
- printAlarmInfo(insideThermometer);
- Serial.println();
-
- Serial.print("Device outsideThermometer ");
- printAlarmInfo(outsideThermometer);
- Serial.println();
-
- // set alarm ranges
- Serial.println("Setting alarm temps...");
- sensors.setHighAlarmTemp(insideThermometer, 26);
- sensors.setLowAlarmTemp(insideThermometer, 22);
- sensors.setHighAlarmTemp(outsideThermometer, 25);
- sensors.setLowAlarmTemp(outsideThermometer, 21);
-
- Serial.print("New insideThermometer ");
- printAlarmInfo(insideThermometer);
- Serial.println();
-
- Serial.print("New outsideThermometer ");
- printAlarmInfo(outsideThermometer);
- Serial.println();
-
- // attach alarm handler
- sensors.setAlarmHandler(&newAlarmHandler);
-
-}
-
-void loop(void)
-{
- // ask the devices to measure the temperature
- sensors.requestTemperatures();
-
- // if an alarm condition exists as a result of the most recent
- // requestTemperatures() request, it exists until the next time
- // requestTemperatures() is called AND there isn't an alarm condition
- // on the device
- if (sensors.hasAlarm())
- {
- Serial.println("Oh noes! There is at least one alarm on the bus.");
- }
-
- // call alarm handler function defined by sensors.setAlarmHandler
- // for each device reporting an alarm
- sensors.processAlarms();
-
- if (!sensors.hasAlarm())
- {
- // just print out the current temperature
- printCurrentTemp(insideThermometer);
- printCurrentTemp(outsideThermometer);
- }
-
- delay(1000);
-}
-\r
+++ /dev/null
-#include <OneWire.h>
-#include <DallasTemperature.h>
-
-// Data wire is plugged into port 2 on the Arduino
-#define ONE_WIRE_BUS 3
-#define TEMPERATURE_PRECISION 9
-
-// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
-OneWire oneWire(ONE_WIRE_BUS);
-
-// Pass our oneWire reference to Dallas Temperature.
-DallasTemperature sensors(&oneWire);
-
-// arrays to hold device addresses
-DeviceAddress insideThermometer, outsideThermometer;
-
-void setup(void)
-{
- // start serial port
- Serial.begin(9600);
- Serial.println("Dallas Temperature IC Control Library Demo");
-
- // Start up the library
- sensors.begin();
-
- // locate devices on the bus
- Serial.print("Locating devices...");
- Serial.print("Found ");
- Serial.print(sensors.getDeviceCount(), DEC);
- Serial.println(" devices.");
-
- // report parasite power requirements
- Serial.print("Parasite power is: ");
- if (sensors.isParasitePowerMode()) Serial.println("ON");
- else Serial.println("OFF");
-
- // assign address manually. the addresses below will beed to be changed
- // to valid device addresses on your bus. device address can be retrieved
- // by using either oneWire.search(deviceAddress) or individually via
- // sensors.getAddress(deviceAddress, index)
- //insideThermometer = { 0x28, 0x1D, 0x39, 0x31, 0x2, 0x0, 0x0, 0xF0 };
- //outsideThermometer = { 0x28, 0x3F, 0x1C, 0x31, 0x2, 0x0, 0x0, 0x2 };
-
- // search for devices on the bus and assign based on an index. ideally,
- // you would do this to initially discover addresses on the bus and then
- // use those addresses and manually assign them (see above) once you know
- // the devices on your bus (and assuming they don't change).
- //
- // method 1: by index
- if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0");
- if (!sensors.getAddress(outsideThermometer, 1)) Serial.println("Unable to find address for Device 1");
-
- // method 2: search()
- // search() looks for the next device. Returns 1 if a new address has been
- // returned. A zero might mean that the bus is shorted, there are no devices,
- // or you have already retrieved all of them. It might be a good idea to
- // check the CRC to make sure you didn't get garbage. The order is
- // deterministic. You will always get the same devices in the same order
- //
- // Must be called before search()
- //oneWire.reset_search();
- // assigns the first address found to insideThermometer
- //if (!oneWire.search(insideThermometer)) Serial.println("Unable to find address for insideThermometer");
- // assigns the seconds address found to outsideThermometer
- //if (!oneWire.search(outsideThermometer)) Serial.println("Unable to find address for outsideThermometer");
-
- // show the addresses we found on the bus
- Serial.print("Device 0 Address: ");
- printAddress(insideThermometer);
- Serial.println();
-
- Serial.print("Device 1 Address: ");
- printAddress(outsideThermometer);
- Serial.println();
-
- // set the resolution to 9 bit
- sensors.setResolution(insideThermometer, 9);
- sensors.setResolution(outsideThermometer, 9);
-
- Serial.print("Device 0 Resolution: ");
- Serial.print(sensors.getResolution(insideThermometer), DEC);
- Serial.println();
-
- Serial.print("Device 1 Resolution: ");
- Serial.print(sensors.getResolution(outsideThermometer), DEC);
- Serial.println();
-}
-
-// function to print a device address
-void printAddress(DeviceAddress deviceAddress)
-{
- for (uint8_t i = 0; i < 8; i++)
- {
- // zero pad the address if necessary
- if (deviceAddress[i] < 16) Serial.print("0");
- Serial.print(deviceAddress[i], HEX);
- }
-}
-
-// function to print the temperature for a device
-void printTemperature(DeviceAddress deviceAddress)
-{
- float tempC = sensors.getTempC(deviceAddress);
- Serial.print("Temp C: ");
- Serial.print(tempC);
- Serial.print(" Temp F: ");
- Serial.print(DallasTemperature::toFahrenheit(tempC));
-}
-
-// function to print a device's resolution
-void printResolution(DeviceAddress deviceAddress)
-{
- Serial.print("Resolution: ");
- Serial.print(sensors.getResolution(deviceAddress));
- Serial.println();
-}
-
-// main function to print information about a device
-void printData(DeviceAddress deviceAddress)
-{
- Serial.print("Device Address: ");
- printAddress(deviceAddress);
- Serial.print(" ");
- printTemperature(deviceAddress);
- Serial.println();
-}
-
-void loop(void)
-{
- // call sensors.requestTemperatures() to issue a global temperature
- // request to all devices on the bus
- Serial.print("Requesting temperatures...");
- sensors.requestTemperatures();
- Serial.println("DONE");
-
- // print the device information
- printData(insideThermometer);
- printData(outsideThermometer);
-}
-\r
+++ /dev/null
-#include <OneWire.h>
-#include <DallasTemperature.h>
-
-// Data wire is plugged into port 2 on the Arduino
-#define ONE_WIRE_BUS 2
-
-// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
-OneWire oneWire(ONE_WIRE_BUS);
-
-// Pass our oneWire reference to Dallas Temperature.
-DallasTemperature sensors(&oneWire);
-
-void setup(void)
-{
- // start serial port
- Serial.begin(9600);
- Serial.println("Dallas Temperature IC Control Library Demo");
-
- // Start up the library
- sensors.begin();
-}
-
-void loop(void)
-{
- // call sensors.requestTemperatures() to issue a global temperature
- // request to all devices on the bus
- Serial.print("Requesting temperatures...");
- sensors.requestTemperatures(); // Send the command to get temperatures
- Serial.println("DONE");
-
- Serial.print("Temperature for the device 1 (index 0) is: ");
- Serial.println(sensors.getTempCByIndex(0));
-}\r
+++ /dev/null
-#include <OneWire.h>
-#include <DallasTemperature.h>
-
-// Data wire is plugged into port 2 on the Arduino
-#define ONE_WIRE_BUS 3
-
-// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
-OneWire oneWire(ONE_WIRE_BUS);
-
-// Pass our oneWire reference to Dallas Temperature.
-DallasTemperature sensors(&oneWire);
-
-// arrays to hold device address
-DeviceAddress insideThermometer;
-
-void setup(void)
-{
- // start serial port
- Serial.begin(9600);
- Serial.println("Dallas Temperature IC Control Library Demo");
-
- // locate devices on the bus
- Serial.print("Locating devices...");
- sensors.begin();
- Serial.print("Found ");
- Serial.print(sensors.getDeviceCount(), DEC);
- Serial.println(" devices.");
-
- // report parasite power requirements
- Serial.print("Parasite power is: ");
- if (sensors.isParasitePowerMode()) Serial.println("ON");
- else Serial.println("OFF");
-
- // assign address manually. the addresses below will beed to be changed
- // to valid device addresses on your bus. device address can be retrieved
- // by using either oneWire.search(deviceAddress) or individually via
- // sensors.getAddress(deviceAddress, index)
- //insideThermometer = { 0x28, 0x1D, 0x39, 0x31, 0x2, 0x0, 0x0, 0xF0 };
-
- // Method 1:
- // search for devices on the bus and assign based on an index. ideally,
- // you would do this to initially discover addresses on the bus and then
- // use those addresses and manually assign them (see above) once you know
- // the devices on your bus (and assuming they don't change).
- if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0");
-
- // method 2: search()
- // search() looks for the next device. Returns 1 if a new address has been
- // returned. A zero might mean that the bus is shorted, there are no devices,
- // or you have already retrieved all of them. It might be a good idea to
- // check the CRC to make sure you didn't get garbage. The order is
- // deterministic. You will always get the same devices in the same order
- //
- // Must be called before search()
- //oneWire.reset_search();
- // assigns the first address found to insideThermometer
- //if (!oneWire.search(insideThermometer)) Serial.println("Unable to find address for insideThermometer");
-
- // show the addresses we found on the bus
- Serial.print("Device 0 Address: ");
- printAddress(insideThermometer);
- Serial.println();
-
- // set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
- sensors.setResolution(insideThermometer, 9);
-
- Serial.print("Device 0 Resolution: ");
- Serial.print(sensors.getResolution(insideThermometer), DEC);
- Serial.println();
-}
-
-// function to print the temperature for a device
-void printTemperature(DeviceAddress deviceAddress)
-{
- // method 1 - slower
- //Serial.print("Temp C: ");
- //Serial.print(sensors.getTempC(deviceAddress));
- //Serial.print(" Temp F: ");
- //Serial.print(sensors.getTempF(deviceAddress)); // Makes a second call to getTempC and then converts to Fahrenheit
-
- // method 2 - faster
- float tempC = sensors.getTempC(deviceAddress);
- Serial.print("Temp C: ");
- Serial.print(tempC);
- Serial.print(" Temp F: ");
- Serial.println(DallasTemperature::toFahrenheit(tempC)); // Converts tempC to Fahrenheit
-}
-
-void loop(void)
-{
- // call sensors.requestTemperatures() to issue a global temperature
- // request to all devices on the bus
- Serial.print("Requesting temperatures...");
- sensors.requestTemperatures(); // Send the command to get temperatures
- Serial.println("DONE");
-
- // It responds almost immediately. Let's print out the data
- printTemperature(insideThermometer); // Use a simple function to print out the data
-}
-
-// function to print a device address
-void printAddress(DeviceAddress deviceAddress)
-{
- for (uint8_t i = 0; i < 8; i++)
- {
- if (deviceAddress[i] < 16) Serial.print("0");
- Serial.print(deviceAddress[i], HEX);
- }
-}\r
+++ /dev/null
-#include <OneWire.h>
-#include <DallasTemperature.h>
-
-// Data wire is plugged into port 2 on the Arduino
-#define ONE_WIRE_BUS 3
-#define TEMPERATURE_PRECISION 9
-
-// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
-OneWire oneWire(ONE_WIRE_BUS);
-
-// Pass our oneWire reference to Dallas Temperature.
-DallasTemperature sensors(&oneWire);
-
-int numberOfDevices; // Number of temperature devices found
-
-DeviceAddress tempDeviceAddress; // We'll use this variable to store a found device address
-
-void setup(void)
-{
- // start serial port
- Serial.begin(9600);
- Serial.println("Dallas Temperature IC Control Library Demo");
-
- // Start up the library
- sensors.begin();
-
- // Grab a count of devices on the wire
- numberOfDevices = sensors.getDeviceCount();
-
- // locate devices on the bus
- Serial.print("Locating devices...");
-
- Serial.print("Found ");
- Serial.print(numberOfDevices, DEC);
- Serial.println(" devices.");
-
- // report parasite power requirements
- Serial.print("Parasite power is: ");
- if (sensors.isParasitePowerMode()) Serial.println("ON");
- else Serial.println("OFF");
-
- // Loop through each device, print out address
- for(int i=0;i<numberOfDevices; i++)
- {
- // Search the wire for address
- if(sensors.getAddress(tempDeviceAddress, i))
- {
- Serial.print("Found device ");
- Serial.print(i, DEC);
- Serial.print(" with address: ");
- printAddress(tempDeviceAddress);
- Serial.println();
-
- Serial.print("Setting resolution to ");
- Serial.println(TEMPERATURE_PRECISION,DEC);
-
- // set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
- sensors.setResolution(tempDeviceAddress, TEMPERATURE_PRECISION);
-
- Serial.print("Resolution actually set to: ");
- Serial.print(sensors.getResolution(tempDeviceAddress), DEC);
- Serial.println();
- }else{
- Serial.print("Found ghost device at ");
- Serial.print(i, DEC);
- Serial.print(" but could not detect address. Check power and cabling");
- }
- }
-
-}
-
-// function to print the temperature for a device
-void printTemperature(DeviceAddress deviceAddress)
-{
- // method 1 - slower
- //Serial.print("Temp C: ");
- //Serial.print(sensors.getTempC(deviceAddress));
- //Serial.print(" Temp F: ");
- //Serial.print(sensors.getTempF(deviceAddress)); // Makes a second call to getTempC and then converts to Fahrenheit
-
- // method 2 - faster
- float tempC = sensors.getTempC(deviceAddress);
- Serial.print("Temp C: ");
- Serial.print(tempC);
- Serial.print(" Temp F: ");
- Serial.println(DallasTemperature::toFahrenheit(tempC)); // Converts tempC to Fahrenheit
-}
-
-void loop(void)
-{
- // call sensors.requestTemperatures() to issue a global temperature
- // request to all devices on the bus
- Serial.print("Requesting temperatures...");
- sensors.requestTemperatures(); // Send the command to get temperatures
- Serial.println("DONE");
-
-
- // Loop through each device, print out temperature data
- for(int i=0;i<numberOfDevices; i++)
- {
- // Search the wire for address
- if(sensors.getAddress(tempDeviceAddress, i))
- {
- // Output the device ID
- Serial.print("Temperature for device: ");
- Serial.println(i,DEC);
-
- // It responds almost immediately. Let's print out the data
- printTemperature(tempDeviceAddress); // Use a simple function to print out the data
- }
- //else ghost device! Check your power requirements and cabling
-
- }
-}
-
-// function to print a device address
-void printAddress(DeviceAddress deviceAddress)
-{
- for (uint8_t i = 0; i < 8; i++)
- {
- if (deviceAddress[i] < 16) Serial.print("0");
- Serial.print(deviceAddress[i], HEX);
- }
-}\r
+++ /dev/null
-#######################################
-# Syntax Coloring Map For Ultrasound
-#######################################
-
-#######################################
-# Datatypes (KEYWORD1)
-#######################################
-DallasTemperature KEYWORD1
-OneWire KEYWORD1
-AlarmHandler KEYWORD1
-DeviceAddress KEYWORD1
-
-#######################################
-# Methods and Functions (KEYWORD2)
-#######################################
-
-setResolution KEYWORD2
-getResolution KEYWORD2
-getTempC KEYWORD2
-toFahrenheit KEYWORD2
-getTempF KEYWORD2
-getTempCByIndex KEYWORD2
-getTempFByIndex KEYWORD2
-requestTemperatures KEYWORD2
-requestTemperaturesByAddress KEYWORD2
-requestTemperaturesByIndex KEYWORD2
-isParasitePowerMode KEYWORD2
-begin KEYWORD2
-getDeviceCount KEYWORD2
-getAddress KEYWORD2
-validAddress KEYWORD2
-isConnected KEYWORD2
-readScratchPad KEYWORD2
-writeScratchPad KEYWORD2
-readPowerSupply KEYWORD2
-setHighAlarmTemp KEYWORD2
-setLowAlarmTemp KEYWORD2
-getHighAlarmTemp KEYWORD2
-getLowAlarmTemp KEYWORD2
-resetAlarmSearch KEYWORD2
-alarmSearch KEYWORD2
-hasAlarm KEYWORD2
-toCelsius KEYWORD2
-processAlarmss KEYWORD2
-setAlarmHandlers KEYWORD2
-defaultAlarmHandler KEYWORD2
-calculateTemperature KEYWORD2
-
-#######################################
-# Constants (LITERAL1)
-#######################################
-
+++ /dev/null
-/*\r
- * IRremote\r
- * Version 0.11 August, 2009\r
- * Copyright 2009 Ken Shirriff\r
- * For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html\r
- *\r
- * Interrupt code based on NECIRrcv by Joe Knapp\r
- * http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556\r
- * Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/\r
- */\r
-\r
-#include "IRremote.h"\r
-#include "IRremoteInt.h"\r
-\r
-// Provides ISR\r
-#include <avr/interrupt.h>\r
-\r
-volatile irparams_t irparams;\r
-\r
-// These versions of MATCH, MATCH_MARK, and MATCH_SPACE are only for debugging.\r
-// To use them, set DEBUG in IRremoteInt.h\r
-// Normally macros are used for efficiency\r
-#ifdef DEBUG\r
-int MATCH(int measured, int desired) {\r
- Serial.print("Testing: ");\r
- Serial.print(TICKS_LOW(desired), DEC);\r
- Serial.print(" <= ");\r
- Serial.print(measured, DEC);\r
- Serial.print(" <= ");\r
- Serial.println(TICKS_HIGH(desired), DEC);\r
- return measured >= TICKS_LOW(desired) && measured <= TICKS_HIGH(desired);\r
-}\r
-\r
-int MATCH_MARK(int measured_ticks, int desired_us) {\r
- Serial.print("Testing mark ");\r
- Serial.print(measured_ticks * USECPERTICK, DEC);\r
- Serial.print(" vs ");\r
- Serial.print(desired_us, DEC);\r
- Serial.print(": ");\r
- Serial.print(TICKS_LOW(desired_us + MARK_EXCESS), DEC);\r
- Serial.print(" <= ");\r
- Serial.print(measured_ticks, DEC);\r
- Serial.print(" <= ");\r
- Serial.println(TICKS_HIGH(desired_us + MARK_EXCESS), DEC);\r
- return measured_ticks >= TICKS_LOW(desired_us + MARK_EXCESS) && measured_ticks <= TICKS_HIGH(desired_us + MARK_EXCESS);\r
-}\r
-\r
-int MATCH_SPACE(int measured_ticks, int desired_us) {\r
- Serial.print("Testing space ");\r
- Serial.print(measured_ticks * USECPERTICK, DEC);\r
- Serial.print(" vs ");\r
- Serial.print(desired_us, DEC);\r
- Serial.print(": ");\r
- Serial.print(TICKS_LOW(desired_us - MARK_EXCESS), DEC);\r
- Serial.print(" <= ");\r
- Serial.print(measured_ticks, DEC);\r
- Serial.print(" <= ");\r
- Serial.println(TICKS_HIGH(desired_us - MARK_EXCESS), DEC);\r
- return measured_ticks >= TICKS_LOW(desired_us - MARK_EXCESS) && measured_ticks <= TICKS_HIGH(desired_us - MARK_EXCESS);\r
-}\r
-#endif\r
-\r
-void IRsend::sendNEC(unsigned long data, int nbits)\r
-{\r
- enableIROut(38);\r
- mark(NEC_HDR_MARK);\r
- space(NEC_HDR_SPACE);\r
- for (int i = 0; i < nbits; i++) {\r
- if (data & TOPBIT) {\r
- mark(NEC_BIT_MARK);\r
- space(NEC_ONE_SPACE);\r
- } \r
- else {\r
- mark(NEC_BIT_MARK);\r
- space(NEC_ZERO_SPACE);\r
- }\r
- data <<= 1;\r
- }\r
- mark(NEC_BIT_MARK);\r
- space(0);\r
-}\r
-\r
-void IRsend::sendSony(unsigned long data, int nbits) {\r
- enableIROut(40);\r
- mark(SONY_HDR_MARK);\r
- space(SONY_HDR_SPACE);\r
- data = data << (32 - nbits);\r
- for (int i = 0; i < nbits; i++) {\r
- if (data & TOPBIT) {\r
- mark(SONY_ONE_MARK);\r
- space(SONY_HDR_SPACE);\r
- } \r
- else {\r
- mark(SONY_ZERO_MARK);\r
- space(SONY_HDR_SPACE);\r
- }\r
- data <<= 1;\r
- }\r
-}\r
-\r
-void IRsend::sendRaw(unsigned int buf[], int len, int hz)\r
-{\r
- enableIROut(hz);\r
- for (int i = 0; i < len; i++) {\r
- if (i & 1) {\r
- space(buf[i]);\r
- } \r
- else {\r
- mark(buf[i]);\r
- }\r
- }\r
- space(0); // Just to be sure\r
-}\r
-\r
-// Note: first bit must be a one (start bit)\r
-void IRsend::sendRC5(unsigned long data, int nbits)\r
-{\r
- enableIROut(36);\r
- data = data << (32 - nbits);\r
- mark(RC5_T1); // First start bit\r
- space(RC5_T1); // Second start bit\r
- mark(RC5_T1); // Second start bit\r
- for (int i = 0; i < nbits; i++) {\r
- if (data & TOPBIT) {\r
- space(RC5_T1); // 1 is space, then mark\r
- mark(RC5_T1);\r
- } \r
- else {\r
- mark(RC5_T1);\r
- space(RC5_T1);\r
- }\r
- data <<= 1;\r
- }\r
- space(0); // Turn off at end\r
-}\r
-\r
-// Caller needs to take care of flipping the toggle bit\r
-void IRsend::sendRC6(unsigned long data, int nbits)\r
-{\r
- enableIROut(36);\r
- data = data << (32 - nbits);\r
- mark(RC6_HDR_MARK);\r
- space(RC6_HDR_SPACE);\r
- mark(RC6_T1); // start bit\r
- space(RC6_T1);\r
- int t;\r
- for (int i = 0; i < nbits; i++) {\r
- if (i == 3) {\r
- // double-wide trailer bit\r
- t = 2 * RC6_T1;\r
- } \r
- else {\r
- t = RC6_T1;\r
- }\r
- if (data & TOPBIT) {\r
- mark(t);\r
- space(t);\r
- } \r
- else {\r
- space(t);\r
- mark(t);\r
- }\r
-\r
- data <<= 1;\r
- }\r
- space(0); // Turn off at end\r
-}\r
-\r
-void IRsend::mark(int time) {\r
- // Sends an IR mark for the specified number of microseconds.\r
- // The mark output is modulated at the PWM frequency.\r
- TCCR2A |= _BV(COM2B1); // Enable pin 3 PWM output\r
- delayMicroseconds(time);\r
-}\r
-\r
-/* Leave pin off for time (given in microseconds) */\r
-void IRsend::space(int time) {\r
- // Sends an IR space for the specified number of microseconds.\r
- // A space is no output, so the PWM output is disabled.\r
- TCCR2A &= ~(_BV(COM2B1)); // Disable pin 3 PWM output\r
- delayMicroseconds(time);\r
-}\r
-\r
-void IRsend::enableIROut(int khz) {\r
- // Enables IR output. The khz value controls the modulation frequency in kilohertz.\r
- // The IR output will be on pin 3 (OC2B).\r
- // This routine is designed for 36-40KHz; if you use it for other values, it's up to you\r
- // to make sure it gives reasonable results. (Watch out for overflow / underflow / rounding.)\r
- // TIMER2 is used in phase-correct PWM mode, with OCR2A controlling the frequency and OCR2B\r
- // controlling the duty cycle.\r
- // There is no prescaling, so the output frequency is 16MHz / (2 * OCR2A)\r
- // To turn the output on and off, we leave the PWM running, but connect and disconnect the output pin.\r
- // A few hours staring at the ATmega documentation and this will all make sense.\r
- // See my Secrets of Arduino PWM at http://arcfn.com/2009/07/secrets-of-arduino-pwm.html for details.\r
-\r
- \r
- // Disable the Timer2 Interrupt (which is used for receiving IR)\r
- TIMSK2 &= ~_BV(TOIE2); //Timer2 Overflow Interrupt\r
- \r
- pinMode(3, OUTPUT);\r
- digitalWrite(3, HIGH); // When not sending PWM, we want it low (invertiert angeschlossen)\r
- \r
- // COM2A = 00: disconnect OC2A\r
- // COM2B = 00: disconnect OC2B; to send signal set to 10: OC2B non-inverted\r
- // WGM2 = 101: phase-correct PWM with OCRA as top\r
- // CS2 = 000: no prescaling\r
- TCCR2A = _BV(WGM20);\r
- TCCR2B = _BV(WGM22) | _BV(CS20);\r
-\r
- // The top value for the timer. The modulation frequency will be SYSCLOCK / 2 / OCR2A.\r
- OCR2A = SYSCLOCK / 2 / khz / 1000;\r
- OCR2B = OCR2A / 4; // 33% duty cycle\r
-}\r
-\r
-IRrecv::IRrecv(int recvpin)\r
-{\r
- irparams.recvpin = recvpin;\r
- irparams.blinkflag = 0;\r
-}\r
-\r
-// initialization\r
-void IRrecv::enableIRIn() {\r
- // setup pulse clock timer interrupt\r
- TCCR2A = 0; // normal mode\r
-\r
- //Prescale /8 (16M/8 = 0.5 microseconds per tick)\r
- // Therefore, the timer interval can range from 0.5 to 128 microseconds\r
- // depending on the reset value (255 to 0)\r
- cbi(TCCR2B,CS22);\r
- sbi(TCCR2B,CS21);\r
- cbi(TCCR2B,CS20);\r
-\r
- //Timer2 Overflow Interrupt Enable\r
- sbi(TIMSK2,TOIE2);\r
-\r
- RESET_TIMER2;\r
-\r
- sei(); // enable interrupts\r
-\r
- // initialize state machine variables\r
- irparams.rcvstate = STATE_IDLE;\r
- irparams.rawlen = 0;\r
-\r
-\r
- // set pin modes\r
- pinMode(irparams.recvpin, INPUT);\r
-}\r
-\r
-// enable/disable blinking of pin 13 on IR processing\r
-void IRrecv::blink13(int blinkflag)\r
-{\r
- irparams.blinkflag = blinkflag;\r
- if (blinkflag)\r
- pinMode(BLINKLED, OUTPUT);\r
-}\r
-\r
-// TIMER2 interrupt code to collect raw data.\r
-// Widths of alternating SPACE, MARK are recorded in rawbuf.\r
-// Recorded in ticks of 50 microseconds.\r
-// rawlen counts the number of entries recorded so far.\r
-// First entry is the SPACE between transmissions.\r
-// As soon as a SPACE gets long, ready is set, state switches to IDLE, timing of SPACE continues.