Changeset 24257


Ignore:
Timestamp:
2010-12-05T02:53:23+01:00 (7 years ago)
Author:
jow
Message:

[packages] olsrd: add support for InterfaceDefaults section

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/olsrd/files/olsrd.init

    r22918 r24257  
    44START=65 
    55 
    6 OLSRD_OLSRD_SCHEMA='ignore:internal config_file:internal DebugLevel=0' 
     6OLSRD_OLSRD_SCHEMA='ignore:internal config_file:internal DebugLevel=0 AllowNoInt=yes' 
    77OLSRD_IPCCONNECT_SCHEMA='ignore:internal Host:list Net:list2' 
    88OLSRD_LOADPLUGIN_SCHEMA='ignore:internal library:internal Host4:list Net4:list2 Host:list Net:list2 Host6:list Net6:list2 Ping:list redistribute:list NonOlsrIf:list name:list lat lon latlon_infile HNA:list2 hosts:list2' 
    99OLSRD_INTERFACE_SCHEMA='ignore:internal interface:internal AutoDetectChanges:bool' 
     10OLSRD_INTERFACE_DEFAULTS_SCHEMA='AutoDetectChanges:bool' 
    1011 
    1112T='     ' 
     
    128129 
    129130        if [ "$value" != "${value%%[G-Zg-z_-]*}" ]; then 
    130                 if [ "$option" != "Ip6AddrType" -a "$value" != "yes" -a "$value" != "no" ]; then 
     131                if [ "$option" != "Ip6AddrType" -a "$option" != "LinkQualityMult" -a "$value" != "yes" -a "$value" != "no" ]; then 
    131132                        value="\"$value\"" 
    132133                fi 
     
    503504} 
    504505 
     506olsrd_write_interface_defaults() { 
     507        local cfg="$1" 
     508        validate_varname "$cfg" || return 0 
     509 
     510        echo -n "${N}InterfaceDefaults$ifnames${N}{" 
     511        config_write_options "$OLSRD_INTERFACE_DEFAULTS_SCHEMA" "$cfg" olsrd_write_option "${T}" 
     512        echo "${N}}" 
     513 
     514        return 1 
     515} 
     516 
    505517olsrd_update_schema() { 
    506518        local command="$1" 
     
    519531                LoadPlugin) config_update_schema OLSRD_LOADPLUGIN_SCHEMA "$command" "$varname" "$value";; 
    520532                Interface) config_update_schema OLSRD_INTERFACE_SCHEMA "$command" "$varname" "$value";; 
     533                InterfaceDefaults) config_update_schema OLSRD_INTERFACE_DEFAULTS_SCHEMA "$command" "$varname" "$value";; 
    521534        esac 
    522535 
     
    538551        config_foreach olsrd_write_loadplugin LoadPlugin 
    539552        INTERFACES_COUNT=0 
     553        config_foreach olsrd_write_interface_defaults InterfaceDefaults 
    540554        config_foreach olsrd_write_interface Interface 
    541555        echo 
     
    582596                sysctl -w net.ipv6.bindv6only=1 
    583597                sed -e 's/^\t\t[0-9.]*[ ][0-9.]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv6 
     598                sed -i '/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/d' /var/etc/olsrd.conf.ipv6 
    584599                olsrd -f /var/etc/olsrd.conf.ipv6 -nofork < /dev/null > /dev/null & 
    585600 
Note: See TracChangeset for help on using the changeset viewer.