Changeset 7669240 in freewrt for package/webif


Ignore:
Timestamp:
Sep 23, 2006, 10:30:38 PM (19 years ago)
Author:
Waldemar Brodkorb <wbx@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
0543ddc
Parents:
a3f04e0
Message:
  • add a generic network init script which is using busybox ifup/ifdown
  • move ifup/ifdown with nvram calls to webif package
  • add specific dnsmasq.conf and startup script for dnsmasq for webif
  • add version file

This unbreaks DNS/DHCP options in Webif. Even WPA/WPA2 seems possible
if you install broadcom-nas package. I have no WPA/WPA2 enabled box
or operating system to test..

tg@ will add some rc.conf checks so that either webif network
configuration is used or ifup/ifdown from busybox

git-svn-id: svn://www.freewrt.org/trunk/freewrt@673 afb5a338-a214-0410-bd46-81f09a774fd1

Location:
package/webif
Files:
3 added
4 edited
3 moved

Legend:

Unmodified
Added
Removed
  • package/webif/Config.in

    ra3f04e0 r7669240  
    33        tristate
    44        select FWRT_PACKAGE_HASERL
     5        select FWRT_PACKAGE_BRIDGE_UTILS
     6        select FWRT_PACKAGE_IPTABLES
     7        select FWRT_PACKAGE_DNSMASQ
    58        default n
    69        help
    7           A web interface for configuring FreeWRT
     10          A web interface for configuring FreeWRT as wireless router.
    811
  • package/webif/Makefile

    ra3f04e0 r7669240  
    3030$(IPKG_WEBIF):
    3131        cd files; pax -rw www usr $(IDIR_WEBIF)/
    32         install -d $(IDIR_WEBIF)/usr/bin
    33         install -m0755 $(WRKBUILD)/webif-page $(IDIR_WEBIF)/usr/bin/webif-page
    34         install -m0755 $(WRKBUILD)/bstrip $(IDIR_WEBIF)/usr/bin/bstrip
     32        $(INSTALL_DIR) $(IDIR_WEBIF)/usr/bin
     33        $(INSTALL_DIR) $(IDIR_WEBIF)/sbin
     34        $(INSTALL_BIN) $(WRKBUILD)/webif-page $(IDIR_WEBIF)/usr/bin/webif-page
     35        $(INSTALL_BIN) $(WRKBUILD)/bstrip $(IDIR_WEBIF)/usr/bin/bstrip
     36        $(INSTALL_BIN) ./files/ifup $(IDIR_WEBIF)/sbin/ifup.nvram
     37        $(INSTALL_BIN) ./files/ifdown $(IDIR_WEBIF)/sbin/ifdown.nvram
    3538        ln -sf /www/index.html $(IDIR_WEBIF)/www/index.asp
    36         install -d $(IDIR_WEBIF)/etc/init.d
    37         install -m0755 ./files/httpd.init $(IDIR_WEBIF)/etc/init.d/S50httpd
     39        $(INSTALL_DIR) $(IDIR_WEBIF)/etc/init.d
     40        $(INSTALL_BIN) ./files/httpd.init $(IDIR_WEBIF)/etc/init.d/S50httpd-webif
     41        $(INSTALL_BIN) ./files/network.init $(IDIR_WEBIF)/etc/init.d/S40net-webif
     42        $(INSTALL_BIN) ./files/dnsmasq.init $(IDIR_WEBIF)/etc/init.d/S50dns-webif
     43        $(INSTALL_DATA) ./files/dnsmasq.conf $(IDIR_WEBIF)/etc/dnsmasq.conf-webif
     44        $(INSTALL_DATA) ./files/network-nvram.sh $(IDIR_WEBIF)/etc/
    3845        find $(IDIR_WEBIF) -name CVS -o -name .svn | xargs rm -rf
    3946        $(IPKG_BUILD) $(IDIR_WEBIF) $(PACKAGE_DIR)
  • package/webif/files/ifdown

    ra3f04e0 r7669240  
    11#!/bin/sh
    22[ $# = 0 ] && { echo "  $0 <group>"; exit; }
    3 . /etc/functions.sh
     3. /etc/network-nvram.sh
    44
    55type=$1
  • package/webif/files/ifup

    ra3f04e0 r7669240  
    11#!/bin/ash
    22[ $# = 0 ] && { echo "  $0 <group>"; exit; }
    3 . /etc/functions.sh
     3. /etc/network-nvram.sh
    44type=$1
    55debug "### ifup $type ###"
  • package/webif/files/network.init

    ra3f04e0 r7669240  
    55        ifup_interfaces=${ifup_interfaces:-"lan wan wifi"}
    66        for iface in $ifup_interfaces; do
    7                 ifup $iface
     7                ifup.nvram $iface
    88                [ "$iface" = wifi ] && wifi up
    99        done
  • package/webif/files/usr/lib/webif/apply.sh

    ra3f04e0 r7669240  
    2020        echo '@TR<<Reloading>> @TR<<networking settings>> ...'
    2121        egrep '^w?wan_' config-network >&- 2>&- && {
    22                 ifdown wan
    23                 ifup wan
     22                ifdown.nvram wan
     23                ifup.nvram wan
    2424                killall -HUP dnsmasq
    2525        }
    2626       
    2727        grep '^lan_' config-network >&- 2>&- && {
    28                 ifdown lan
    29                 ifup lan
     28                ifdown.nvram lan
     29                ifup.nvram lan
    3030                killall dnsmasq
    31                 /etc/init.d/S??dnsmasq
     31                /etc/init.d/S??dnsmasq-webif
    3232        }
    3333}
     
    3838        (
    3939                /sbin/wifi
    40                 [ -f /etc/init.d/S41wpa ] && /etc/init.d/S41wpa
     40                [ -f /etc/init.d/S49nas ] && /etc/init.d/S49nas
    4141        ) >&- 2>&- <&-
    4242}
  • package/webif/files/usr/lib/webif/webif.sh

    ra3f04e0 r7669240  
    6565        _uptime="${_uptime%%,*}"
    6666        _hostname=$(cat /proc/sys/kernel/hostname)
    67         _version=$( grep "(" /etc/banner )
    68         _version="${_version%% ---*}"
     67        _version=$(cat /etc/version)
    6968        _head="${3:+<div class=\"settings-block-title\"><h2>$3$_saved_title</h2></div>}"
    7069        _form="${5:+<form enctype=\"multipart/form-data\" action=\"$5\" method=\"post\"><input type=\"hidden\" name=\"submit\" value=\"1\" />}"
Note: See TracChangeset for help on using the changeset viewer.