On Thu, 2012-02-16 at 22:08 +0800, Weiping Pan wrote:
> Check "VLAN=yes" if "TYPE=Vlan" is missing.
> They have the same meaning.
> 
> This patch is based on NM/vlan branch,
> commit 703196fcdb96ad0d4bf8dac572235e65ba02e844 

Pushed, thanks.

Dan

> Signed-off-by: Weiping Pan <[email protected]>
> ---
>  src/settings/plugins/ifcfg-rh/reader.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/src/settings/plugins/ifcfg-rh/reader.c 
> b/src/settings/plugins/ifcfg-rh/reader.c
> index 4dba20e..6773a4a 100644
> --- a/src/settings/plugins/ifcfg-rh/reader.c
> +++ b/src/settings/plugins/ifcfg-rh/reader.c
> @@ -3724,6 +3724,18 @@ is_bond_device (const char *name, shvarFile *parsed)
>       return FALSE;
>  }
>  
> +static gboolean
> +is_vlan_device (const char *name, shvarFile *parsed)
> +{
> +     g_return_val_if_fail (name != NULL, FALSE);
> +     g_return_val_if_fail (parsed != NULL, FALSE);
> +
> +     if (svTrueValue (parsed, "VLAN", FALSE))
> +             return TRUE;
> +
> +     return FALSE;
> +}
> +
>  static void
>  parse_prio_map_list (NMSettingVlan *s_vlan,
>                       shvarFile *ifcfg,
> @@ -3989,6 +4001,8 @@ connection_from_file (const char *filename,
>               if (!test_type) {
>                       if (is_bond_device (device, parsed))
>                               type = g_strdup (TYPE_BOND);
> +                     else if (is_vlan_device (device, parsed))
> +                             type = g_strdup (TYPE_VLAN);
>                       /* Test wireless extensions */
>                       else if (is_wireless_device (device))
>                               type = g_strdup (TYPE_WIRELESS);


_______________________________________________
networkmanager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to