Browse Source

busybox: disable httpd applet

SVN-Revision: 20432
Jo-Philipp Wich 16 years ago
parent
commit
b3e4a6503a
2 changed files with 10 additions and 64 deletions
  1. 10 10
      package/busybox/config/networking/Config.in
  2. 0 54
      package/busybox/files/httpd

+ 10 - 10
package/busybox/config/networking/Config.in

@@ -144,13 +144,13 @@ config BUSYBOX_CONFIG_HOSTNAME
 
 
 config BUSYBOX_CONFIG_HTTPD
 config BUSYBOX_CONFIG_HTTPD
 	bool "httpd"
 	bool "httpd"
-	default y
+	default n
 	help
 	help
 	  Serve web pages via an HTTP server.
 	  Serve web pages via an HTTP server.
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES
 config BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES
 	bool "Support 'Ranges:' header"
 	bool "Support 'Ranges:' header"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_HTTPD
 	depends on BUSYBOX_CONFIG_HTTPD
 	help
 	help
 	  Makes httpd emit "Accept-Ranges: bytes" header and understand
 	  Makes httpd emit "Accept-Ranges: bytes" header and understand
@@ -177,7 +177,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH
 config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH
 	bool "Enable Basic http Authentication"
 	bool "Enable Basic http Authentication"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_HTTPD
 	depends on BUSYBOX_CONFIG_HTTPD
 	help
 	help
 	  Utilizes password settings from /etc/httpd.conf for basic
 	  Utilizes password settings from /etc/httpd.conf for basic
@@ -185,7 +185,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5
 config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5
 	bool "Support MD5 crypted passwords for http Authentication"
 	bool "Support MD5 crypted passwords for http Authentication"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH
 	depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH
 	help
 	help
 	  Enables basic per URL authentication from /etc/httpd.conf
 	  Enables basic per URL authentication from /etc/httpd.conf
@@ -193,7 +193,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI
 config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI
 	bool "Support Common Gateway Interface (CGI)"
 	bool "Support Common Gateway Interface (CGI)"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_HTTPD
 	depends on BUSYBOX_CONFIG_HTTPD
 	help
 	help
 	  This option allows scripts and executables to be invoked
 	  This option allows scripts and executables to be invoked
@@ -201,7 +201,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
 config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
 	bool "Support for running scripts through an interpreter"
 	bool "Support for running scripts through an interpreter"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI
 	depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI
 	help
 	help
 	  This option enables support for running scripts through an
 	  This option enables support for running scripts through an
@@ -212,7 +212,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
 config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
 	bool "Set REMOTE_PORT environment variable for CGI"
 	bool "Set REMOTE_PORT environment variable for CGI"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI
 	depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI
 	help
 	help
 	  Use of this option can assist scripts in generating
 	  Use of this option can assist scripts in generating
@@ -220,7 +220,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR
 config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR
 	bool "Enable -e option (useful for CGIs written as shell scripts)"
 	bool "Enable -e option (useful for CGIs written as shell scripts)"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_HTTPD
 	depends on BUSYBOX_CONFIG_HTTPD
 	help
 	help
 	  This option allows html encoding of arbitrary strings for display
 	  This option allows html encoding of arbitrary strings for display
@@ -230,7 +230,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES
 config BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES
 	bool "Support for custom error pages"
 	bool "Support for custom error pages"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_HTTPD
 	depends on BUSYBOX_CONFIG_HTTPD
 	help
 	help
 	  This option allows you to define custom error pages in
 	  This option allows you to define custom error pages in
@@ -243,7 +243,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES
 
 
 config BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY
 config BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY
 	bool "Support for reverse proxy"
 	bool "Support for reverse proxy"
-	default y
+	default n
 	depends on BUSYBOX_CONFIG_HTTPD
 	depends on BUSYBOX_CONFIG_HTTPD
 	help
 	help
 	  This option allows you to define URLs that will be forwarded
 	  This option allows you to define URLs that will be forwarded

+ 0 - 54
package/busybox/files/httpd

@@ -1,54 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
-
-START=50
-HTTPD_BIN="/usr/sbin/httpd"
-
-system_config() {
-	local cfg="$1"
-
-	config_get hostname "$cfg" hostname
-}
-
-httpd_config() {
-	local cfg="$1"
-	local c_file port realm home args
-
-	config_get c_file "$cfg" c_file
-	[ -n "$c_file" -a -f "$c_file" ] && append args "-c \"$c_file\""
-	config_get port "$cfg" port
-	append args "-p ${port:-80}"
-	config_get home "$cfg" home
-	home="${home:-/www}"
-	[ -d "$home" ] || return 1
-	append args "-h \"$home\""
-	config_get realm "$cfg" realm
-	realm="${realm:-$hostname}"
-	append args "-r \"$realm\""
-	eval "$HTTPD_BIN $args"
-}
-
-start() {
-	[ -x "$HTTPD_BIN" ] || return 1
-
-	unset hostname
-	config_load system
-	config_foreach system_config system
-	hostname="${hostname:-OpenWrt}"
-
-	unset args
-	config_load httpd
-	[ "$?" != "0" ] && {
-		uci_set_default httpd <<EOF
-config 'httpd'
-	option 'port' '80'
-	option 'home' '/www'
-EOF
-		config_load httpd
-	}
-	config_foreach httpd_config httpd
-}
-
-stop() {
-	killall httpd
-}