aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/data/v310/beta1.php
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2014-04-18 09:23:02 -0700
committerCesar G <prototech91@gmail.com>2014-04-18 09:23:02 -0700
commit6f41e7a98ba3c7060c9ad1636165aade4054e872 (patch)
tree62835c688629c416076e4228f97516f9614506c0 /phpBB/phpbb/db/migration/data/v310/beta1.php
parent3608abdf8c8e4038d21764423213a3fa06e2e558 (diff)
parent34533a86dac64d36280ae7db393e10db6b4ba21b (diff)
downloadforums-6f41e7a98ba3c7060c9ad1636165aade4054e872.tar
forums-6f41e7a98ba3c7060c9ad1636165aade4054e872.tar.gz
forums-6f41e7a98ba3c7060c9ad1636165aade4054e872.tar.bz2
forums-6f41e7a98ba3c7060c9ad1636165aade4054e872.tar.xz
forums-6f41e7a98ba3c7060c9ad1636165aade4054e872.zip
Merge remote-tracking branch 'VSEphpbb/ticket/12419' into develop-ascraeus
* VSEphpbb/ticket/12419: [ticket/12419] Also shrink the size of "See All" in footer a little bit [ticket/12419] Improve font size in notifications drop-down
Diffstat (limited to 'phpBB/phpbb/db/migration/data/v310/beta1.php')
0 files changed, 0 insertions, 0 deletions
='#n48'>48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
package network::isdn; # $Id$

use strict;
use network::isdn_consts;
use common;
use any;
use modules;
use run_program;
use log;
use network::tools;
use MDK::Common::Globals "network", qw($in);
use MDK::Common::File;
use services;
use list_modules;


sub write_config {
    my ($isdn) = @_;
    $in->do_pkgs->install('isdn4net', if_($isdn->{speed} =~ /128/, 'ibod'), 'isdn4k-utils');

    output_with_perm("$::prefix/etc/isdn/profile/link/myisp", 0600,
	  qq(
I4L_USERNAME="$isdn->{login}"
I4L_SYSNAME=""
I4L_LOCALMSN="$isdn->{phone_in}"
I4L_REMOTE_OUT="$isdn->{phone_out}"
I4L_DIALMODE="$isdn->{dialing_mode}"
) . if_($isdn->{speed} =~ /128/, 'SLAVE="ippp1"
'));
	output "$::prefix/etc/isdn/profile/card/mycard",
	  qq(
I4L_MODULE="$isdn->{driver}"
I4L_TYPE="$isdn->{type}"
I4L_IRQ="$isdn->{irq}"
I4L_MEMBASE="$isdn->{mem}"
I4L_PORT="$isdn->{io}"
I4L_IO0="$isdn->{io0}"
I4L_IO1="$isdn->{io1}"
I4L_ID="HiSax"
I4L_FIRMWARE="$isdn->{firmware}"
I4L_PROTOCOL="$isdn->{protocol}"
);

	output "$::prefix/etc/ppp/ioptions",
	  "lock
usepeerdns
defaultroute
";

    services::stop("isdn4linux"); #- to be stopped before capi is loaded
    if ($isdn->{driver} eq "capidrv") {
        setup_capi_conf(get_capi_card($isdn));
        services::start_service_on_boot("capi4linux");
        services::start("capi4linux");
    } else {
        services::stop("capi4linux");
        services::do_not_start_service_on_boot("capi4linux");
    }
    services::start_service_on_boot("isdn4linux");
    services::start("isdn4linux");

    write_secret_backend($isdn->{login}, $isdn->{passwd});

    1;
}


sub setup_capi_conf {
    my ($capi_card) = @_;

    $in->do_pkgs->ensure_is_installed('isdn4k-utils', "/etc/rc.d/init.d/capi4linux"); #- capi4linux service
    is_module_installed($capi_card->{driver}) or $in->do_pkgs->install(@{$capi_card->{packages}});
    if ($capi_card->{firmware} && ! -f "$::prefix/usr/lib/isdn/$capi_card->{firmware}") {
        $in->do_pkgs->install("$capi_card->{driver}-firmware");
    }

    #- stop capi4linux before new config is written so that it can unload the driver
    services::stop("capi4linux");

    my $capi_conf;
    my $firmware = $capi_card->{firmware} || '-';
    if ($capi_card->{driver} eq "fcclassic") {
        $capi_conf = "fcclassic     -       -       0x300   5    -       -\n# adjust IRQ and IO !!        ^^^^^  ^^^\n";
    } elsif ($capi_card->{driver} eq "fcpnp") {
        $capi_conf = "fcpnp      -       -       0x300   5    -       -\n# adjust IRQ and IO !!     ^^^^^  ^^^\n";
    } else {
        $capi_conf = "$capi_card->{driver}        $firmware       -       -       -       -       -\n";
    }
    output("$::prefix/etc/capi.conf", $capi_conf);
}

sub read_config {
    my ($isdn) = @_;
    
    my %match = (I4L_USERNAME => 'login',
		 I4L_LOCALMSN => 'phone_in',
		 I4L_REMOTE_OUT => 'phone_out',
		 I4L_DIALMODE => 'dialing_mode',
		 I4L_MODULE => 'driver',
		 I4L_TYPE => 'type',
		 I4L_IRQ => 'irq',
		 I4L_MEMBASE => 'mem',
		 I4L_PORT => 'io',
		 I4L_IO0 => 'io0',
		 I4L_IO1 => 'io1',
		 I4L_FIRMWARE => 'firmware');
    foreach ('link/myisp', 'card/mycard') {
	my %conf = getVarsFromSh("$::prefix/etc/isdn/profile/$_");
	foreach (keys %conf) {	 
	    $isdn->{$match{$_}} = $conf{$_} if $match{$_} && $conf{$_};
	}
    }

    $isdn->{passwd} = network::tools::passwd_by_login($isdn->{login});
    #$isdn->{description} = '';
    #$isdn->{vendor} = '';
    #$isdn->{passwd2} = '';
}

my $file = "$ENV{SHARE_PATH}/ldetect-lst/isdn.db";
$file = "$::prefix$file" if !-e $file;

sub get_info_providers_backend {
    my ($isdn, $_netc, $name) = @_;
    $name eq N("Unlisted - edit manually") and return;
    foreach (catMaybeCompressed($file)) {
	chop;
	my ($name_, $phone, $real, $dns1, $dns2) = split '=>';