Change httpd realm to match the hostname (#932)
authorFlorian Fainelli <[email protected]>
Tue, 7 Nov 2006 16:37:09 +0000 (16:37 +0000)
committerFlorian Fainelli <[email protected]>
Tue, 7 Nov 2006 16:37:09 +0000 (16:37 +0000)
SVN-Revision: 5464

openwrt/package/base-files/default/etc/init.d/S50httpd

index 1217aabe705299faa0ddb863cbb22d5c0a8a64a9..1bbf8a6a2ab58faecff1079413dbec92e7b168cc 100755 (executable)
@@ -1,2 +1,5 @@
 #!/bin/sh
-httpd -p 80 -h /www -r OpenWrt
+. /etc/functions.sh
+REALM=$(nvram get wan_hostname)
+REALM=${REALM%%.*}
+httpd -p 80 -h /www -r ${REALM:-OpenWrt}