Revision 24a4aeb6 share/scripts/context-packages/base_deb/etc/one-context.d/00-network

View differences:

share/scripts/context-packages/base_deb/etc/one-context.d/00-network
103 103

  
104 104
gen_iface_conf() {
105 105
    cat <<EOT
106
auto $DEV
107 106
iface $DEV inet static
108 107
  address $IP
109 108
  network $NETWORK
......
117 116
    echo ""
118 117
}
119 118

  
119
gen_iface6_conf() {
120
    cat <<EOT
121
iface $DEV inet6 static
122
  address $IPV6
123
  netmask 64
124
EOT
125

  
126
    if [ -n "$GATEWAY6" ]; then
127
      echo "  gateway $GATEWAY6"
128
    fi
129

  
130
    echo ""
131
}
132

  
120 133
gen_network_configuration()
121 134
{
122 135
    cat <<EOT
......
137 150
        MASK=$(get_mask)
138 151
        GATEWAY=$(get_gateway)
139 152

  
140
        gen_iface_conf
153
        IPV6=$(get_iface_var "IPV6")
154
        GATEWAY6=$(get_iface_var "GATEWAY6")
155
        CONTEXT_FORCE_IPV4=$(get_iface_var "CONTEXT_FORCE_IPV4")
156

  
157
        echo "auto $DEV"
158

  
159
        [[ -z $IPV6 || -n $CONTEXT_FORCE_IPV4 ]] && gen_iface_conf
160
        [[ -n $IPV6 ]] && gen_iface6_conf
141 161

  
142 162
    done
143 163
}

Also available in: Unified diff