From 11bd0a533c6c6753739d7ffbf65e1812e31739dc Mon Sep 17 00:00:00 2001 From: Alfredo Finelli Date: Tue, 12 Nov 2013 08:03:41 -0800 Subject: [PATCH] debian: Avoid logrotate error if /var/run/openvswitch does not exist. Signed-off-by: Alfredo Finelli Signed-off-by: Ben Pfaff --- AUTHORS | 1 + debian/openvswitch-switch.logrotate | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 39dbe1c7a..1b508afab 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,6 +6,7 @@ Alexandru Copot alex.mihai.c@gmail.com Alexei Starovoitov ast@plumgrid.com Alexey I. Froloff raorn@altlinux.org Alex Wang alexw@nicira.com +Alfredo Finelli alf@computationes.de Andrew Evans aevans@nicira.com Andrew Lambeth wal@nicira.com Andy Hill hillad@gmail.com diff --git a/debian/openvswitch-switch.logrotate b/debian/openvswitch-switch.logrotate index 8b042407e..a7a71bdd9 100644 --- a/debian/openvswitch-switch.logrotate +++ b/debian/openvswitch-switch.logrotate @@ -7,8 +7,10 @@ rotate 30 postrotate # Tell Open vSwitch daemons to reopen their log files - for pidfile in `cd /var/run/openvswitch && echo *.pid`; do - ovs-appctl -t "${pidfile%%.pid}" vlog/reopen - done + if [ -d /var/run/openvswitch ]; then + for pidfile in `cd /var/run/openvswitch && echo *.pid`; do + ovs-appctl -t "${pidfile%%.pid}" vlog/reopen + done + fi endscript } -- 2.47.0