Browse Source

fix startup scripts, when variable is not set in /etc/rc.conf

Waldemar Brodkorb 14 years ago
parent
commit
f2463372c9
66 changed files with 35 additions and 86 deletions
  1. 17 17
      package/avahi/files/avahi-daemon.init
  2. 2 2
      package/axtls/files/axhttpd.init
  3. 1 1
      package/bkeymaps/files/kbd.init
  4. 1 1
      package/busybox/files/syslog.init
  5. 1 1
      package/busybox/files/udhcpd.init
  6. 1 1
      package/busybox/files/watchdog.init
  7. 1 0
      package/dhcp/files/dhcp-server.postinst
  8. 1 1
      package/dhcp/files/dhcpd.init
  9. 1 1
      package/dnsmasq/files/dnsmasq.init
  10. 1 0
      package/mini_httpd/files/mini-httpd.postinst
  11. 1 1
      package/mini_httpd/files/mini_httpd.init
  12. 1 1
      package/mt-daapd/files/mt-daapd.init
  13. 1 2
      package/net-snmp/files/snmpd.init
  14. 0 1
      package/netperf/files/netserver.init
  15. 0 1
      package/nfs-utils/files/nfs.init
  16. 0 1
      package/nfs-utils/files/nfsd.init
  17. 0 1
      package/nut/files/upsd.init
  18. 0 1
      package/olsrd/files/olsrd.init
  19. 0 1
      package/openct/files/openct.init
  20. 1 2
      package/openldap/files/slapd.init
  21. 0 1
      package/openntpd/files/ntpd.init
  22. 0 1
      package/opensips/files/opensips.init
  23. 1 2
      package/openssh/files/sshd.init
  24. 0 1
      package/openswan/files/openswan.init
  25. 0 1
      package/openvpn/files/openvpn.init
  26. 0 1
      package/osiris/files/osirisd.init
  27. 0 1
      package/p910nd/files/p910nd.init
  28. 0 1
      package/parprouted/files/parprouted.init
  29. 0 1
      package/pcsc-lite/files/pcscd.init
  30. 0 1
      package/pdnsd/files/pdnsd.init
  31. 0 1
      package/php/files/php.init
  32. 0 1
      package/pmacct/files/nfacctd.init
  33. 0 1
      package/pmacct/files/pmacctd.init
  34. 0 1
      package/portmap/files/portmap.init
  35. 0 1
      package/pptpd/files/pptpd.init
  36. 1 1
      package/privoxy/files/privoxy.init
  37. 0 1
      package/proftpd/files/proftpd.init
  38. 0 1
      package/radvd/files/radvd.init
  39. 0 1
      package/rarpd/files/rarpd.init
  40. 1 2
      package/rdate/files/rdate.init
  41. 0 1
      package/reaim/files/reaim.init
  42. 0 1
      package/rng-tools/files/rngd.init
  43. 0 1
      package/rp-pppoe/files/pppoe-client.init
  44. 0 1
      package/rp-pppoe/files/pppoe-relay.init
  45. 0 1
      package/rp-pppoe/files/pppoe-server.init
  46. 0 1
      package/rpcbind/files/rpcbind.init
  47. 0 1
      package/rrdcollect/files/rrdcollect.init
  48. 0 1
      package/samba/files/samba.init
  49. 0 1
      package/scanlogd/files/scanlogd.init
  50. 0 1
      package/shorewall-common/files/shorewall.init
  51. 0 1
      package/siproxd/files/siproxd.init
  52. 0 1
      package/snort/files/snort.init
  53. 0 1
      package/squid/files/squid.init
  54. 0 1
      package/srelay/files/srelay.init
  55. 0 1
      package/strongswan/files/strongswan.init
  56. 1 2
      package/subversion/files/svnserve.init
  57. 0 1
      package/syslog-ng/files/syslog-ng.init
  58. 0 1
      package/tinyproxy/files/tinyproxy.init
  59. 0 1
      package/tor/files/tor.init
  60. 0 1
      package/ulogd/files/ulogd.init
  61. 0 1
      package/uvd/files/uvd.init
  62. 0 1
      package/vrrpd/files/vrrpd.init
  63. 0 1
      package/vsftpd/files/vsftpd.init
  64. 0 1
      package/watchdog/files/watchdog.init
  65. 0 1
      package/wifidog/files/wifidog.init
  66. 0 1
      package/xinetd/files/xinetd.init

+ 17 - 17
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 $?

+ 2 - 2
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

+ 1 - 1
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)

+ 1 - 1
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)

+ 1 - 1
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)

+ 1 - 1
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)

+ 1 - 0
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

+ 1 - 1
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)

+ 1 - 1
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)

+ 1 - 0
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

+ 1 - 1
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)

+ 1 - 1
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)

+ 1 - 2
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)

+ 0 - 1
package/netperf/files/netserver.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG netperf
 #INIT 70
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/nfs-utils/files/nfs.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG nfs-utils
 #INIT 70
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/nfs-utils/files/nfsd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG nfs-utils
 #INIT 70
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/nut/files/upsd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG nut
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/olsrd/files/olsrd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG olsrd
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/openct/files/openct.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG openct
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 1 - 2
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)

+ 0 - 1
package/openntpd/files/ntpd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG openntpd
 #INIT 55
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/opensips/files/opensips.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG opensips
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 1 - 2
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

+ 0 - 1
package/openswan/files/openswan.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG openswan
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/openvpn/files/openvpn.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG openvpn
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/osiris/files/osirisd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG osirisd
 #INIT 75
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/p910nd/files/p910nd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG p910nd
 #INIT 70
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/parprouted/files/parprouted.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG parprouted
 #INIT 75
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/pcsc-lite/files/pcscd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG pcsc-lite
 #INIT 80
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/pdnsd/files/pdnsd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG pdnsd
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/php/files/php.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG php-fastcgi
 #INIT 80
-
 . /etc/rc.conf
 
 export PHP_FCGI_CHILDREN=''

+ 0 - 1
package/pmacct/files/nfacctd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG nfacctd
 #INIT 80
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/pmacct/files/pmacctd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG pmacctd
 #INIT 80
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/portmap/files/portmap.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG portmap
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/pptpd/files/pptpd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG pptpd
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 1 - 1
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)

+ 0 - 1
package/proftpd/files/proftpd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG proftpd
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/radvd/files/radvd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG radvd
 #INIT 51
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/rarpd/files/rarpd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG rarpd
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 1 - 2
package/rdate/files/rdate.init

@@ -1,12 +1,11 @@
 #!/bin/sh
 #PKG rdate
 #INIT 54
-
 . /etc/rc.conf
 
 case $1 in
 autostart|start|restart)
-	[[ $rdate_flags = NO ]] && exit 0
+	test x"${rdate:-NO}" = x"NO" && exit 0
 	rdate $rdate_flags
 	;;
 autostop|stop)

+ 0 - 1
package/reaim/files/reaim.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG reaim
 #INIT 75
-
 . /etc/rc.conf
 
 IPT=/usr/sbin/iptables

+ 0 - 1
package/rng-tools/files/rngd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG rng-tools
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/rp-pppoe/files/pppoe-client.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG pppoe-server
 #INIT 50
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/rp-pppoe/files/pppoe-relay.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG pppoe-relay
 #INIT 50
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/rp-pppoe/files/pppoe-server.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG pppoe-server
 #INIT 50
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/rpcbind/files/rpcbind.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG rpcbind
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/rrdcollect/files/rrdcollect.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG rrdcollect
 #INIT 90
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/samba/files/samba.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG samba
 #INIT 80
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/scanlogd/files/scanlogd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG scanlogd
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/shorewall-common/files/shorewall.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG shorewall-common
 #INIT 45
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/siproxd/files/siproxd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG siproxd
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/snort/files/snort.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG snort
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/squid/files/squid.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG squid
 #INIT 70
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/srelay/files/srelay.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG srelay
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/strongswan/files/strongswan.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG strongswan
 #INIT 60
-
 . /etc/rc.conf
 
 case $1 in

+ 1 - 2
package/subversion/files/svnserve.init

@@ -1,13 +1,12 @@
 #!/bin/sh
 #PKG subversion
 #INIT 80
-
 . /etc/rc.conf
 
 case $1 in
 autostop) ;;
 autostart)
-	[[ $svnserve = YES ]] || exit 0
+	test x"${svnserve:-NO}" = x"NO" && exit 0
 	exec sh $0 start
 	;;
 start)

+ 0 - 1
package/syslog-ng/files/syslog-ng.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG syslog-ng
 #INIT 05
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/tinyproxy/files/tinyproxy.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG tinyproxy
 #INIT 70
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/tor/files/tor.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG tor
 #INIT 80
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/ulogd/files/ulogd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG ulogd
 #INIT 49
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/uvd/files/uvd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG uvd
 #INIT 90
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/vrrpd/files/vrrpd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG vrrpd
 #INIT 70
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/vsftpd/files/vsftpd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG vsftpd
 #INIT 70
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/watchdog/files/watchdog.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG watchdog
 #INIT 15
-
 . /etc/rc.conf 
 
 case $1 in

+ 0 - 1
package/wifidog/files/wifidog.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG wifidog
 #INIT 65
-
 . /etc/rc.conf
 
 case $1 in

+ 0 - 1
package/xinetd/files/xinetd.init

@@ -1,7 +1,6 @@
 #!/bin/sh
 #PKG xinetd
 #INIT 50
-
 . /etc/rc.conf
 
 case $1 in