Skip to content

Commit 227bf25

Browse files
andyhhpjonathanknowles
authored andcommitted
[EA-1069] Removed interface-reconfigure's ability to rename netdevices. Any program which attempts to use it is not playing correctly with the new udev naming method
Signed-off-by: Andrew Cooper <[email protected]> Acked-by: Jonathan Knowles <[email protected]>
1 parent 0eb1625 commit 227bf25

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/interface-reconfigure

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,11 @@ def netdev_remap_name(pif, already_renamed=[]):
145145
return None
146146

147147
def rename_netdev(old_name, new_name):
148-
log("Changing the name of %s to %s" % (old_name, new_name))
149-
run_command(['/sbin/ifconfig', old_name, 'down'])
150-
if not run_command(['/sbin/ip', 'link', 'set', old_name, 'name', new_name]):
151-
raise Error("Could not rename %s to %s" % (old_name, new_name))
148+
raise Error("Trying to rename %s to %s - This functionality has been removed" % (old_name, new_name))
149+
# log("Changing the name of %s to %s" % (old_name, new_name))
150+
# run_command(['/sbin/ifconfig', old_name, 'down'])
151+
# if not run_command(['/sbin/ip', 'link', 'set', old_name, 'name', new_name]):
152+
# raise Error("Could not rename %s to %s" % (old_name, new_name))
152153

153154
pifrec = db().get_pif_record(pif)
154155
device = pifrec['device']

0 commit comments

Comments
 (0)