Project

General

Profile

« Previous | Next » 

Revision 82fccf3a

Added by Erik Fonnesbeck over 15 years ago

Allow changing the parent interface of an unassigned wireless clone.

View differences:

usr/local/www/interfaces_wireless_edit.php
113 113
		if (isset($id) && $a_clones[$id]) {
114 114
			if (clone_inuse($a_clones[$id]['if'])) {
115 115
				if ($clone['if'] != $a_clones[$id]['if'])
116
					$input_errors[] = "This wireless clone cannot be modified because it is still being used as an interface.";
116
					$input_errors[] = "This wireless clone cannot be modified because it is still assigned as an interface.";
117 117
				else if ($clone['mode'] != $a_clones[$id]['mode'])
118 118
					$input_errors[] = "Use the configuration page for the assigned interface to change the mode.";
119
			} else if ($clone['if'] != $a_clones[$id]['if'])
120
				$input_errors[] = "Changing the parent interface is not currently supported.  Create a new clone on the new parent and delete the old clone on the previous parent.";
119
			}
121 120
		}
122 121
		if (!$input_errors) {
123 122
			if (!interface_wireless_clone($clone['cloneif'], $clone)) {
124 123
				$input_errors[] = "Error creating interface with mode {$clone['mode']}.  The {$clone['if']} interface may not support creating more clones with the selected mode.";
125 124
			} else {
126 125
				if (isset($id) && $a_clones[$id]) {
126
					if ($clone['if'] != $a_clones[$id]['if'])
127
						mwexec("/sbin/ifconfig " . $a_clones[$id]['cloneif'] . " destroy");
127 128
					$input_errors[] = "Created with id {$id}";
128 129
					$a_clones[$id] = $clone;
129 130
				} else {

Also available in: Unified diff