init script cleanup, use /etc/rc.d/ for enabled scripts, /etc/init.d/<pkgname> (enable|disable) manages symlinks
git-svn-id: svn://svn.openwrt.org/openwrt/packages@5128 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d42adbf1a5
commit
7608ba449f
@ -5,9 +5,9 @@ BIN=monit
|
|||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,9 @@ DEFAULT=/etc/default/$BIN
|
|||||||
LIB_D=/var/lib/osiris
|
LIB_D=/var/lib/osiris
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $LIB_D
|
mkdir -p $LIB_D
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
|
@ -20,7 +20,6 @@ PKG_CAT:=zcat
|
|||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
PKG_INIT_LEVEL:=60
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
@ -56,7 +55,7 @@ define Package/syslog-ng/install
|
|||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/syslog-ng $(1)/usr/sbin/
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/syslog-ng $(1)/usr/sbin/
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/syslog-ng.init $(1)/etc/init.d/S$(PKG_INIT_LEVEL)syslog-ng
|
install -m0755 ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
|
||||||
install -d -m0755 $(1)/etc/syslog-ng
|
install -d -m0755 $(1)/etc/syslog-ng
|
||||||
install -m0644 ./files/syslog-ng.conf $(1)/etc/syslog-ng/
|
install -m0644 ./files/syslog-ng.conf $(1)/etc/syslog-ng/
|
||||||
endef
|
endef
|
||||||
|
@ -58,7 +58,7 @@ endef
|
|||||||
define Package/mrd6/install
|
define Package/mrd6/install
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0644 files/mrd6.conf $(1)/etc
|
install -m0644 files/mrd6.conf $(1)/etc
|
||||||
install -m0755 files/mrd6.init $(1)/etc/init.d/S60mrd6
|
install -m0755 files/mrd6.init $(1)/etc/init.d/mrd6
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,mrd6))
|
$(eval $(call BuildPackage,mrd6))
|
||||||
|
@ -1,19 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
export PHP_FCGI_CHILDREN=''
|
start() {
|
||||||
PORT=1026
|
$BIN -b $PORT &
|
||||||
BIN=/usr/sbin/php
|
}
|
||||||
|
|
||||||
case $1 in
|
stop() {
|
||||||
start)
|
killall php
|
||||||
$BIN -b $PORT &
|
}
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
kill `pidof php`
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "usage: $0 (start|stop)"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $?
|
|
||||||
|
@ -5,9 +5,9 @@ BIN=avahi-daemon
|
|||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
OPTIONS="-D"
|
OPTIONS="-D"
|
||||||
RUN_D=/var/run/$BIN
|
RUN_D=/var/run/$BIN
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
DEFAULT=/etc/default/autopid
|
DEFAULT=/etc/default/autopid
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/autoipd.pid
|
PID_F=$RUN_D/autoipd.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
autoipd $OPTIONS
|
autoipd $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
DEFAULT=/etc/default/mDNSResponder
|
DEFAULT=/etc/default/mDNSResponder
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/mDNSResponder.pid
|
PID_F=$RUN_D/mDNSResponder.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
mDNSResponder $OPTIONS
|
mDNSResponder $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
DEFAULT=/etc/default/nifd
|
DEFAULT=/etc/default/nifd
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/nifd.pid
|
PID_F=$RUN_D/nifd.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
nifd $OPTIONS
|
nifd $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,9 @@ LOG_D=/var/log
|
|||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/snmpd.pid
|
PID_F=$RUN_D/snmpd.pid
|
||||||
|
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $LIB_D ] || mkdir -p $LIB_D
|
[ -d $LIB_D ] || mkdir -p $LIB_D
|
||||||
[ -d $LOG_D ] || mkdir -p $LOG_D
|
[ -d $LOG_D ] || mkdir -p $LOG_D
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
|
@ -65,7 +65,6 @@ define Package/peercast/install
|
|||||||
install -m0644 ./files/peercast.ini $(1)/etc/
|
install -m0644 ./files/peercast.ini $(1)/etc/
|
||||||
install -m0755 -d $(1)/etc/init.d
|
install -m0755 -d $(1)/etc/init.d
|
||||||
install -m0755 ./files/peercast.init $(1)/etc/init.d/peercast
|
install -m0755 ./files/peercast.init $(1)/etc/init.d/peercast
|
||||||
ln -sf peercast $(1)/etc/init.d/S60peercast
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,peercast))
|
$(eval $(call BuildPackage,peercast))
|
||||||
|
@ -43,7 +43,7 @@ endef
|
|||||||
define Package/aiccu/install
|
define Package/aiccu/install
|
||||||
mkdir -p $(1)/usr/sbin $(1)/etc/init.d
|
mkdir -p $(1)/usr/sbin $(1)/etc/init.d
|
||||||
install -m 755 $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(1)/usr/sbin/
|
install -m 755 $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(1)/usr/sbin/
|
||||||
install -m 755 ./files/aiccu.init $(1)/etc/init.d/S51aiccu
|
install -m 755 ./files/aiccu.init $(1)/etc/init.d/aiccu
|
||||||
install -m 644 $(PKG_BUILD_DIR)/doc/aiccu.conf $(1)/etc/aiccu.conf
|
install -m 644 $(PKG_BUILD_DIR)/doc/aiccu.conf $(1)/etc/aiccu.conf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -20,8 +20,6 @@ PKG_CAT:=zcat
|
|||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
|
||||||
PKG_INIT_PRIO:=60
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/asterisk/Default
|
define Package/asterisk/Default
|
||||||
@ -392,7 +390,7 @@ define Package/asterisk/install
|
|||||||
install -m0644 ./files/asterisk.default $(1)/etc/default/asterisk
|
install -m0644 ./files/asterisk.default $(1)/etc/default/asterisk
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/asterisk.init $(1)/etc/init.d/asterisk
|
install -m0755 ./files/asterisk.init $(1)/etc/init.d/asterisk
|
||||||
ln -sf asterisk $(1)/etc/init.d/S60asterisk
|
ln -sf asterisk $(1)/etc/init.d/asterisk
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/asterisk-mini/install
|
define Package/asterisk-mini/install
|
||||||
@ -418,7 +416,7 @@ define Package/asterisk-mini/install
|
|||||||
install -m0644 ./files/asterisk.default $(1)/etc/default/asterisk
|
install -m0644 ./files/asterisk.default $(1)/etc/default/asterisk
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/asterisk.init $(1)/etc/init.d/asterisk
|
install -m0755 ./files/asterisk.init $(1)/etc/init.d/asterisk
|
||||||
ln -sf asterisk $(1)/etc/init.d/S$(PKG_INIT_PRIO)asterisk
|
ln -sf asterisk $(1)/etc/init.d/asterisk
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/asterisk-mysql/install
|
define Package/asterisk-mysql/install
|
||||||
|
@ -1,23 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
DEFAULT=/etc/default/asterisk
|
DEFAULT=/etc/default/asterisk
|
||||||
OPTIONS=""
|
OPTIONS=""
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
[ "$ENABLE_ASTERISK" = "yes" ] || exit 0
|
|
||||||
|
|
||||||
case $1 in
|
start() {
|
||||||
start)
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d /var/run ] || mkdir -p /var/run
|
[ -d /var/run ] || mkdir -p /var/run
|
||||||
[ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
|
[ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
|
||||||
[ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
|
[ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
|
||||||
/usr/sbin/asterisk $OPTIONS
|
/usr/sbin/asterisk $OPTIONS
|
||||||
;;
|
}
|
||||||
stop)
|
|
||||||
[ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "usage: $0 (start|stop)"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $?
|
stop() {
|
||||||
|
[ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
@ -118,7 +118,7 @@ define Package/bind-server/install
|
|||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
|
||||||
$(CP) files/bind $(1)/etc
|
$(CP) files/bind $(1)/etc
|
||||||
$(CP) files/named.init $(1)/etc/init.d/S$(PKG_INIT_LEVEL)named
|
$(CP) files/named.init $(1)/etc/init.d/named
|
||||||
find $(1)/etc/bind -name ".svn" | xargs rm -rf
|
find $(1)/etc/bind -name ".svn" | xargs rm -rf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -61,14 +61,14 @@ define Build/Compile
|
|||||||
$(CP) $(PKG_BUILD_DIR)/translation $(PKG_INSTALL_DIR)/usr/lib/bx/
|
$(CP) $(PKG_BUILD_DIR)/translation $(PKG_INSTALL_DIR)/usr/lib/bx/
|
||||||
bzip2 $(PKG_INSTALL_DIR)/usr/lib/bx/translation/*
|
bzip2 $(PKG_INSTALL_DIR)/usr/lib/bx/translation/*
|
||||||
$(CP) ./files/bitchxrc $(PKG_INSTALL_DIR)/tmp/.bitchxrc
|
$(CP) ./files/bitchxrc $(PKG_INSTALL_DIR)/tmp/.bitchxrc
|
||||||
$(CP) ./files/S98bitchxrc $(PKG_INSTALL_DIR)/etc/init.d/S98bitchxrc
|
$(CP) ./files/bitchxrc.init $(PKG_INSTALL_DIR)/etc/init.d/bitchxrc
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/bitchx/install
|
define Package/bitchx/install
|
||||||
install -m0755 -d $(1)/usr/bin $(1)/usr/lib $(1)/etc/init.d $(1)/tmp
|
install -m0755 -d $(1)/usr/bin $(1)/usr/lib $(1)/etc/init.d $(1)/tmp
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/etc/init.d/S98bitchxrc $(1)/etc/init.d/
|
$(CP) $(PKG_INSTALL_DIR)/etc/init.d/bitchxrc $(1)/etc/init.d/
|
||||||
$(CP) $(PKG_INSTALL_DIR)/tmp/.bitchxrc $(1)/tmp
|
$(CP) $(PKG_INSTALL_DIR)/tmp/.bitchxrc $(1)/tmp
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=98
|
||||||
start() {
|
start() {
|
||||||
# make /tmp/.bitchxrc as many servers ban root
|
# make /tmp/.bitchxrc as many servers ban root
|
||||||
if [ ! -e /tmp/.bitchxrc ]
|
if [ ! -e /tmp/.bitchxrc ]
|
@ -38,7 +38,6 @@ endef
|
|||||||
define Package/bitlbee/conffiles
|
define Package/bitlbee/conffiles
|
||||||
/etc/bitlbee/motd.txt
|
/etc/bitlbee/motd.txt
|
||||||
/etc/bitlbee/bitlbee.conf
|
/etc/bitlbee/bitlbee.conf
|
||||||
/etc/init.d/S55bitlbee
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
@ -81,7 +80,7 @@ define Package/bitlbee/install
|
|||||||
$(MAKE) -C $(PKG_BUILD_DIR)/doc/user-guide \
|
$(MAKE) -C $(PKG_BUILD_DIR)/doc/user-guide \
|
||||||
DESTDIR="$(1)" install
|
DESTDIR="$(1)" install
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/S55bitlbee $(1)/etc/init.d/S55bitlbee
|
install -m0755 ./files/bitlbee.init $(1)/etc/init.d/bitlbee
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,bitlbee))
|
$(eval $(call BuildPackage,bitlbee))
|
||||||
|
@ -98,7 +98,7 @@ define Package/roofnet/install
|
|||||||
$(CP) $(PKG_BUILD_DIR)/conf/wifi/read_handler $(1)/usr/bin
|
$(CP) $(PKG_BUILD_DIR)/conf/wifi/read_handler $(1)/usr/bin
|
||||||
$(CP) $(PKG_BUILD_DIR)/conf/wifi/write_handler $(1)/usr/bin
|
$(CP) $(PKG_BUILD_DIR)/conf/wifi/write_handler $(1)/usr/bin
|
||||||
mkdir -p $(1)/etc/init.d
|
mkdir -p $(1)/etc/init.d
|
||||||
install -m 755 ./files/S50roofnet $(1)/etc/init.d/
|
install -m 755 ./files/roofnet.init $(1)/etc/init.d/roofnet
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,click))
|
$(eval $(call BuildPackage,click))
|
||||||
|
@ -96,7 +96,7 @@ define Package/cups/install
|
|||||||
$(CP) ./files/etc/cups/* $(1)/etc/cups/
|
$(CP) ./files/etc/cups/* $(1)/etc/cups/
|
||||||
# install initscript with priority 60
|
# install initscript with priority 60
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/cupsd.init $(1)/etc/init.d/S60cupsd
|
install -m0755 ./files/cupsd.init $(1)/etc/init.d/cupsd
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
|
@ -5,9 +5,9 @@ DEFAULT=/etc/default/radiusd
|
|||||||
LOG_D=/var/log/radius
|
LOG_D=/var/log/radius
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/radiusd.pid
|
PID_F=$RUN_D/radiusd.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $LOG_D ] || mkdir -p $LOG_D
|
[ -d $LOG_D ] || mkdir -p $LOG_D
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
radiusd $OPTIONS
|
radiusd $OPTIONS
|
||||||
|
@ -5,9 +5,9 @@ BIN=gmediaserver
|
|||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ define Package/htpdate/install
|
|||||||
install -m0644 ./files/htpdate.default $(1)/etc/default/htpdate
|
install -m0644 ./files/htpdate.default $(1)/etc/default/htpdate
|
||||||
install -d -m0755 $(1)/etc/init.d/
|
install -d -m0755 $(1)/etc/init.d/
|
||||||
install -m0755 ./files/htpdate.init $(1)/etc/init.d/htpdate
|
install -m0755 ./files/htpdate.init $(1)/etc/init.d/htpdate
|
||||||
ln -sf htpdate $(1)/etc/init.d/S49htpdate
|
ln -sf htpdate $(1)/etc/init.d/htpdate
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
install -m0755 $(PKG_BUILD_DIR)/htpdate $(1)/usr/sbin/
|
install -m0755 $(PKG_BUILD_DIR)/htpdate $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=49
|
||||||
BIN=htpdate
|
BIN=htpdate
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
$BIN -l -s -t $OPTIONS && $BIN -D $OPTIONS
|
$BIN -l -s -t $OPTIONS && $BIN -D $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
BIN=l2tpd
|
BIN=l2tpd
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@ DEFAULT=/etc/default/$BIN
|
|||||||
LOG_D=/var/log/$BIN
|
LOG_D=/var/log/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $LOG_D
|
mkdir -p $LOG_D
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
|
@ -61,7 +61,7 @@ define Package/maradns/install
|
|||||||
install -d -m0755 $(1)/etc
|
install -d -m0755 $(1)/etc
|
||||||
install -m0644 ./files/mararc $(1)/etc/mararc
|
install -m0644 ./files/mararc $(1)/etc/mararc
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/maradns.init $(1)/etc/init.d/S60maradns
|
install -m0755 ./files/maradns.init $(1)/etc/init.d/maradns
|
||||||
install -d -m0755 $(1)/usr/bin
|
install -d -m0755 $(1)/usr/bin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone,fetchzone,duende} $(1)/usr/bin/
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone,fetchzone,duende} $(1)/usr/bin/
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
|
@ -53,7 +53,7 @@ define Package/miau/install
|
|||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -d -m0755 $(1)/etc/default
|
install -d -m0755 $(1)/etc/default
|
||||||
install -d -m0755 $(1)/etc/miau
|
install -d -m0755 $(1)/etc/miau
|
||||||
install -m0755 ./files/S50miau $(1)/etc/init.d/S50miau
|
install -m0755 ./files/miau.init $(1)/etc/init.d/miau
|
||||||
install -m0644 ./files/miau $(1)/etc/default/miau
|
install -m0644 ./files/miau $(1)/etc/default/miau
|
||||||
install -m0644 ./files/miaurc $(1)/etc/miau/miaurc
|
install -m0644 ./files/miaurc $(1)/etc/miau/miaurc
|
||||||
endef
|
endef
|
||||||
|
@ -5,9 +5,9 @@ BIN=miredo-server
|
|||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
insmod ipv6
|
insmod ipv6
|
||||||
insmod tun
|
insmod tun
|
||||||
|
@ -5,9 +5,9 @@ BIN=miredo
|
|||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
insmod ipv6
|
insmod ipv6
|
||||||
insmod tun
|
insmod tun
|
||||||
|
@ -41,7 +41,7 @@ endef
|
|||||||
|
|
||||||
define Package/netperf/install
|
define Package/netperf/install
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/netserver.init $(1)/etc/init.d/S51netserver
|
install -m0755 ./files/netserver.init $(1)/etc/init.d/netserver
|
||||||
install -d -m0755 $(1)/usr/bin
|
install -d -m0755 $(1)/usr/bin
|
||||||
install -m0755 $(PKG_BUILD_DIR)/netperf $(1)/usr/bin/
|
install -m0755 $(PKG_BUILD_DIR)/netperf $(1)/usr/bin/
|
||||||
install -m0755 $(PKG_BUILD_DIR)/netserver $(1)/usr/bin/
|
install -m0755 $(PKG_BUILD_DIR)/netserver $(1)/usr/bin/
|
||||||
|
@ -55,7 +55,7 @@ endef
|
|||||||
define Package/nfs-kernel-server/install
|
define Package/nfs-kernel-server/install
|
||||||
install -d -m755 $(1)/etc/init.d $(1)/usr/sbin
|
install -d -m755 $(1)/etc/init.d $(1)/usr/sbin
|
||||||
install -m0644 ./files/nfsd.exports $(1)/etc/exports
|
install -m0644 ./files/nfsd.exports $(1)/etc/exports
|
||||||
install -m0755 ./files/nfsd.init $(1)/etc/init.d/S60nfsd
|
install -m0755 ./files/nfsd.init $(1)/etc/init.d/nfsd
|
||||||
install -m0755 $(PKG_BUILD_DIR)/utils/lockd/lockd $(1)/usr/sbin/rpc.lockd
|
install -m0755 $(PKG_BUILD_DIR)/utils/lockd/lockd $(1)/usr/sbin/rpc.lockd
|
||||||
install -m0755 $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
|
install -m0755 $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
|
||||||
install -m0755 $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
|
install -m0755 $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
NFS_D=/var/lib/nfs
|
NFS_D=/var/lib/nfs
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
@ -38,7 +38,7 @@ define Package/nfs-server/install
|
|||||||
install -d -m0755 $(1)/etc
|
install -d -m0755 $(1)/etc
|
||||||
install -m0644 ./files/nfsd.exports $(1)/etc/exports
|
install -m0644 ./files/nfsd.exports $(1)/etc/exports
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/nfsd.init $(1)/etc/init.d/S60nfsd
|
install -m0755 ./files/nfsd.init $(1)/etc/init.d/nfsd
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
install -m0755 $(PKG_BUILD_DIR)/rpc.* $(1)/usr/sbin/
|
install -m0755 $(PKG_BUILD_DIR)/rpc.* $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
@ -44,7 +44,7 @@ define Package/oidentd/install
|
|||||||
install -m0755 -d $(1)/usr/sbin
|
install -m0755 -d $(1)/usr/sbin
|
||||||
install -m0755 -d $(1)/etc/init.d
|
install -m0755 -d $(1)/etc/init.d
|
||||||
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/sbin/
|
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/sbin/
|
||||||
$(CP) ./files/S85oidentd $(1)/etc/init.d
|
$(CP) ./files/oidentd.init $(1)/etc/init.d/oidentd
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,oidentd))
|
$(eval $(call BuildPackage,oidentd))
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=85
|
||||||
start() {
|
start() {
|
||||||
/usr/sbin/oidentd -m -f 113
|
/usr/sbin/oidentd -m -f 113
|
||||||
}
|
}
|
@ -109,7 +109,7 @@ define Package/olsrd/install
|
|||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(1)/usr/sbin/
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(1)/usr/sbin/
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/olsrd.init $(1)/etc/init.d/S60olsrd
|
install -m0755 ./files/olsrd.init $(1)/etc/init.d/olsrd
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/olsrd-mod-dot-draw/install
|
define Package/olsrd-mod-dot-draw/install
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
DEFAULT=/etc/default/olsrd
|
DEFAULT=/etc/default/olsrd
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
olsrd $OPTIONS
|
olsrd $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ define Package/openntpd/install
|
|||||||
install -d -m0755 $(1)/etc
|
install -d -m0755 $(1)/etc
|
||||||
install -m0644 ./files/ntpd.conf $(1)/etc/
|
install -m0644 ./files/ntpd.conf $(1)/etc/
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/ntpd.init $(1)/etc/init.d/S55ntpd
|
install -m0755 ./files/ntpd.init $(1)/etc/init.d/ntpd
|
||||||
install -d -m0755 $(1)/usr/sbin/
|
install -d -m0755 $(1)/usr/sbin/
|
||||||
install -m0755 $(PKG_BUILD_DIR)/ntpd $(1)/usr/sbin/
|
install -m0755 $(PKG_BUILD_DIR)/ntpd $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
start() {
|
start() {
|
||||||
mkdir -p `awk -F: '/^ntp:/{print $6}' /etc/passwd`
|
mkdir -p `awk -F: '/^ntp:/{print $6}' /etc/passwd`
|
||||||
/usr/sbin/ntpd -s
|
/usr/sbin/ntpd -s
|
||||||
|
@ -152,7 +152,7 @@ define Package/openssh-server/install
|
|||||||
chmod 0700 $(1)/etc/ssh
|
chmod 0700 $(1)/etc/ssh
|
||||||
$(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/
|
$(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/
|
||||||
install -m0755 -d $(1)/etc/init.d
|
install -m0755 -d $(1)/etc/init.d
|
||||||
install -m0755 ./files/S50sshd $(1)/etc/init.d/
|
install -m0755 ./files/sshd.init $(1)/etc/init.d/sshd
|
||||||
install -m0755 -d $(1)/usr/bin
|
install -m0755 -d $(1)/usr/bin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(1)/usr/bin/
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(1)/usr/bin/
|
||||||
install -m0755 -d $(1)/usr/sbin
|
install -m0755 -d $(1)/usr/sbin
|
||||||
|
@ -56,7 +56,6 @@ define Package/p910nd/install
|
|||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/p910nd.init $(1)/etc/init.d/p910nd
|
install -m0755 ./files/p910nd.init $(1)/etc/init.d/p910nd
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
ln -sf p910nd $(1)/etc/init.d/S$(PKG_INIT_PRIO)p910nd
|
|
||||||
install -m0755 $(PKG_BUILD_DIR)/p910nd $(1)/usr/sbin/
|
install -m0755 $(PKG_BUILD_DIR)/p910nd $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ define Package/parprouted/install
|
|||||||
install -m0755 ./files/parprouted.default $(1)/etc/default/parprouted
|
install -m0755 ./files/parprouted.default $(1)/etc/default/parprouted
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/parprouted.init $(1)/etc/init.d/parprouted
|
install -m0755 ./files/parprouted.init $(1)/etc/init.d/parprouted
|
||||||
ln -sf parprouted $(1)/etc/init.d/S50parpouted
|
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
install -m0755 $(PKG_BUILD_DIR)/parprouted $(1)/usr/sbin/
|
install -m0755 $(PKG_BUILD_DIR)/parprouted $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
BIN=parprouted
|
BIN=parprouted
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
BIN=pgtext
|
BIN=pgtext
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN_${IF}_${ID}.pid
|
PID_F=$RUN_D/$BIN_${IF}_${ID}.pid
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ endef
|
|||||||
define Package/portmap/install
|
define Package/portmap/install
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/portmap.init $(1)/etc/init.d/portmap
|
install -m0755 ./files/portmap.init $(1)/etc/init.d/portmap
|
||||||
ln -sf portmap $(1)/etc/init.d/S59portmap
|
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
install -m0755 $(PKG_BUILD_DIR)/portmap $(1)/usr/sbin/
|
install -m0755 $(PKG_BUILD_DIR)/portmap $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=40
|
||||||
BIN=portmap
|
BIN=portmap
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ define Package/pptpd/install
|
|||||||
install -d -m0755 $(1)/etc
|
install -d -m0755 $(1)/etc
|
||||||
install -m0644 ./files/pptpd.conf $(1)/etc/
|
install -m0644 ./files/pptpd.conf $(1)/etc/
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/pptpd.init $(1)/etc/init.d/S50pptpd
|
install -m0755 ./files/pptpd.init $(1)/etc/init.d/pptpd
|
||||||
install -d -m0755 $(1)/etc/ppp
|
install -d -m0755 $(1)/etc/ppp
|
||||||
install -m0644 ./files/options.pptpd $(1)/etc/ppp/
|
install -m0644 ./files/options.pptpd $(1)/etc/ppp/
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
BIN=pptpd
|
BIN=pptpd
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
for m in arc4 sha1 slhc crc-ccitt ppp_generic ppp_async ppp_mppe_mppc; do
|
for m in arc4 sha1 slhc crc-ccitt ppp_generic ppp_async ppp_mppe_mppc; do
|
||||||
insmod $m >/dev/null 2>&1
|
insmod $m >/dev/null 2>&1
|
||||||
|
@ -124,8 +124,8 @@ define Package/quagga/install
|
|||||||
install -d -m0755 $(1)/etc/quagga/
|
install -d -m0755 $(1)/etc/quagga/
|
||||||
chmod 0750 $(1)/etc/quagga/
|
chmod 0750 $(1)/etc/quagga/
|
||||||
install -d -m0755 $(1)/etc/init.d/
|
install -d -m0755 $(1)/etc/init.d/
|
||||||
|
install -m0755 ./files/quagga $(1)/usr/sbin/quagga.init
|
||||||
install -m0755 ./files/quagga.init $(1)/etc/init.d/quagga
|
install -m0755 ./files/quagga.init $(1)/etc/init.d/quagga
|
||||||
ln -sf quagga $(1)/etc/init.d/S49quagga
|
|
||||||
install -d -m0755 $(1)/var/run/quagga
|
install -d -m0755 $(1)/var/run/quagga
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
333
net/quagga/files/quagga
Normal file
333
net/quagga/files/quagga
Normal file
@ -0,0 +1,333 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# quagga Starts/stops quagga daemons and watchquagga.
|
||||||
|
# Create a daemon.conf file to have that routing daemon
|
||||||
|
# started/stopped automagically when using this script
|
||||||
|
# without any daemon names as args.
|
||||||
|
# If watchquagga is available, it will also be
|
||||||
|
# started/stopped if the script is called without
|
||||||
|
# any daemon names.
|
||||||
|
#
|
||||||
|
|
||||||
|
ME=$(basename $0)
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: ${ME} {start|stop|restart} [daemon ...]"
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
usage
|
||||||
|
else
|
||||||
|
COMMAND=$1
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
ARG_DAEMONS=$*
|
||||||
|
BINDIR=/usr/sbin
|
||||||
|
CONFDIR=/etc/quagga
|
||||||
|
STATEDIR=/var/run/quagga
|
||||||
|
DAEMONS="zebra ripd ripngd ospfd ospf6d bgpd"
|
||||||
|
DAEMON_FLAGS=-d
|
||||||
|
WATCHQUAGGA_FLAGS="-d -z -T 60 -R"
|
||||||
|
WATCHQUAGGA_CMD="$0 watchrestart"
|
||||||
|
if [ ${COMMAND} != "watchrestart" ]
|
||||||
|
then
|
||||||
|
DAEMONS="${DAEMONS} watchquagga"
|
||||||
|
fi
|
||||||
|
DAEMONS_STARTSEQ=${DAEMONS}
|
||||||
|
|
||||||
|
reverse()
|
||||||
|
{
|
||||||
|
local revlist r
|
||||||
|
revlist=
|
||||||
|
for r
|
||||||
|
do
|
||||||
|
revlist="$r $revlist"
|
||||||
|
done
|
||||||
|
echo $revlist
|
||||||
|
}
|
||||||
|
|
||||||
|
DAEMONS_STOPSEQ=$(reverse ${DAEMONS_STARTSEQ})
|
||||||
|
|
||||||
|
#pidof() {
|
||||||
|
# ps ax | awk 'match($5, "(^|/)'"$1"'$") > 0 { printf " %s", $1 }'
|
||||||
|
#}
|
||||||
|
|
||||||
|
quit() {
|
||||||
|
echo "${ME}: $1"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
die() {
|
||||||
|
echo "${ME}: $1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
is_in() {
|
||||||
|
local i
|
||||||
|
for i in $2
|
||||||
|
do
|
||||||
|
[ "$1" = "$i" ] && return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
select_subset() {
|
||||||
|
local unknown i j
|
||||||
|
unknown=
|
||||||
|
RESULT=
|
||||||
|
for i in $1
|
||||||
|
do
|
||||||
|
is_in $i "$2" || unknown="$unknown $i"
|
||||||
|
done
|
||||||
|
if [ -n "$unknown" ]
|
||||||
|
then
|
||||||
|
RESULT=$unknown
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
for j in $2
|
||||||
|
do
|
||||||
|
is_in $j "$1" && RESULT="$RESULT $j"
|
||||||
|
done
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# check command
|
||||||
|
|
||||||
|
case ${COMMAND}
|
||||||
|
in
|
||||||
|
start|stop|restart)
|
||||||
|
;;
|
||||||
|
watchrestart)
|
||||||
|
if [ -n "$ARG_DAEMONS" ]
|
||||||
|
then
|
||||||
|
echo "${ME}: watchrestart mode is only for use by watchquagga"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# select daemons to start
|
||||||
|
|
||||||
|
case ${COMMAND}
|
||||||
|
in
|
||||||
|
start|restart|watchrestart)
|
||||||
|
START_DAEMONS=
|
||||||
|
for d in ${DAEMONS_STARTSEQ}
|
||||||
|
do
|
||||||
|
[ -x "${BINDIR}/${d}" -a -f "${CONFDIR}/${d}.conf" ] \
|
||||||
|
&& START_DAEMONS="${START_DAEMONS}${d} "
|
||||||
|
done
|
||||||
|
WATCHQUAGGA_DAEMONS=${START_DAEMONS}
|
||||||
|
if is_in watchquagga "${DAEMONS_STARTSEQ}"
|
||||||
|
then
|
||||||
|
START_DAEMONS="${START_DAEMONS} watchquagga"
|
||||||
|
fi
|
||||||
|
if [ -n "${ARG_DAEMONS}" ]
|
||||||
|
then
|
||||||
|
if select_subset "${ARG_DAEMONS}" "${DAEMONS}"
|
||||||
|
then
|
||||||
|
if select_subset "${ARG_DAEMONS}" "${START_DAEMONS}"
|
||||||
|
then
|
||||||
|
START_DAEMONS=${RESULT}
|
||||||
|
else
|
||||||
|
die "these daemons are not startable:${RESULT}."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
die "unknown daemons:${RESULT}; choose from: ${DAEMONS}."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# select daemons to stop
|
||||||
|
|
||||||
|
case ${COMMAND}
|
||||||
|
in
|
||||||
|
stop|restart|watchrestart)
|
||||||
|
STOP_DAEMONS=${DAEMONS_STOPSEQ}
|
||||||
|
if [ -n "${ARG_DAEMONS}" ]
|
||||||
|
then
|
||||||
|
if select_subset "${ARG_DAEMONS}" "${STOP_DAEMONS}"
|
||||||
|
then
|
||||||
|
STOP_DAEMONS=${RESULT}
|
||||||
|
else
|
||||||
|
die "unknown daemons:${RESULT}; choose from: ${DAEMONS}."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
stop_daemons=
|
||||||
|
for d in ${STOP_DAEMONS}
|
||||||
|
do
|
||||||
|
pidfile=${STATEDIR}/${d}.pid
|
||||||
|
if [ -f "${pidfile}" -o -n "$(pidof ${d})" ]
|
||||||
|
then
|
||||||
|
stop_daemons="${stop_daemons}${d} "
|
||||||
|
elif [ -n "${ARG_DAEMONS}" ]
|
||||||
|
then
|
||||||
|
echo "${ME}: found no ${d} process running."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
STOP_DAEMONS=${stop_daemons}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# stop daemons
|
||||||
|
|
||||||
|
for d in $STOP_DAEMONS
|
||||||
|
do
|
||||||
|
echo -n "${ME}: Stopping ${d} ... "
|
||||||
|
pidfile=${STATEDIR}/${d}.pid
|
||||||
|
if [ -f "${pidfile}" ]
|
||||||
|
then
|
||||||
|
file_pid=$(cat ${pidfile})
|
||||||
|
if [ -z "${file_pid}" ]
|
||||||
|
then
|
||||||
|
echo -n "no pid file entry found ... "
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
file_pid=
|
||||||
|
echo -n "no pid file found ... "
|
||||||
|
fi
|
||||||
|
proc_pid=$(pidof ${d})
|
||||||
|
if [ -z "${proc_pid}" ]
|
||||||
|
then
|
||||||
|
echo -n "found no ${d} process running ... "
|
||||||
|
else
|
||||||
|
count=0
|
||||||
|
notinpidfile=
|
||||||
|
for p in ${proc_pid}
|
||||||
|
do
|
||||||
|
count=$((${count}+1))
|
||||||
|
if kill ${p}
|
||||||
|
then
|
||||||
|
echo -n "killed ${p} ... "
|
||||||
|
else
|
||||||
|
echo -n "failed to kill ${p} ... "
|
||||||
|
fi
|
||||||
|
[ "${p}" = "${file_pid}" ] \
|
||||||
|
|| notinpidfile="${notinpidfile} ${p}"
|
||||||
|
done
|
||||||
|
[ ${count} -le 1 ] \
|
||||||
|
|| echo -n "WARNING: ${count} ${d} processes were found running ... "
|
||||||
|
for n in ${notinpidfile}
|
||||||
|
do
|
||||||
|
echo -n "WARNING: process ${n} was not in pid file ... "
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
count=0
|
||||||
|
survivors=$(pidof ${d})
|
||||||
|
while [ -n "${survivors}" ]
|
||||||
|
do
|
||||||
|
sleep 1
|
||||||
|
count=$((${count}+1))
|
||||||
|
survivors=$(pidof ${d})
|
||||||
|
[ -z "${survivors}" -o ${count} -gt 5 ] && break
|
||||||
|
for p in ${survivors}
|
||||||
|
do
|
||||||
|
sleep 1
|
||||||
|
echo -n "${p} "
|
||||||
|
kill ${p}
|
||||||
|
done
|
||||||
|
done
|
||||||
|
survivors=$(pidof ${d})
|
||||||
|
[ -n "${survivors}" ] && \
|
||||||
|
if kill -KILL ${survivors}
|
||||||
|
then
|
||||||
|
echo -n "KILLed ${survivors} ... "
|
||||||
|
else
|
||||||
|
echo -n "failed to KILL ${survivors} ... "
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
survivors=$(pidof ${d})
|
||||||
|
if [ -z "${survivors}" ]
|
||||||
|
then
|
||||||
|
echo -n "done."
|
||||||
|
if [ -f "${pidfile}" ]
|
||||||
|
then
|
||||||
|
rm -f ${pidfile} \
|
||||||
|
|| echo -n " Failed to remove pidfile."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n "failed to stop ${survivors} - giving up."
|
||||||
|
if [ "${survivors}" != "${file_pid}" ]
|
||||||
|
then
|
||||||
|
if echo "${survivors}" > ${pidfile}
|
||||||
|
then
|
||||||
|
chown quagga:quagga ${pidfile}
|
||||||
|
echo -n " Wrote ${survivors} to pidfile."
|
||||||
|
else
|
||||||
|
echo -n " Failed to write ${survivors} to pidfile."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
|
||||||
|
# start daemons
|
||||||
|
|
||||||
|
if [ -n "$START_DAEMONS" ]
|
||||||
|
then
|
||||||
|
[ -d ${CONFDIR} ] \
|
||||||
|
|| quit "${ME}: no config directory ${CONFDIR} - exiting."
|
||||||
|
chown -R quagga:quagga ${CONFDIR}
|
||||||
|
[ -d ${STATEDIR} ] || mkdir -p ${STATEDIR} \
|
||||||
|
|| die "${ME}: could not create state directory ${STATEDIR} - exiting."
|
||||||
|
chown -R quagga:quagga ${STATEDIR}
|
||||||
|
|
||||||
|
for d in $START_DAEMONS
|
||||||
|
do
|
||||||
|
echo -n "${ME}: Starting ${d} ... "
|
||||||
|
proc_pid=$(pidof ${d})
|
||||||
|
pidfile=${STATEDIR}/${d}.pid
|
||||||
|
file_pid=
|
||||||
|
if [ -f "${pidfile}" ]
|
||||||
|
then
|
||||||
|
file_pid=$(cat ${pidfile})
|
||||||
|
if [ -n "${file_pid}" ]
|
||||||
|
then
|
||||||
|
echo -n "found old pid file entry ${file_pid} ... "
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -n "${proc_pid}" ]
|
||||||
|
then
|
||||||
|
echo -n "found ${d} running (${proc_pid}) - skipping ${d}."
|
||||||
|
if [ "${proc_pid}" != "${file_pid}" ]
|
||||||
|
then
|
||||||
|
if echo "${proc_pid}" > ${pidfile}
|
||||||
|
then
|
||||||
|
chown quagga:quagga ${pidfile}
|
||||||
|
echo -n " Wrote ${proc_pid} to pidfile."
|
||||||
|
else
|
||||||
|
echo -n " Failed to write ${proc_pid} to pidfile."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif rm -f "${pidfile}"
|
||||||
|
then
|
||||||
|
if [ "${d}" = "watchquagga" ]
|
||||||
|
then
|
||||||
|
$("${BINDIR}/${d}" \
|
||||||
|
${WATCHQUAGGA_FLAGS} \
|
||||||
|
"${WATCHQUAGGA_CMD}" \
|
||||||
|
${WATCHQUAGGA_DAEMONS})
|
||||||
|
status=$?
|
||||||
|
else
|
||||||
|
$("${BINDIR}/${d}" ${DAEMON_FLAGS})
|
||||||
|
status=$?
|
||||||
|
fi
|
||||||
|
if [ $status -eq 0 ]
|
||||||
|
then
|
||||||
|
echo -n "done."
|
||||||
|
else
|
||||||
|
echo -n "failed."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n " failed to remove pidfile."
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
fi
|
@ -1,333 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh /etc/rc.common
|
||||||
#
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
# quagga Starts/stops quagga daemons and watchquagga.
|
|
||||||
# Create a daemon.conf file to have that routing daemon
|
|
||||||
# started/stopped automagically when using this script
|
|
||||||
# without any daemon names as args.
|
|
||||||
# If watchquagga is available, it will also be
|
|
||||||
# started/stopped if the script is called without
|
|
||||||
# any daemon names.
|
|
||||||
#
|
|
||||||
|
|
||||||
ME=$(basename $0)
|
START=60
|
||||||
|
start() {
|
||||||
usage() {
|
/usr/sbin/quagga.init start
|
||||||
echo "Usage: ${ME} {start|stop|restart} [daemon ...]"
|
|
||||||
exit 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]
|
stop() {
|
||||||
then
|
/usr/sbin/quagga.init stop
|
||||||
usage
|
|
||||||
else
|
|
||||||
COMMAND=$1
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
ARG_DAEMONS=$*
|
|
||||||
BINDIR=/usr/sbin
|
|
||||||
CONFDIR=/etc/quagga
|
|
||||||
STATEDIR=/var/run/quagga
|
|
||||||
DAEMONS="zebra ripd ripngd ospfd ospf6d bgpd"
|
|
||||||
DAEMON_FLAGS=-d
|
|
||||||
WATCHQUAGGA_FLAGS="-d -z -T 60 -R"
|
|
||||||
WATCHQUAGGA_CMD="$0 watchrestart"
|
|
||||||
if [ ${COMMAND} != "watchrestart" ]
|
|
||||||
then
|
|
||||||
DAEMONS="${DAEMONS} watchquagga"
|
|
||||||
fi
|
|
||||||
DAEMONS_STARTSEQ=${DAEMONS}
|
|
||||||
|
|
||||||
reverse()
|
|
||||||
{
|
|
||||||
local revlist r
|
|
||||||
revlist=
|
|
||||||
for r
|
|
||||||
do
|
|
||||||
revlist="$r $revlist"
|
|
||||||
done
|
|
||||||
echo $revlist
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DAEMONS_STOPSEQ=$(reverse ${DAEMONS_STARTSEQ})
|
|
||||||
|
|
||||||
#pidof() {
|
|
||||||
# ps ax | awk 'match($5, "(^|/)'"$1"'$") > 0 { printf " %s", $1 }'
|
|
||||||
#}
|
|
||||||
|
|
||||||
quit() {
|
|
||||||
echo "${ME}: $1"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
die() {
|
|
||||||
echo "${ME}: $1"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
is_in() {
|
|
||||||
local i
|
|
||||||
for i in $2
|
|
||||||
do
|
|
||||||
[ "$1" = "$i" ] && return 0
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
select_subset() {
|
|
||||||
local unknown i j
|
|
||||||
unknown=
|
|
||||||
RESULT=
|
|
||||||
for i in $1
|
|
||||||
do
|
|
||||||
is_in $i "$2" || unknown="$unknown $i"
|
|
||||||
done
|
|
||||||
if [ -n "$unknown" ]
|
|
||||||
then
|
|
||||||
RESULT=$unknown
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
for j in $2
|
|
||||||
do
|
|
||||||
is_in $j "$1" && RESULT="$RESULT $j"
|
|
||||||
done
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# check command
|
|
||||||
|
|
||||||
case ${COMMAND}
|
|
||||||
in
|
|
||||||
start|stop|restart)
|
|
||||||
;;
|
|
||||||
watchrestart)
|
|
||||||
if [ -n "$ARG_DAEMONS" ]
|
|
||||||
then
|
|
||||||
echo "${ME}: watchrestart mode is only for use by watchquagga"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# select daemons to start
|
|
||||||
|
|
||||||
case ${COMMAND}
|
|
||||||
in
|
|
||||||
start|restart|watchrestart)
|
|
||||||
START_DAEMONS=
|
|
||||||
for d in ${DAEMONS_STARTSEQ}
|
|
||||||
do
|
|
||||||
[ -x "${BINDIR}/${d}" -a -f "${CONFDIR}/${d}.conf" ] \
|
|
||||||
&& START_DAEMONS="${START_DAEMONS}${d} "
|
|
||||||
done
|
|
||||||
WATCHQUAGGA_DAEMONS=${START_DAEMONS}
|
|
||||||
if is_in watchquagga "${DAEMONS_STARTSEQ}"
|
|
||||||
then
|
|
||||||
START_DAEMONS="${START_DAEMONS} watchquagga"
|
|
||||||
fi
|
|
||||||
if [ -n "${ARG_DAEMONS}" ]
|
|
||||||
then
|
|
||||||
if select_subset "${ARG_DAEMONS}" "${DAEMONS}"
|
|
||||||
then
|
|
||||||
if select_subset "${ARG_DAEMONS}" "${START_DAEMONS}"
|
|
||||||
then
|
|
||||||
START_DAEMONS=${RESULT}
|
|
||||||
else
|
|
||||||
die "these daemons are not startable:${RESULT}."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
die "unknown daemons:${RESULT}; choose from: ${DAEMONS}."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# select daemons to stop
|
|
||||||
|
|
||||||
case ${COMMAND}
|
|
||||||
in
|
|
||||||
stop|restart|watchrestart)
|
|
||||||
STOP_DAEMONS=${DAEMONS_STOPSEQ}
|
|
||||||
if [ -n "${ARG_DAEMONS}" ]
|
|
||||||
then
|
|
||||||
if select_subset "${ARG_DAEMONS}" "${STOP_DAEMONS}"
|
|
||||||
then
|
|
||||||
STOP_DAEMONS=${RESULT}
|
|
||||||
else
|
|
||||||
die "unknown daemons:${RESULT}; choose from: ${DAEMONS}."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
stop_daemons=
|
|
||||||
for d in ${STOP_DAEMONS}
|
|
||||||
do
|
|
||||||
pidfile=${STATEDIR}/${d}.pid
|
|
||||||
if [ -f "${pidfile}" -o -n "$(pidof ${d})" ]
|
|
||||||
then
|
|
||||||
stop_daemons="${stop_daemons}${d} "
|
|
||||||
elif [ -n "${ARG_DAEMONS}" ]
|
|
||||||
then
|
|
||||||
echo "${ME}: found no ${d} process running."
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
STOP_DAEMONS=${stop_daemons}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# stop daemons
|
|
||||||
|
|
||||||
for d in $STOP_DAEMONS
|
|
||||||
do
|
|
||||||
echo -n "${ME}: Stopping ${d} ... "
|
|
||||||
pidfile=${STATEDIR}/${d}.pid
|
|
||||||
if [ -f "${pidfile}" ]
|
|
||||||
then
|
|
||||||
file_pid=$(cat ${pidfile})
|
|
||||||
if [ -z "${file_pid}" ]
|
|
||||||
then
|
|
||||||
echo -n "no pid file entry found ... "
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
file_pid=
|
|
||||||
echo -n "no pid file found ... "
|
|
||||||
fi
|
|
||||||
proc_pid=$(pidof ${d})
|
|
||||||
if [ -z "${proc_pid}" ]
|
|
||||||
then
|
|
||||||
echo -n "found no ${d} process running ... "
|
|
||||||
else
|
|
||||||
count=0
|
|
||||||
notinpidfile=
|
|
||||||
for p in ${proc_pid}
|
|
||||||
do
|
|
||||||
count=$((${count}+1))
|
|
||||||
if kill ${p}
|
|
||||||
then
|
|
||||||
echo -n "killed ${p} ... "
|
|
||||||
else
|
|
||||||
echo -n "failed to kill ${p} ... "
|
|
||||||
fi
|
|
||||||
[ "${p}" = "${file_pid}" ] \
|
|
||||||
|| notinpidfile="${notinpidfile} ${p}"
|
|
||||||
done
|
|
||||||
[ ${count} -le 1 ] \
|
|
||||||
|| echo -n "WARNING: ${count} ${d} processes were found running ... "
|
|
||||||
for n in ${notinpidfile}
|
|
||||||
do
|
|
||||||
echo -n "WARNING: process ${n} was not in pid file ... "
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
count=0
|
|
||||||
survivors=$(pidof ${d})
|
|
||||||
while [ -n "${survivors}" ]
|
|
||||||
do
|
|
||||||
sleep 1
|
|
||||||
count=$((${count}+1))
|
|
||||||
survivors=$(pidof ${d})
|
|
||||||
[ -z "${survivors}" -o ${count} -gt 5 ] && break
|
|
||||||
for p in ${survivors}
|
|
||||||
do
|
|
||||||
sleep 1
|
|
||||||
echo -n "${p} "
|
|
||||||
kill ${p}
|
|
||||||
done
|
|
||||||
done
|
|
||||||
survivors=$(pidof ${d})
|
|
||||||
[ -n "${survivors}" ] && \
|
|
||||||
if kill -KILL ${survivors}
|
|
||||||
then
|
|
||||||
echo -n "KILLed ${survivors} ... "
|
|
||||||
else
|
|
||||||
echo -n "failed to KILL ${survivors} ... "
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
survivors=$(pidof ${d})
|
|
||||||
if [ -z "${survivors}" ]
|
|
||||||
then
|
|
||||||
echo -n "done."
|
|
||||||
if [ -f "${pidfile}" ]
|
|
||||||
then
|
|
||||||
rm -f ${pidfile} \
|
|
||||||
|| echo -n " Failed to remove pidfile."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -n "failed to stop ${survivors} - giving up."
|
|
||||||
if [ "${survivors}" != "${file_pid}" ]
|
|
||||||
then
|
|
||||||
if echo "${survivors}" > ${pidfile}
|
|
||||||
then
|
|
||||||
chown quagga:quagga ${pidfile}
|
|
||||||
echo -n " Wrote ${survivors} to pidfile."
|
|
||||||
else
|
|
||||||
echo -n " Failed to write ${survivors} to pidfile."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
done
|
|
||||||
|
|
||||||
# start daemons
|
|
||||||
|
|
||||||
if [ -n "$START_DAEMONS" ]
|
|
||||||
then
|
|
||||||
[ -d ${CONFDIR} ] \
|
|
||||||
|| quit "${ME}: no config directory ${CONFDIR} - exiting."
|
|
||||||
chown -R quagga:quagga ${CONFDIR}
|
|
||||||
[ -d ${STATEDIR} ] || mkdir -p ${STATEDIR} \
|
|
||||||
|| die "${ME}: could not create state directory ${STATEDIR} - exiting."
|
|
||||||
chown -R quagga:quagga ${STATEDIR}
|
|
||||||
|
|
||||||
for d in $START_DAEMONS
|
|
||||||
do
|
|
||||||
echo -n "${ME}: Starting ${d} ... "
|
|
||||||
proc_pid=$(pidof ${d})
|
|
||||||
pidfile=${STATEDIR}/${d}.pid
|
|
||||||
file_pid=
|
|
||||||
if [ -f "${pidfile}" ]
|
|
||||||
then
|
|
||||||
file_pid=$(cat ${pidfile})
|
|
||||||
if [ -n "${file_pid}" ]
|
|
||||||
then
|
|
||||||
echo -n "found old pid file entry ${file_pid} ... "
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ -n "${proc_pid}" ]
|
|
||||||
then
|
|
||||||
echo -n "found ${d} running (${proc_pid}) - skipping ${d}."
|
|
||||||
if [ "${proc_pid}" != "${file_pid}" ]
|
|
||||||
then
|
|
||||||
if echo "${proc_pid}" > ${pidfile}
|
|
||||||
then
|
|
||||||
chown quagga:quagga ${pidfile}
|
|
||||||
echo -n " Wrote ${proc_pid} to pidfile."
|
|
||||||
else
|
|
||||||
echo -n " Failed to write ${proc_pid} to pidfile."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
elif rm -f "${pidfile}"
|
|
||||||
then
|
|
||||||
if [ "${d}" = "watchquagga" ]
|
|
||||||
then
|
|
||||||
$("${BINDIR}/${d}" \
|
|
||||||
${WATCHQUAGGA_FLAGS} \
|
|
||||||
"${WATCHQUAGGA_CMD}" \
|
|
||||||
${WATCHQUAGGA_DAEMONS})
|
|
||||||
status=$?
|
|
||||||
else
|
|
||||||
$("${BINDIR}/${d}" ${DAEMON_FLAGS})
|
|
||||||
status=$?
|
|
||||||
fi
|
|
||||||
if [ $status -eq 0 ]
|
|
||||||
then
|
|
||||||
echo -n "done."
|
|
||||||
else
|
|
||||||
echo -n "failed."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -n " failed to remove pidfile."
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
@ -21,8 +21,6 @@ PKG_CAT:=zcat
|
|||||||
|
|
||||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
|
||||||
PKG_INIT_PRIO=51
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/radvd
|
define Package/radvd
|
||||||
@ -81,7 +79,7 @@ define Package/radvd/install
|
|||||||
install -d -m0755 $(1)/etc
|
install -d -m0755 $(1)/etc
|
||||||
install -m0644 ./files/radvd.conf $(1)/etc/radvd.conf
|
install -m0644 ./files/radvd.conf $(1)/etc/radvd.conf
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/radvd.init $(1)/etc/init.d/S$(PKG_INIT_PRIO)radvd
|
install -m0755 ./files/radvd.init $(1)/etc/init.d/radvd
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
install -m 755 $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/
|
install -m 755 $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/
|
||||||
install -m 755 $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/
|
install -m 755 $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/
|
||||||
|
@ -20,8 +20,6 @@ PKG_CAT:=zcat
|
|||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
|
||||||
PKG_INIT_PRIO:=50
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/rarpd
|
define Package/rarpd
|
||||||
@ -60,7 +58,6 @@ define Package/rarpd/install
|
|||||||
install -m644 ./files/rarpd.default $(1)/etc/default/rarpd
|
install -m644 ./files/rarpd.default $(1)/etc/default/rarpd
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m755 ./files/rarpd.init $(1)/etc/init.d/rarpd
|
install -m755 ./files/rarpd.init $(1)/etc/init.d/rarpd
|
||||||
ln -sf rarpd $(1)/etc/init.d/S$(PKG_INIT_PRIO)rarpd
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,rarpd))
|
$(eval $(call BuildPackage,rarpd))
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
RARPD=/usr/sbin/rarpd
|
RARPD=/usr/sbin/rarpd
|
||||||
DEFAULT=/etc/default/rarpd
|
DEFAULT=/etc/default/rarpd
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$RARPD $OPTIONS
|
$RARPD $OPTIONS
|
||||||
}
|
}
|
||||||
stop() {
|
stop() {
|
||||||
|
@ -42,7 +42,6 @@ endef
|
|||||||
define Package/reaim/install
|
define Package/reaim/install
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/reaim.init $(1)/etc/init.d/reaim
|
install -m0755 ./files/reaim.init $(1)/etc/init.d/reaim
|
||||||
ln -sf reaim $(1)/etc/init.d/S63reaim
|
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/reaim $(1)/usr/sbin/
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/reaim $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
NAME=reaim
|
NAME=reaim
|
||||||
DESC="Transparent proxy for IM behind NAT"
|
DESC="Transparent proxy for IM behind NAT"
|
||||||
IPT=/usr/sbin/iptables
|
IPT=/usr/sbin/iptables
|
||||||
|
|
||||||
include /lib/network
|
|
||||||
scan_interfaces
|
|
||||||
config_get WAN wan ifname
|
|
||||||
|
|
||||||
set_rules() {
|
set_rules() {
|
||||||
|
include /lib/network
|
||||||
|
scan_interfaces
|
||||||
|
config_get WAN wan ifname
|
||||||
|
|
||||||
[ -z "$WAN" ] && exit
|
[ -z "$WAN" ] && exit
|
||||||
$IPT $1 input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT
|
$IPT $1 input_rule -i $WAN -p tcp --dport 1863:1864 -j ACCEPT
|
||||||
$IPT $1 input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT
|
$IPT $1 input_rule -i $WAN -p tcp --dport 4443 -j ACCEPT
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
DEFAULT=/etc/default/rp-l2tpd
|
DEFAULT=/etc/default/rp-l2tpd
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
DEFAULT=/etc/default/pppoe-relay
|
DEFAULT=/etc/default/pppoe-relay
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
pppoe-relay $OPTIONS
|
pppoe-relay $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
DEFAULT=/etc/default/pppoe-server
|
DEFAULT=/etc/default/pppoe-server
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
pppoe-server $OPTIONS
|
pppoe-server $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ DEFAULT=/etc/default/samba
|
|||||||
RUN_D=/var/run/samba
|
RUN_D=/var/run/samba
|
||||||
NMBD_PID_F=$RUN_D/nmbd.pid
|
NMBD_PID_F=$RUN_D/nmbd.pid
|
||||||
SMBD_PID_F=$RUN_D/smbd.pid
|
SMBD_PID_F=$RUN_D/smbd.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
nmbd -D $NMBD_OPTIONS
|
nmbd -D $NMBD_OPTIONS
|
||||||
smbd -D $SMBD_OPTIONS
|
smbd -D $SMBD_OPTIONS
|
||||||
|
@ -60,7 +60,6 @@ define Package/scanlogd/install
|
|||||||
install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
|
install -m0755 $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/scanlogd.init $(1)/etc/init.d/scanlogd
|
install -m0755 ./files/scanlogd.init $(1)/etc/init.d/scanlogd
|
||||||
ln -sf scanlogd $(1)/etc/init.d/S$(PKG_INIT_PRIO)scanlogd
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,scanlogd))
|
$(eval $(call BuildPackage,scanlogd))
|
||||||
|
@ -5,9 +5,9 @@ BIN=siproxd
|
|||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ PKG_CAT:=zcat
|
|||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
PKG_INIT_LEVEL:=60
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
@ -42,10 +41,9 @@ endef
|
|||||||
define Package/srelay/install
|
define Package/srelay/install
|
||||||
install -m0755 -d $(1)/usr/bin
|
install -m0755 -d $(1)/usr/bin
|
||||||
install -m0755 -d $(1)/etc/init.d
|
install -m0755 -d $(1)/etc/init.d
|
||||||
$(CP) $(PKG_BUILD_DIR)/srelay $(1)/usr/bin/
|
install -m0755 $(PKG_BUILD_DIR)/srelay $(1)/usr/bin/
|
||||||
$(CP) files/srelay.init $(1)/etc/init.d/S$(PKG_INIT_LEVEL)srelay
|
install -m0755 files/srelay.init $(1)/etc/init.d/srelay
|
||||||
$(CP) files/srelay.conf $(1)/etc
|
install -m0644 files/srelay.conf $(1)/etc
|
||||||
chmod 755 $(1)/etc/init.d/S$(PKG_INIT_LEVEL)srelay
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,srelay))
|
$(eval $(call BuildPackage,srelay))
|
||||||
|
@ -5,11 +5,11 @@ BIN=tinyproxy
|
|||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
mkdir -p $RUN_D
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$BIN $OPTIONS
|
mkdir -p $RUN_D
|
||||||
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
@ -6,9 +6,9 @@ DEFAULT=/etc/default/$BIN
|
|||||||
LOG_D=/var/log/$BIN
|
LOG_D=/var/log/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $LOG_D
|
mkdir -p $LOG_D
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
|
@ -114,7 +114,6 @@ define Package/ulogd/install
|
|||||||
install -m0644 ./files/ulogd.default $(1)/etc/default/ulogd
|
install -m0644 ./files/ulogd.default $(1)/etc/default/ulogd
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/ulogd.init $(1)/etc/init.d/ulogd
|
install -m0755 ./files/ulogd.init $(1)/etc/init.d/ulogd
|
||||||
ln -sf ulogd $(1)/etc/init.d/S49ulogd
|
|
||||||
install -d -m0755 $(1)/usr/lib/ulogd
|
install -d -m0755 $(1)/usr/lib/ulogd
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_BASE.so $(1)/usr/lib/ulogd/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_BASE.so $(1)/usr/lib/ulogd/
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
BIN=ulogd
|
BIN=ulogd
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
LOG_D=/var/log
|
LOG_D=/var/log
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ define Package/updatedd
|
|||||||
TITLE:=A tool to update dynamic dns services
|
TITLE:=A tool to update dynamic dns services
|
||||||
DESCRIPTION:=Updatedd is a small tool that will update one of many dynamic\\\
|
DESCRIPTION:=Updatedd is a small tool that will update one of many dynamic\\\
|
||||||
dns services on boot.\\\
|
dns services on boot.\\\
|
||||||
Please look at the /etc/init.d/S55ddns script for more info.\\\
|
Please look at the /etc/init.d/ddns script for more info.\\\
|
||||||
URL:=http://www.philipp-benner.de/updatedd/
|
URL:=http://www.philipp-benner.de/updatedd/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ endef
|
|||||||
|
|
||||||
define Package/updatedd/install
|
define Package/updatedd/install
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/S55ddns $(1)/etc/init.d/
|
install -m0755 ./files/ddns.init $(1)/etc/init.d/ddns
|
||||||
install -d -m0755 $(1)/usr/bin
|
install -d -m0755 $(1)/usr/bin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/updatedd $(1)/usr/bin/
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/updatedd $(1)/usr/bin/
|
||||||
install -d -m0755 $(1)/usr/lib/updatedd
|
install -d -m0755 $(1)/usr/lib/updatedd
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
BIN=vrrpd
|
BIN=vrrpd
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN_${IF}_${ID}.pid
|
PID_F=$RUN_D/$BIN_${IF}_${ID}.pid
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ endef
|
|||||||
|
|
||||||
define Package/wifidog/install
|
define Package/wifidog/install
|
||||||
install -m0755 -d $(1)/etc/init.d
|
install -m0755 -d $(1)/etc/init.d
|
||||||
install -m0755 ./files/$(PKG_NAME).init $(1)/etc/init.d/S65wifidog
|
install -m0755 ./files/$(PKG_NAME).init $(1)/etc/init.d/wifidog
|
||||||
install -m0644 ./files/wifidog.conf $(1)/etc/
|
install -m0644 ./files/wifidog.conf $(1)/etc/
|
||||||
install -m0755 -d $(1)/usr/bin
|
install -m0755 -d $(1)/usr/bin
|
||||||
install -m0755 -d $(1)/usr/lib
|
install -m0755 -d $(1)/usr/lib
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
DEFAULT=/etc/default/xinetd
|
DEFAULT=/etc/default/xinetd
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/xinetd.pid
|
PID_F=$RUN_D/xinetd.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
xinetd $OPTIONS
|
xinetd $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,9 @@ BIN=mt-daapd
|
|||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
PID_F=$RUN_D/$BIN.pid
|
PID_F=$RUN_D/$BIN.pid
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
[ -d $RUN_D ] || mkdir -p $RUN_D
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
$BIN $OPTIONS
|
$BIN $OPTIONS
|
||||||
}
|
}
|
||||||
|
@ -30,25 +30,25 @@ define Package/collectd
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call Build/Configure/Default,--enable-shared \
|
$(call Build/Configure/Default,--enable-shared \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--disable-debug \
|
--disable-debug \
|
||||||
--enable-cpu \
|
--enable-cpu \
|
||||||
--enable-load \
|
--enable-load \
|
||||||
--enable-memory \
|
--enable-memory \
|
||||||
--enable-ping \
|
--enable-ping \
|
||||||
--enable-traffic \
|
--enable-traffic \
|
||||||
--disable-cpufreq \
|
--disable-cpufreq \
|
||||||
--disable-disk \
|
--disable-disk \
|
||||||
--disable-hddtemp \
|
--disable-hddtemp \
|
||||||
--disable-nfs \
|
--disable-nfs \
|
||||||
--disable-processes \
|
--disable-processes \
|
||||||
--disable-sensors \
|
--disable-sensors \
|
||||||
--disable-serial \
|
--disable-serial \
|
||||||
--disable-swap \
|
--disable-swap \
|
||||||
--disable-tape \
|
--disable-tape \
|
||||||
--disable-users \
|
--disable-users \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
@ -65,7 +65,7 @@ define Package/collectd/install
|
|||||||
install -d -m0755 $(1)/usr/lib/collectd
|
install -d -m0755 $(1)/usr/lib/collectd
|
||||||
install -d -m0755 $(1)/var/lib/collectd
|
install -d -m0755 $(1)/var/lib/collectd
|
||||||
install -d -m0755 $(1)/var/run
|
install -d -m0755 $(1)/var/run
|
||||||
install -m0755 ./files/S80collectd $(1)/etc/init.d/
|
install -m0755 ./files/collectd.init $(1)/etc/init.d/collectd
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(1)/usr/lib/collectd/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(1)/usr/lib/collectd/
|
||||||
endef
|
endef
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=80
|
||||||
BINARY="/usr/sbin/collectd"
|
BINARY="/usr/sbin/collectd"
|
||||||
PIDFILE="/var/run/collectd.pid"
|
PIDFILE="/var/run/collectd.pid"
|
||||||
DATADIR="/var/lib/collectd"
|
DATADIR="/var/lib/collectd"
|
@ -93,7 +93,7 @@ define Package/rrdcollect-example/install
|
|||||||
install -m0644 ./files/rrd.conf $(1)/etc/
|
install -m0644 ./files/rrd.conf $(1)/etc/
|
||||||
install -m0644 ./files/rrdcollect.conf $(1)/etc/
|
install -m0644 ./files/rrdcollect.conf $(1)/etc/
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/rrdcollect.init $(1)/etc/init.d/S98rrdcollect
|
install -m0755 ./files/rrdcollect.init $(1)/etc/init.d/rrdcollect
|
||||||
install -d -m0755 $(1)/usr/bin
|
install -d -m0755 $(1)/usr/bin
|
||||||
install -m0755 ./files/rrd.sh $(1)/usr/bin/
|
install -m0755 ./files/rrd.sh $(1)/usr/bin/
|
||||||
install -d -m0755 $(1)/www/cgi-bin
|
install -d -m0755 $(1)/www/cgi-bin
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=98
|
||||||
BIN=rrdcollect
|
BIN=rrdcollect
|
||||||
DEFAULT=/etc/default/$BIN
|
DEFAULT=/etc/default/$BIN
|
||||||
RUN_D=/var/run
|
RUN_D=/var/run
|
||||||
@ -9,10 +10,10 @@ LIB_D=/var/lib/rrdcollect
|
|||||||
CGI_S=$LIB_D/rrd.cgi
|
CGI_S=$LIB_D/rrd.cgi
|
||||||
IMG_D=$LIB_D/img
|
IMG_D=$LIB_D/img
|
||||||
RRD_D=$LIB_D/rrd
|
RRD_D=$LIB_D/rrd
|
||||||
RRD_F=$(find $RRD_D -name "*.rrd" 2>/dev/null)
|
|
||||||
[ -f $DEFAULT ] && . $DEFAULT
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
RRD_F=$(find $RRD_D -name "*.rrd" 2>/dev/null)
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
mkdir -p $RUN_D
|
mkdir -p $RUN_D
|
||||||
mkdir -p $IMG_D
|
mkdir -p $IMG_D
|
||||||
mkdir -p $RRD_D
|
mkdir -p $RRD_D
|
||||||
|
@ -18,8 +18,6 @@ PKG_SOURCE_URL:=@SF/setserial
|
|||||||
PKG_MD5SUM:=c4867d72c41564318e0107745eb7a0f2
|
PKG_MD5SUM:=c4867d72c41564318e0107745eb7a0f2
|
||||||
PKG_CAT:=zcat
|
PKG_CAT:=zcat
|
||||||
|
|
||||||
PKG_INIT_PRIO=15
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/setserial
|
define Package/setserial
|
||||||
@ -69,7 +67,7 @@ endef
|
|||||||
define Package/setserial/install
|
define Package/setserial/install
|
||||||
install -d -m0755 $(1)/etc/init.d
|
install -d -m0755 $(1)/etc/init.d
|
||||||
install -m0755 ./files/serial.init $(1)/etc/init.d/setserial
|
install -m0755 ./files/serial.init $(1)/etc/init.d/setserial
|
||||||
ln -sf setserial $(1)/etc/init.d/S$(PKG_INIT_PRIO)setserial
|
ln -sf setserial $(1)/etc/init.d/setserial
|
||||||
install -d -m0755 $(1)/usr/sbin
|
install -d -m0755 $(1)/usr/sbin
|
||||||
install -m0755 $(PKG_BUILD_DIR)/setserial $(1)/usr/sbin/
|
install -m0755 $(PKG_BUILD_DIR)/setserial $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
start() {
|
START=15
|
||||||
|
boot() {
|
||||||
/usr/sbin/setserial /dev/tts/1 irq 3
|
/usr/sbin/setserial /dev/tts/1 irq 3
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user