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