add init.d script to openslp
git-svn-id: svn://svn.openwrt.org/openwrt/packages@10342 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b794ca2ffb
commit
00ea0a2f46
@ -32,11 +32,12 @@ endef
|
|||||||
# all
|
# all
|
||||||
|
|
||||||
define Package/openslp/install
|
define Package/openslp/install
|
||||||
$(INSTALL_DIR) $(1)/etc $(1)/lib $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/etc $(1)/lib $(1)/usr/bin $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/slpd/slpd $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/slpd/slpd $(1)/usr/bin/
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/slptool/.libs/slptool $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/slptool/.libs/slptool $(1)/usr/bin/
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libslp/.libs/libslp.so* $(1)/lib
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libslp/.libs/libslp.so* $(1)/lib
|
||||||
$(INSTALL_DATA) ./files/* $(1)/etc
|
$(INSTALL_DATA) ./files/etc/slp.* $(1)/etc
|
||||||
|
$(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,openslp))
|
$(eval $(call BuildPackage,openslp))
|
||||||
|
14
net/openslp/files/etc/init.d/slpd
Normal file
14
net/openslp/files/etc/init.d/slpd
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2008 OpenWrt.org
|
||||||
|
START=50
|
||||||
|
|
||||||
|
start() {
|
||||||
|
cp /etc/slp* /var
|
||||||
|
IP=`ifconfig br-lan | grep inet | cut -d" " -f12 | cut -d: -f2`
|
||||||
|
sed -i "s/IPADDR/${IP}/g" /var/slp.reg
|
||||||
|
slpd -r /var/slp.reg -c /var/slp.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
killall slpd
|
||||||
|
}
|
2
net/openslp/files/etc/slp.reg
Normal file
2
net/openslp/files/etc/slp.reg
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
service:device.AP://IPADDR,en,65535
|
||||||
|
use default scopes
|
@ -1,2 +0,0 @@
|
|||||||
service:device.AP://192.168.1.1,en,65535
|
|
||||||
use default scopes
|
|
Loading…
x
Reference in New Issue
Block a user