fix sysctl support causing scp to break due to printing text to ssh connection
Scott Baker [Tue, 3 Dec 2013 00:07:42 +0000 (16:07 -0800)]
lxcsu [changed mode: 0755->0644]

diff --git a/lxcsu b/lxcsu
old mode 100755 (executable)
new mode 100644 (file)
index 4f4a2f7..090cea1
--- a/lxcsu
+++ b/lxcsu
@@ -189,7 +189,7 @@ def main ():
        for (sysctl_file, sysctl_name, sysctl_val) in sysctls:
                                for fn in ["/sbin/sysctl", "/usr/sbin/sysctl", "/bin/sysctl", "/usr/bin/sysctl"]:
                                        if os.path.exists(fn):
-                                               os.system('%s -w %s=%s'%(fn, sysctl_name,sysctl_val))
+                                               os.system('%s -w %s=%s  >/dev/null 2>&1'%(fn, sysctl_name,sysctl_val))
                                                break
                                else:
                                        print "Error: image does not have a sysctl binary"