Change httpd realm to match the hostname (#932)
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 7 Nov 2006 16:37:09 +0000 (16:37 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 7 Nov 2006 16:37:09 +0000 (16:37 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5464 3c298f89-4303-0410-b956-a3cf2f4a3e73

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() {