首页 > 其他 > 详细

OpenWrt 安装sshpass方法

时间:2014-10-30 15:15:53      阅读:511      评论:0      收藏:0      [点我收藏+]

自己先整个SDK吧,不明的可以再openwrt源码目录直接make menuconfig 看看有没有SDK这个东西,选择了编译。

下面是这样的:

1. 下载sshpass源码

wget http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz

2. 新建目录package/sshpass/src

3. 把下载下来的源码放到相应目录。

4. 在新建Makefile文件package/sshpass/Makefile

<span style="font-size:14px;">include $(TOPDIR)/rules.mk
#Name and release number of this package
PKG_NAME:=sshpass
PKG_RELEASE:=1.5

PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/sshpass
        SECTION:=utils
        CATEGORY:=Utilities
        TITLE:=sshpass
endef

define Package/sshpass/description
        Sshpass is a tool for non-interactivly performing password authentication with SSH's
endef

#Specify what needs to be done to prepare for building the package.
define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        $(CP) ./src/* $(PKG_BUILD_DIR)/
endef

#Specify where and how to install the program.
define Package/sshpass/install
        $(INSTALL_DIR) $(1)/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/sshpass $(1)/bin/
endef

#This line executes the necessary commands to compile our program.
$(eval $(call BuildPackage,sshpass))
</span>

5. make V=s 这样就得到了梦寐以求的sshpass了。

OpenWrt 安装sshpass方法

原文:http://blog.csdn.net/qianguozheng/article/details/40620171

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!