为openwrt编译xd-h3c

西电老校区,openwrt上用的认证软件。

在package下新建一目录"xd-h3c",在里面新建一个Makefile,内容如下:

 include $(TOPDIR)/rules.mk

 PKG_NAME:=xd-h3c
PKG_VERSION:=-- PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/godspeed1989/xd-h3c
PKG_MAINTAINER:=godspeed1989 <godspeed1989@gmail.com> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME).tar.gz
PKG_SOURCE_VERSION:=HEAD include $(INCLUDE_DIR)/package.mk define Package/xd-h3c
SECTION:=base
CATEGORY:=Network
DEPENDS:=+libpcap
TITLE:=An XiDian network authentication client
#DESCRIPTION:=This variable is obsolete. use the Package/name/description define instead!
URL:=https://github.com/godspeed1989/xd-h3c
endef define Package/xd-h3c/description
An network authentication client,
Most usually used in China collages.
endef define Build/Prepare
$(call Build/Prepare/Default)
$(SED) 's/RunDHCP(Device/\/\/RunDHCP(Device/g' $(PKG_BUILD_DIR)/authenticate.c
endef define Package/xd-h3c/install
$(INSTALL_DIR) $()/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/xdh3c $()/usr/sbin/
endef $(eval $(call BuildPackage,xd-h3c))

这里注意,每行前面的不是空格,是Tab。

然后make menuconfig,在network下面选择xd-h3c即可

路由刷好后putty登陆进去,在/etc/rc.local里面加入自启动:(xdh3c -u 帐号 -p 密码 -n 网卡)&

现在的openwrt版本( 我的trunk r45688)在老校区IPV6有问题

修改见我上一篇文章http://www.cnblogs.com/02xiaoma/p/4505169.html

上一篇:推荐几款主流的Css Reset


下一篇:javascript中的array对象属性及方法