[ovs-git] [openvswitch/ovs] c1419a: vlog: Fix "/dev/log" test

GitHub noreply at github.com
Tue Feb 3 05:21:43 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: c1419aa1d863182b7ebdcb3908b0e46487abbf31
      https://github.com/openvswitch/ovs/commit/c1419aa1d863182b7ebdcb3908b0e46487abbf31
  Author: YAMAMOTO Takashi <yamamoto at valinux.co.jp>
  Date:   2015-02-03 (Tue, 03 Feb 2015)

  Changed paths:
    M python/ovs/vlog.py

  Log Message:
  -----------
  vlog: Fix "/dev/log" test

commit 7905aae3fc1633c2c44c8fdb9e9d3a3d6e63439b
("vlog: Don't fail syslog initialization in chroot.")
uses os.path.isfile("/dev/log"), which tests if the given path
is a regular file, to see if syslog can be usable.

However, /dev/log is not a regular file for platforms I looked at.
    * On Ubuntu 14.04 and CentOS 6.5, /dev/log is a socket
    * On NetBSD-6, /dev/log is a symlink to a socket

Replace the test with os.path.exists() so that it can work
as intended for these platforms.

Signed-off-by: YAMAMOTO Takashi <yamamoto at valinux.co.jp>
Acked-by: Gurucharan Shetty <gshetty at nicira.com>




More information about the git mailing list