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 a05b10c09477131849f4495dcee917fa45a44969..e4f5f48e9cb966a7228ca4fc4fbd8a7be1c08e18 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() {