aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/exception/version_check_exception.php
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2016-11-21 16:45:56 +0100
committerJakub Senko <jakubsenko@gmail.com>2016-11-21 16:45:56 +0100
commit255368843cf626f21e12722dfda4b9d321a56ad7 (patch)
tree79ea244f2b8c2bf11f4de7aa4e5440bdb01f1c8f /phpBB/phpbb/exception/version_check_exception.php
parentdbd9c1f242ae7c7660feddf2677d41aa82bd21b4 (diff)
downloadforums-255368843cf626f21e12722dfda4b9d321a56ad7.tar
forums-255368843cf626f21e12722dfda4b9d321a56ad7.tar.gz
forums-255368843cf626f21e12722dfda4b9d321a56ad7.tar.bz2
forums-255368843cf626f21e12722dfda4b9d321a56ad7.tar.xz
forums-255368843cf626f21e12722dfda4b9d321a56ad7.zip
[ticket/14522] Add ucp_register_buttons_before
PHPBB3-14522
Diffstat (limited to 'phpBB/phpbb/exception/version_check_exception.php')
0 files changed, 0 insertions, 0 deletions
n51' href='#n51'>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 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516
#!/usr/bin/perl
#
# François Pons <fpons@mandrakesoft.com>
#
# Copyright 2003 MandrakeSoft
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2, as
# published by the Free Software Foundation.
#
# 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.
#

use strict;
use lib qw(/usr/lib/libDrakX);

use standalone;     #- warning, standalone must be loaded very first, for 'explanations'

use common;
use interactive;
use network;
use log;
use c;
use network::netconnect;

$::isInstall and die "Not supported during install.\n";

$::Wizard_pix_up = "wiz_drakgw.png"; #- to change ? keep existing one, nobody will see (too late) ;-)
$::direct = grep { /-direct/ } @ARGV;


#
#my $sysconf_network = "/etc/sysconfig/network";
#my $sysconf_dhcpd = "/etc/sysconfig/dhcpd";
#my $rc_firewall_generic = "/etc/rc.d/rc.firewall";
#my $rc_firewall_drakgw = "/etc/rc.d/rc.firewall.inet_sharing";
#my $rc_firewall_24 = "/etc/rc.d/rc.firewall.inet_sharing-2.4";
#my $masq_file = "/etc/shorewall/masq";
#my $cups_conf = "/etc/cups/cupsd.conf";
#
#my $shorewall = network::shorewall::read();
#
#- get network configuration.
my $netc = {};
my $intf = {};
network::read_all_conf('', $netc, $intf);

my $in = 'interactive'->vnew('su');
$::Wizard_title = N("PXE Server Configuration");

!$::isEmbedded && $in->isa('interactive::gtk') and $::isWizard = 1;

#pur_gtk_mode() if $::isEmbedded && $in->isa('interactive::gtk');

sub sys { system(@_) == 0 or log::l("[drakpxe] Warning, sys failed for $_[0]") }

sub outpend { 
    log::explanations("modified file $_[0]");
    my $f = shift; local *F; open F, ">>$f" or die "outpend in file $f failed: $!\n"; print F foreach @_;
}

sub start_daemons () {
    log::explanations("Starting daemons");

    system("/etc/rc.d/init.d/dhcpd status >/dev/null") == 0 and sys("/etc/rc.d/init.d/dhcpd stop");

    sys("/etc/rc.d/init.d/$_ start >/dev/null"), sys("/sbin/chkconfig --level 345 $_ on") foreach 'httpd', 'dhcpd';
}

sub stop_daemons () {
    log::explanations("Stopping daemons");
    foreach (qw(dhcpd httpd)) {
	system("/etc/rc.d/init.d/$_ status >/dev/null 2>/dev/null") == 0 and sys("/etc/rc.d/init.d/$_ stop");
    }
    sys("/sbin/chkconfig --level 345 $_ off") foreach 'dhcpd', 'httpd';
}

my $wait_configuring;

sub quit_global {
    my ($in, $exitcode) = @_;
    $in->exit($exitcode);
    goto begin
}

sub fatal_quit ($) {
    log::l("[drakpxe] FATAL: $_[0]");
    undef $wait_configuring;
    $in->ask_warn('', $_[0]);
    quit_global($in, -1);
}

#my ($kernel_version) = c::kernel_version() =~ /(...)/;
#log::l("[drakgw] kernel_version $kernel_version");
#
#$kernel_version >= 2.4 or fatal_quit(N("Sorry, we support only 2.4 kernels."));

begin:

#- **********************************
#- * 0th step: verify if we have multiple network interface.

$::Wizard_no_previous = 1;
    
$::direct or $in->ask_okcancel(N("Installation Server Configuration"),
N("You are about to configure your computer to install a PXE server as a DHCP server
and a TFTP server to build an installation server.
With that feature, other computers on your local network will be installable using this computer as source.

Make sure you have configured your Network/Internet access using drakconnect before going any further.

Note: you need a dedicated Network Adapter to set up a Local Area Network (LAN)."), 1) or quit_global($in, 0);

undef $::Wizard_no_previous;


#- **********************************
#- * 1st step: verify if we have multiple network interface.

step_check_intf:

my @intf = grep { exists $_->{NETWORK} } map {
    unless ($_->{NETWORK}) {
	foreach my $s (split "\n", `route`) {
	    print STDERR "$s\n";
	    $s =~ /^(\S+)\s+\S+\s+$_->{NETMASK}\s+.*$_->{DEVICE}/ and $_->{NETWORK} = $1;
	}
    } $_ } values %$intf;
if (@intf < 1) {
    #- no interface already configured found, ask user to configure.
    $in->ask_warn(N("No network adapter on your system!"), 
		  N("No ethernet network adapter has been detected on your system. Please run the hardware configuration tool."));
    quit_global($in, 0);
} elsif (@intf > 1) {
    #- there are more than one interface, we need to choose one of them.
    @intf = ($in->ask_from_listf(N("Choose the network interface"),
				 N("Please choose which network interface will be used for the dhcp server."),	
				 sub { N("Interface %s (on network %s)", $_[0]{DEVICE}, $_[0]{NETWORK}) },
				 \@intf,
				) or goto begin);
}


#- **********************************
#- * 3rd step: select installation directory to be used (if not present, next step
#-             will be creation and copy from existing one).

step_ip_range:

#- read current configuration, or create a default suitable automatically.
my $dhcpd_conf = parse_dhcpd_conf("/etc/dhcpd.conf", {}, $netc, $intf[0]);

#- get back default of ip.