Re: [PATCH] lxc: do not require 'ifconfig' or 'ipconfig' in container

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/01/2011 03:02 AM, Daniel P. Berrange wrote:
On Wed, Aug 31, 2011 at 02:02:10PM -0500, Serge Hallyn wrote:
Quoting Scott Moser (smoser@xxxxxxxxxx):
Currently, the lxc implementation invokes 'ip' and 'ifconfig' commands
inside a container using 'virRun'.  That has the side effect of requiring
those commands to be present and to function in a manner consistent with
the usage.  Some small roots (such as ttylinux) may not have 'ip' or
'ifconfig'.


ACK

+
+    close(fd);

That fails 'make syntax-check'.  Pushed as modified:

diff --git i/src/lxc/veth.c w/src/lxc/veth.c
index c24df91..e4db65c 100644
--- i/src/lxc/veth.c
+++ w/src/lxc/veth.c
@@ -1,7 +1,7 @@
 /*
  * veth.c: Tools for managing veth pairs
  *
- * Copyright (C) 2010 Red Hat, Inc.
+ * Copyright (C) 2010-2011 Red Hat, Inc.
  * Copyright IBM Corp. 2008
  *
  * See COPYING.LIB for the License of this software
@@ -26,6 +26,7 @@
 #include "memory.h"
 #include "command.h"
 #include "virterror_internal.h"
+#include "virfile.h"

 #define VIR_FROM_THIS VIR_FROM_LXC

@@ -217,7 +218,7 @@ int vethInterfaceUpOrDown(const char* veth, int upOrDown)
         ret = ioctl(fd, SIOCSIFFLAGS, &ifr);
     }

-    close(fd);
+    VIR_FORCE_CLOSE(fd);
     if (ret == -1)
         if (upOrDown == 0)
             /*


--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]