5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2024-12-25 23:21:43 +03:00

show better error message if bridge does not exist

This commit is contained in:
Dietmar Maurer 2012-12-06 07:56:11 +01:00
parent 98a0dc5e2a
commit 8afd0c622f

View File

@ -29,6 +29,7 @@ my $bridge = $net->{bridge};
die "unable to get bridge setting\n" if !$bridge;
my $bridgemtu = PVE::Tools::file_read_firstline("/sys/class/net/$bridge/mtu");
die "bridge '$bridge' does not exist\n" if !$bridgemtu;
system ("/sbin/ifconfig $iface 0.0.0.0 promisc up mtu $bridgemtu") == 0 ||
die "interface activation failed\n";