diff options
author | Florent Villard <warly@mandriva.com> | 2003-10-20 10:51:59 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2003-10-20 10:51:59 +0000 |
commit | 306951e28791b261f894a8b71255b4c45d105661 (patch) | |
tree | 9fa88f156c8a6fa200986dc52b42ab43047e81f6 /common/scripts/DrakconnectConf.pm | |
parent | eacbbd06a147d56f4edfaf008cc667b55577b3be (diff) | |
download | drakwizard-306951e28791b261f894a8b71255b4c45d105661.tar drakwizard-306951e28791b261f894a8b71255b4c45d105661.tar.gz drakwizard-306951e28791b261f894a8b71255b4c45d105661.tar.bz2 drakwizard-306951e28791b261f894a8b71255b4c45d105661.tar.xz drakwizard-306951e28791b261f894a8b71255b4c45d105661.zip |
change copyright
remove old xml related files
Diffstat (limited to 'common/scripts/DrakconnectConf.pm')
-rw-r--r-- | common/scripts/DrakconnectConf.pm | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/common/scripts/DrakconnectConf.pm b/common/scripts/DrakconnectConf.pm deleted file mode 100644 index a1b4fbf8..00000000 --- a/common/scripts/DrakconnectConf.pm +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl - -# Drakconnect Conf Parser - -# Copyright (C) 2002 MandrakeSoft Arnaud Desmons <adesmons@mandrakesoft.com> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -package DrakconnectConf; -require "__WIZ_HOME__/common/scripts/Vareqval.pm"; -use strict; - -my $file = "/etc/sysconfig/network-scripts/drakconnect_conf"; -!-f $file and die "no such $file"; -sub new { - my $self = {}; - - my %mdk = Vareqval->get($file); - $self->{mdk} = \%mdk; - foreach (keys %{$self->{mdk}}) { - if (/.*(Eth\d)Known.*/) { - my $device = $1; - $self->{mdk}{$_} =~ /.*true.*/ and $self->{device} = $device; - } - } - !$self->{device} and return -1; - bless $self; -} - -sub get_device { - my $self = shift; - - $self->{device}; -} - -sub is_dhcp { - my $self = shift; - - $self->get_from_known_dev("BootProto") =~ /.*dhcp.*/; -} - -sub get { - my $self = shift; - my $key = shift; - - exists $self->{mdk}->{$key} or die "no $key field in $file"; - $self->{mdk}->{$key}; -} - -sub get_from_known_dev { - my $self = shift; - my $arg = shift; - - my $device = $self->{device}; - exists $self->{mdk}{$device.$arg} or die "no $arg for $device in $file"; - $self->{mdk}{$device.$arg}; -} - -10; |