|
|
@ -48,7 +48,7 @@ BEGIN {
|
|
|
|
$SCRIPTSDIR = ".";
|
|
|
|
$SCRIPTSDIR = ".";
|
|
|
|
$DOTIN = ".in";
|
|
|
|
$DOTIN = ".in";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
require "$SCRIPTSDIR/general.pl$DOTIN";
|
|
|
|
require "$SCRIPTSDIR/general.pl$DOTIN";
|
|
|
|
require "$SCRIPTSDIR/platform.pl$DOTIN";
|
|
|
|
require "$SCRIPTSDIR/platform.pl$DOTIN";
|
|
|
|
require "$SCRIPTSDIR/util.pl$DOTIN";
|
|
|
|
require "$SCRIPTSDIR/util.pl$DOTIN";
|
|
|
@ -70,13 +70,13 @@ $version = "@VERSION@";
|
|
|
|
"yoper-2.2",
|
|
|
|
"yoper-2.2",
|
|
|
|
"blackpanther-4.0",
|
|
|
|
"blackpanther-4.0",
|
|
|
|
"debian-2.2", "debian-3.0", "debian-3.1", "debian-4.0", "debian-5.0", "debian-testing",
|
|
|
|
"debian-2.2", "debian-3.0", "debian-3.1", "debian-4.0", "debian-5.0", "debian-testing",
|
|
|
|
"ubuntu-5.04", "ubuntu-5.10", "ubuntu-6.06", "ubuntu-6.10", "ubuntu-7.04", "ubuntu-7.10", "ubuntu-8.04",
|
|
|
|
"ubuntu-5.04", "ubuntu-5.10", "ubuntu-6.06", "ubuntu-6.10", "ubuntu-7.04", "ubuntu-7.10", "ubuntu-8.04", "ubuntu-8.10", "ubuntu-9.04", "ubuntu-9.10", "ubuntu-10.04", "ubuntu-10.10",
|
|
|
|
"suse-7.0", "suse-9.0", "suse-9.1",
|
|
|
|
"suse-7.0", "suse-9.0", "suse-9.1",
|
|
|
|
"turbolinux-7.0", "fedora-1", "fedora-2", "fedora-3", "fedora-4", "fedora-5", "rpath",
|
|
|
|
"turbolinux-7.0", "fedora-1", "fedora-2", "fedora-3", "fedora-4", "fedora-5", "rpath",
|
|
|
|
"pld-1.0", "pld-1.1", "pld-1.99",
|
|
|
|
"pld-1.0", "pld-1.1", "pld-1.99",
|
|
|
|
"conectiva-9", "conectiva-10",
|
|
|
|
"conectiva-9", "conectiva-10",
|
|
|
|
"vine-3.0", "vine-3.1",
|
|
|
|
"vine-3.0", "vine-3.1",
|
|
|
|
"ark",
|
|
|
|
"ark",
|
|
|
|
"slackware-9.1.0", "slackware-10.0.0", "slackware-10.1.0", "slackware-10.2.0",
|
|
|
|
"slackware-9.1.0", "slackware-10.0.0", "slackware-10.1.0", "slackware-10.2.0",
|
|
|
|
"gentoo", "vlos-1.2", "freebsd-5", "freebsd-6");
|
|
|
|
"gentoo", "vlos-1.2", "freebsd-5", "freebsd-6");
|
|
|
|
|
|
|
|
|
|
|
@ -200,7 +200,7 @@ sub xml_parse_dialing
|
|
|
|
my (%hash, $name, $elem);
|
|
|
|
my (%hash, $name, $elem);
|
|
|
|
|
|
|
|
|
|
|
|
shift @$tree;
|
|
|
|
shift @$tree;
|
|
|
|
|
|
|
|
|
|
|
|
while ($elem = shift @$tree)
|
|
|
|
while ($elem = shift @$tree)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$hash{$elem} = &gst_xml_get_pcdata (shift @$tree);
|
|
|
|
$hash{$elem} = &gst_xml_get_pcdata (shift @$tree);
|
|
|
@ -316,7 +316,7 @@ sub xml_print_configuration
|
|
|
|
{
|
|
|
|
{
|
|
|
|
my ($h) = @_;
|
|
|
|
my ($h) = @_;
|
|
|
|
my @scalar_keys =
|
|
|
|
my @scalar_keys =
|
|
|
|
qw(auto hostname gateway gatewaydev gwdevunsup domain
|
|
|
|
qw(auto hostname gateway gatewaydev gwdevunsup domain
|
|
|
|
hostmatch workgroup smbdesc winsserver winsuse smbuse
|
|
|
|
hostmatch workgroup smbdesc winsserver winsuse smbuse
|
|
|
|
smartdhcpcd smbinstalled dialinstalled name);
|
|
|
|
smartdhcpcd smbinstalled dialinstalled name);
|
|
|
|
my @array_keys =
|
|
|
|
my @array_keys =
|
|
|
@ -369,7 +369,7 @@ sub xml_print_interfaces
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$type = &gst_network_get_interface_type ($dev);
|
|
|
|
$type = &gst_network_get_interface_type ($dev);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&gst_xml_print_vspace ();
|
|
|
|
&gst_xml_print_vspace ();
|
|
|
|
&gst_xml_print_line ("<interface type='$type'>");
|
|
|
|
&gst_xml_print_line ("<interface type='$type'>");
|
|
|
|
&gst_xml_enter ();
|
|
|
|
&gst_xml_enter ();
|
|
|
@ -465,7 +465,7 @@ sub get
|
|
|
|
sub set
|
|
|
|
sub set
|
|
|
|
{
|
|
|
|
{
|
|
|
|
my $hash;
|
|
|
|
my $hash;
|
|
|
|
|
|
|
|
|
|
|
|
$hash = &xml_parse ();
|
|
|
|
$hash = &xml_parse ();
|
|
|
|
&write_profiledb ($hash);
|
|
|
|
&write_profiledb ($hash);
|
|
|
|
&gst_network_conf_set ($hash);
|
|
|
|
&gst_network_conf_set ($hash);
|
|
|
@ -507,7 +507,7 @@ sub save_profiles
|
|
|
|
sub filter
|
|
|
|
sub filter
|
|
|
|
{
|
|
|
|
{
|
|
|
|
my $hash;
|
|
|
|
my $hash;
|
|
|
|
|
|
|
|
|
|
|
|
$hash = &xml_parse ();
|
|
|
|
$hash = &xml_parse ();
|
|
|
|
&gst_report_end ();
|
|
|
|
&gst_report_end ();
|
|
|
|
&xml_print ($hash);
|
|
|
|
&xml_print ($hash);
|
|
|
@ -518,7 +518,7 @@ sub enable_iface
|
|
|
|
my ($tool, $iface, $enabled) = @_;
|
|
|
|
my ($tool, $iface, $enabled) = @_;
|
|
|
|
my (%dist_attrib, $iface_set);
|
|
|
|
my (%dist_attrib, $iface_set);
|
|
|
|
my %hash = ("configuration" => {"file" => $iface});
|
|
|
|
my %hash = ("configuration" => {"file" => $iface});
|
|
|
|
|
|
|
|
|
|
|
|
%dist_attrib = &gst_network_get_interface_replace_table ();
|
|
|
|
%dist_attrib = &gst_network_get_interface_replace_table ();
|
|
|
|
$iface_set = $dist_attrib{"iface_set"};
|
|
|
|
$iface_set = $dist_attrib{"iface_set"};
|
|
|
|
&$iface_set (\%hash, undef, $enabled, 1);
|
|
|
|
&$iface_set (\%hash, undef, $enabled, 1);
|
|
|
@ -531,7 +531,7 @@ sub enable_iface
|
|
|
|
&drop_dhcp_connection ($iface);
|
|
|
|
&drop_dhcp_connection ($iface);
|
|
|
|
&drop_pppd_connection ($iface);
|
|
|
|
&drop_pppd_connection ($iface);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Don't forget to do gst_end when the reports are over!
|
|
|
|
# Don't forget to do gst_end when the reports are over!
|
|
|
|
&gst_report_end ();
|
|
|
|
&gst_report_end ();
|
|
|
|
# XML output would come here, but this directive returns no XML.
|
|
|
|
# XML output would come here, but this directive returns no XML.
|
|
|
@ -564,7 +564,7 @@ sub list_ifaces
|
|
|
|
my ($ifaces, $iface, @arr);
|
|
|
|
my ($ifaces, $iface, @arr);
|
|
|
|
|
|
|
|
|
|
|
|
$ifaces = &gst_network_interfaces_get_info ();
|
|
|
|
$ifaces = &gst_network_interfaces_get_info ();
|
|
|
|
|
|
|
|
|
|
|
|
foreach $iface (keys %$ifaces)
|
|
|
|
foreach $iface (keys %$ifaces)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
push @arr, $$ifaces{$iface};
|
|
|
|
push @arr, $$ifaces{$iface};
|
|
|
@ -583,7 +583,7 @@ sub detect_modem
|
|
|
|
|
|
|
|
|
|
|
|
$device = &gst_network_autodetect_modem ();
|
|
|
|
$device = &gst_network_autodetect_modem ();
|
|
|
|
&gst_report_end ();
|
|
|
|
&gst_report_end ();
|
|
|
|
|
|
|
|
|
|
|
|
&gst_xml_print_begin ("network-modem-device");
|
|
|
|
&gst_xml_print_begin ("network-modem-device");
|
|
|
|
&gst_xml_print_pcdata ("device", $device) if ($device ne undef);
|
|
|
|
&gst_xml_print_pcdata ("device", $device) if ($device ne undef);
|
|
|
|
&gst_xml_print_end ("network-modem-device");
|
|
|
|
&gst_xml_print_end ("network-modem-device");
|
|
|
|