| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | use strict; |
| 4 | use warnings; |
| 5 | use PVE::Network; |
| 6 | |
| 7 | my $iface = shift; |
| 8 | |
| 9 | die "no interface specified\n" if !$iface; |
| 10 | |
| 11 | die "got strange interface name '$iface'\n" |
| 12 | if $iface !~ m/^tap(\d+)i(\d+)$/; |
| 13 | |
| 14 | PVE::Network::tap_unplug($iface); |
| 15 | |
| 16 | exit 0; |