Change httpd realm to match the hostname (#932)
authorFlorian Fainelli <florian@openwrt.org>
Tue, 7 Nov 2006 16:37:09 +0000 (16:37 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 7 Nov 2006 16:37:09 +0000 (16:37 +0000)
SVN-Revision: 5464

package/base-files/default/etc/init.d/httpd

index a05b10c..e4f5f48 100755 (executable)
@@ -2,7 +2,10 @@
 # Copyright (C) 2006 OpenWrt.org
 
 start() {
-       [ -d /www ] && httpd -p 80 -h /www -r OpenWrt
+       include /lib/network
+       scan_interfaces
+        config_get ifname wan hostname
+       [ -d /www ] && httpd -p 80 -h /www -r ${hostname:-OpenWrt}
 }
 
 stop() {