]>
Commit | Line | Data |
---|---|---|
00d89cf8 AD |
1 | #!/usr/bin/perl |
2 | use strict; | |
3 | use warnings; | |
4 | use PVE::OpenVZ; | |
5 | use PVE::Tools qw(run_command); | |
6 | use PVE::Network; | |
7 | use PVE::ProcFSTools; | |
8 | use Data::Dumper; | |
9 | ||
10 | my $vmid = $ENV{VEID}; | |
11 | die "missing vmid parameter" if !$vmid; | |
12 | ||
13 | my $conf = PVE::OpenVZ::load_config($vmid); | |
14 | ||
15 | my $ifaces = {}; | |
16 | if (defined ($conf->{netif}) && $conf->{netif}->{value}) { | |
17 | $ifaces = PVE::OpenVZ::parse_netif($conf->{netif}->{value}, $vmid); | |
18 | } | |
19 | ||
20 | foreach my $ifname (sort keys %$ifaces) { | |
21 | PVE::Network::tap_unplug($ifaces->{$ifname}->{host_ifname}); | |
22 | } | |
23 | ||
24 | exit 0; | |
25 | ||
26 |