summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-03-01 21:19:11 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2011-03-01 21:19:11 +0100
commitf2463372c9e35cf640f1b0ccede0314a239b0d25 (patch)
treed0136965860008a32e72bfac7442bc35d694758c
parent72a7d18f2fa0330212333dd95c18f2278c021cee (diff)
fix startup scripts, when variable is not set in /etc/rc.conf
-rw-r--r--package/avahi/files/avahi-daemon.init34
-rw-r--r--package/axtls/files/axhttpd.init4
-rw-r--r--package/bkeymaps/files/kbd.init2
-rw-r--r--package/busybox/files/syslog.init2
-rw-r--r--package/busybox/files/udhcpd.init2
-rw-r--r--package/busybox/files/watchdog.init2
-rw-r--r--package/dhcp/files/dhcp-server.postinst1
-rw-r--r--package/dhcp/files/dhcpd.init2
-rw-r--r--package/dnsmasq/files/dnsmasq.init2
-rw-r--r--package/mini_httpd/files/mini-httpd.postinst1
-rw-r--r--package/mini_httpd/files/mini_httpd.init2
-rw-r--r--package/mt-daapd/files/mt-daapd.init2
-rw-r--r--package/net-snmp/files/snmpd.init3
-rw-r--r--package/netperf/files/netserver.init1
-rw-r--r--package/nfs-utils/files/nfs.init1
-rw-r--r--package/nfs-utils/files/nfsd.init1
-rw-r--r--package/nut/files/upsd.init1
-rw-r--r--package/olsrd/files/olsrd.init1
-rw-r--r--package/openct/files/openct.init1
-rw-r--r--package/openldap/files/slapd.init3
-rw-r--r--package/openntpd/files/ntpd.init1
-rw-r--r--package/opensips/files/opensips.init1
-rw-r--r--package/openssh/files/sshd.init3
-rw-r--r--package/openswan/files/openswan.init1
-rw-r--r--package/openvpn/files/openvpn.init1
-rw-r--r--package/osiris/files/osirisd.init1
-rw-r--r--package/p910nd/files/p910nd.init1
-rw-r--r--package/parprouted/files/parprouted.init1
-rw-r--r--package/pcsc-lite/files/pcscd.init1
-rw-r--r--package/pdnsd/files/pdnsd.init1
-rw-r--r--package/php/files/php.init1
-rw-r--r--package/pmacct/files/nfacctd.init1
-rw-r--r--package/pmacct/files/pmacctd.init1
-rw-r--r--package/portmap/files/portmap.init1
-rw-r--r--package/pptpd/files/pptpd.init1
-rw-r--r--package/privoxy/files/privoxy.init2
-rw-r--r--package/proftpd/files/proftpd.init1
-rw-r--r--package/radvd/files/radvd.init1
-rw-r--r--package/rarpd/files/rarpd.init1
-rw-r--r--package/rdate/files/rdate.init3
-rw-r--r--package/reaim/files/reaim.init1
-rw-r--r--package/rng-tools/files/rngd.init1
-rw-r--r--package/rp-pppoe/files/pppoe-client.init1
-rw-r--r--package/rp-pppoe/files/pppoe-relay.init1
-rw-r--r--package/rp-pppoe/files/pppoe-server.init1
-rw-r--r--package/rpcbind/files/rpcbind.init1
-rw-r--r--package/rrdcollect/files/rrdcollect.init1
-rw-r--r--package/samba/files/samba.init1
-rw-r--r--package/scanlogd/files/scanlogd.init1
-rw-r--r--package/shorewall-common/files/shorewall.init1
-rw-r--r--package/siproxd/files/siproxd.init1
-rw-r--r--package/snort/files/snort.init1
-rw-r--r--package/squid/files/squid.init1
-rw-r--r--package/srelay/files/srelay.init1
-rw-r--r--package/strongswan/files/strongswan.init1
-rw-r--r--package/subversion/files/svnserve.init3
-rw-r--r--package/syslog-ng/files/syslog-ng.init1
-rw-r--r--package/tinyproxy/files/tinyproxy.init1
-rw-r--r--package/tor/files/tor.init1
-rw-r--r--package/ulogd/files/ulogd.init1
-rw-r--r--package/uvd/files/uvd.init1
-rw-r--r--package/vrrpd/files/vrrpd.init1
-rw-r--r--package/vsftpd/files/vsftpd.init1
-rw-r--r--package/watchdog/files/watchdog.init1
-rw-r--r--package/wifidog/files/wifidog.init1
-rw-r--r--package/xinetd/files/xinetd.init1
66 files changed, 35 insertions, 86 deletions
diff --git a/package/avahi/files/avahi-daemon.init b/package/avahi/files/avahi-daemon.init
index 79170b840..660d713e9 100644
--- a/package/avahi/files/avahi-daemon.init
+++ b/package/avahi/files/avahi-daemon.init
@@ -5,22 +5,22 @@
case $1 in
autostop) ;;
- autostart)
- test x"${avahi:-NO}" = x"NO" && exit 0
- exec sh $0 start
- ;;
- start)
- avahi-daemon -D
- ;;
- stop)
- avahi-daemon -k
- ;;
- restart)
- sh $0 stop
- sh $0 start
- ;;
- *)
- echo "usage: $0 { start | stop | reload }"
- exit 1
+autostart)
+ test x"${avahi:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ avahi-daemon -D
+ ;;
+stop)
+ avahi-daemon -k
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 { start | stop | reload }"
+ exit 1
esac
exit $?
diff --git a/package/axtls/files/axhttpd.init b/package/axtls/files/axhttpd.init
index 5a1671db5..a7e25938a 100644
--- a/package/axtls/files/axhttpd.init
+++ b/package/axtls/files/axhttpd.init
@@ -10,8 +10,8 @@ autostart)
exec sh $0 start
;;
start)
- if [ ! -d /www -a ! -h /www ]; then
- echo "axhttpd not started. create /www first"
+ if [ ! -d /srv/www -a ! -h /srv/www ]; then
+ echo "axhttpd not started. create /srv/www first"
exit 0
fi
/usr/sbin/axhttpd >>/var/log/axhttpd.access
diff --git a/package/bkeymaps/files/kbd.init b/package/bkeymaps/files/kbd.init
index ec8bad244..4aec7dffe 100644
--- a/package/bkeymaps/files/kbd.init
+++ b/package/bkeymaps/files/kbd.init
@@ -6,7 +6,7 @@
case $1 in
autostop) ;;
autostart)
- [[ $kbd = NO ]] && exit 0
+ test x"${kbd:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/busybox/files/syslog.init b/package/busybox/files/syslog.init
index 5f348042a..7a84815a6 100644
--- a/package/busybox/files/syslog.init
+++ b/package/busybox/files/syslog.init
@@ -6,7 +6,7 @@
case $1 in
autostop) ;;
autostart)
- [[ $syslogd_flags = NO ]] && exit 0
+ test x"${syslogd_flags:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/busybox/files/udhcpd.init b/package/busybox/files/udhcpd.init
index 788b5043e..f626fb732 100644
--- a/package/busybox/files/udhcpd.init
+++ b/package/busybox/files/udhcpd.init
@@ -6,7 +6,7 @@
case $1 in
autostop) ;;
autostart)
- [[ $udhcpd = NO ]] && exit 0
+ test x"${udhcpd:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/busybox/files/watchdog.init b/package/busybox/files/watchdog.init
index 1f1724da5..8632cc36d 100644
--- a/package/busybox/files/watchdog.init
+++ b/package/busybox/files/watchdog.init
@@ -6,7 +6,7 @@
case $1 in
autostop) ;;
autostart)
- [[ $watchdog = NO ]] && exit 0
+ test x"${watchdog:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/dhcp/files/dhcp-server.postinst b/package/dhcp/files/dhcp-server.postinst
index 592120cdc..d27f5aa8d 100644
--- a/package/dhcp/files/dhcp-server.postinst
+++ b/package/dhcp/files/dhcp-server.postinst
@@ -1,3 +1,4 @@
#!/bin/sh
. $IPKG_INSTROOT/etc/functions.sh
add_rcconf 'e.g. "eth0.1 eth1"' dhcpd_flags
+add_rcconf dhcpd dhcpd NO
diff --git a/package/dhcp/files/dhcpd.init b/package/dhcp/files/dhcpd.init
index 02349acae..96b9e82c4 100644
--- a/package/dhcp/files/dhcpd.init
+++ b/package/dhcp/files/dhcpd.init
@@ -5,7 +5,7 @@
case $1 in
autostart)
- [[ $dhcpd_flags = NO ]] && exit 0
+ test x"${dhcpd:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 07c76f862..53f86d792 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -6,7 +6,7 @@
case $1 in
autostop) ;;
autostart)
- [[ $dnsmasq = NO ]] && exit 0
+ test x"${dnsmasq:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/mini_httpd/files/mini-httpd.postinst b/package/mini_httpd/files/mini-httpd.postinst
index dfcafaa9e..e1fc0ccca 100644
--- a/package/mini_httpd/files/mini-httpd.postinst
+++ b/package/mini_httpd/files/mini-httpd.postinst
@@ -1,3 +1,4 @@
#!/bin/sh
. $IPKG_INSTROOT/etc/functions.sh
add_rcconf '"NO" to disable, "-C /etc/mini_httpd.conf" otherwise' mini_httpd_flags
+add_rcconf mini_httpd mini_httpd NO
diff --git a/package/mini_httpd/files/mini_httpd.init b/package/mini_httpd/files/mini_httpd.init
index 5b7796e27..4737c4b35 100644
--- a/package/mini_httpd/files/mini_httpd.init
+++ b/package/mini_httpd/files/mini_httpd.init
@@ -7,7 +7,7 @@
case $1 in
autostop) ;;
autostart)
- [[ $mini_httpd_flags = NO ]] && exit 0
+ test x"${mini_httpd:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/mt-daapd/files/mt-daapd.init b/package/mt-daapd/files/mt-daapd.init
index 4ad5f2553..d150807a5 100644
--- a/package/mt-daapd/files/mt-daapd.init
+++ b/package/mt-daapd/files/mt-daapd.init
@@ -7,7 +7,7 @@
case $1 in
autostop) ;;
autostart)
- [[ $mt_daapd = NO ]] && exit 0
+ test x"${mt_daapd:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/net-snmp/files/snmpd.init b/package/net-snmp/files/snmpd.init
index f7e9b917b..5cb41c13b 100644
--- a/package/net-snmp/files/snmpd.init
+++ b/package/net-snmp/files/snmpd.init
@@ -1,13 +1,12 @@
#!/bin/sh
#PKG snmpd
#INIT 60
-
. /etc/rc.conf
case $1 in
autostop) ;;
autostart)
- [[ $snmpd = NO ]] && exit 0
+ test x"${snmpd:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/netperf/files/netserver.init b/package/netperf/files/netserver.init
index 67a9e36d6..e1717b5ba 100644
--- a/package/netperf/files/netserver.init
+++ b/package/netperf/files/netserver.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG netperf
#INIT 70
-
. /etc/rc.conf
case $1 in
diff --git a/package/nfs-utils/files/nfs.init b/package/nfs-utils/files/nfs.init
index 8944ef2e2..f3866a2de 100644
--- a/package/nfs-utils/files/nfs.init
+++ b/package/nfs-utils/files/nfs.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG nfs-utils
#INIT 70
-
. /etc/rc.conf
case $1 in
diff --git a/package/nfs-utils/files/nfsd.init b/package/nfs-utils/files/nfsd.init
index 4f0aaabe3..54390df1c 100644
--- a/package/nfs-utils/files/nfsd.init
+++ b/package/nfs-utils/files/nfsd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG nfs-utils
#INIT 70
-
. /etc/rc.conf
case $1 in
diff --git a/package/nut/files/upsd.init b/package/nut/files/upsd.init
index 8ca1fb996..159a2fc00 100644
--- a/package/nut/files/upsd.init
+++ b/package/nut/files/upsd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG nut
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/olsrd/files/olsrd.init b/package/olsrd/files/olsrd.init
index f74aa35d8..965e14d2b 100644
--- a/package/olsrd/files/olsrd.init
+++ b/package/olsrd/files/olsrd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG olsrd
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/openct/files/openct.init b/package/openct/files/openct.init
index 5f4b93c16..cf6691fa5 100644
--- a/package/openct/files/openct.init
+++ b/package/openct/files/openct.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG openct
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/openldap/files/slapd.init b/package/openldap/files/slapd.init
index 60f717927..f026bfef4 100644
--- a/package/openldap/files/slapd.init
+++ b/package/openldap/files/slapd.init
@@ -1,13 +1,12 @@
#!/bin/sh
#PKG openldap-slapd
#INIT 70
-
. /etc/rc.conf
case $1 in
autostop) ;;
autostart)
- [[ $slapd = NO ]] && exit 0
+ test x"${slapd:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/openntpd/files/ntpd.init b/package/openntpd/files/ntpd.init
index a11e9415e..149c5f0e4 100644
--- a/package/openntpd/files/ntpd.init
+++ b/package/openntpd/files/ntpd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG openntpd
#INIT 55
-
. /etc/rc.conf
case $1 in
diff --git a/package/opensips/files/opensips.init b/package/opensips/files/opensips.init
index b7d73f7d4..c0567b694 100644
--- a/package/opensips/files/opensips.init
+++ b/package/opensips/files/opensips.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG opensips
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/openssh/files/sshd.init b/package/openssh/files/sshd.init
index f678349a1..5953abef2 100644
--- a/package/openssh/files/sshd.init
+++ b/package/openssh/files/sshd.init
@@ -1,13 +1,12 @@
#!/bin/sh
#PKG openssh-server
#INIT 50
-
. /etc/rc.conf
case $1 in
autostop) ;;
autostart)
- [[ $openssh = NO ]] && exit 0
+ test x"${openssh:-NO}" = x"NO" && exit 0
grep "^dropbear" /etc/rc.conf >/dev/null 2>&1 || dropbear=NO
if [[ $openssh = AUTO && $dropbear != NO ]]; then
echo openssh not starting: set to AUTO and dropbear is enabled
diff --git a/package/openswan/files/openswan.init b/package/openswan/files/openswan.init
index fb43619d1..f1fd658e1 100644
--- a/package/openswan/files/openswan.init
+++ b/package/openswan/files/openswan.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG openswan
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/openvpn/files/openvpn.init b/package/openvpn/files/openvpn.init
index 9e7f11af4..abea61328 100644
--- a/package/openvpn/files/openvpn.init
+++ b/package/openvpn/files/openvpn.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG openvpn
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/osiris/files/osirisd.init b/package/osiris/files/osirisd.init
index d13aa494f..b412e7e73 100644
--- a/package/osiris/files/osirisd.init
+++ b/package/osiris/files/osirisd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG osirisd
#INIT 75
-
. /etc/rc.conf
case $1 in
diff --git a/package/p910nd/files/p910nd.init b/package/p910nd/files/p910nd.init
index c2884caee..d029edd96 100644
--- a/package/p910nd/files/p910nd.init
+++ b/package/p910nd/files/p910nd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG p910nd
#INIT 70
-
. /etc/rc.conf
case $1 in
diff --git a/package/parprouted/files/parprouted.init b/package/parprouted/files/parprouted.init
index 6f612177f..0c3885892 100644
--- a/package/parprouted/files/parprouted.init
+++ b/package/parprouted/files/parprouted.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG parprouted
#INIT 75
-
. /etc/rc.conf
case $1 in
diff --git a/package/pcsc-lite/files/pcscd.init b/package/pcsc-lite/files/pcscd.init
index c1724f495..c76efc695 100644
--- a/package/pcsc-lite/files/pcscd.init
+++ b/package/pcsc-lite/files/pcscd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG pcsc-lite
#INIT 80
-
. /etc/rc.conf
case $1 in
diff --git a/package/pdnsd/files/pdnsd.init b/package/pdnsd/files/pdnsd.init
index 717e4f352..d9fa793b9 100644
--- a/package/pdnsd/files/pdnsd.init
+++ b/package/pdnsd/files/pdnsd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG pdnsd
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/php/files/php.init b/package/php/files/php.init
index 04e40403d..238f67daf 100644
--- a/package/php/files/php.init
+++ b/package/php/files/php.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG php-fastcgi
#INIT 80
-
. /etc/rc.conf
export PHP_FCGI_CHILDREN=''
diff --git a/package/pmacct/files/nfacctd.init b/package/pmacct/files/nfacctd.init
index d46668780..5acd849b4 100644
--- a/package/pmacct/files/nfacctd.init
+++ b/package/pmacct/files/nfacctd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG nfacctd
#INIT 80
-
. /etc/rc.conf
case $1 in
diff --git a/package/pmacct/files/pmacctd.init b/package/pmacct/files/pmacctd.init
index 3b9ec5ac5..d56a01330 100644
--- a/package/pmacct/files/pmacctd.init
+++ b/package/pmacct/files/pmacctd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG pmacctd
#INIT 80
-
. /etc/rc.conf
case $1 in
diff --git a/package/portmap/files/portmap.init b/package/portmap/files/portmap.init
index a3dc4a8e6..36ce2aee0 100644
--- a/package/portmap/files/portmap.init
+++ b/package/portmap/files/portmap.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG portmap
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/pptpd/files/pptpd.init b/package/pptpd/files/pptpd.init
index c0f19546c..da15ab87a 100644
--- a/package/pptpd/files/pptpd.init
+++ b/package/pptpd/files/pptpd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG pptpd
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/privoxy/files/privoxy.init b/package/privoxy/files/privoxy.init
index 3f4bd6021..2254ee1c6 100644
--- a/package/privoxy/files/privoxy.init
+++ b/package/privoxy/files/privoxy.init
@@ -6,7 +6,7 @@
case $1 in
autostop) ;;
autostart)
- [[ $privoxy = NO ]] && exit 0
+ test x"${privoxy:-NO}" = x"NO" && exit 0
exec sh $0 start
;;
start)
diff --git a/package/proftpd/files/proftpd.init b/package/proftpd/files/proftpd.init
index 813f20730..8e605652d 100644
--- a/package/proftpd/files/proftpd.init
+++ b/package/proftpd/files/proftpd.init
@@ -1,7 +1,6 @@
#!/bin/sh
#PKG proftpd
#INIT 60
-
. /etc/rc.conf
case $1 in
diff --git a/package/radvd/files/radvd.init b/package/radvd/files/radvd.init
index e289a2b65..c3fd8b0ab 100644
--- a/package/radvd/files/radvd.init
+++ b/package/radvd/files/radvd.init