From: Alfredo Finelli Date: Tue, 12 Nov 2013 16:03:41 +0000 (-0800) Subject: debian: Avoid logrotate error if /var/run/openvswitch does not exist. X-Git-Tag: sliver-openvswitch-2.0.90-1~5^2~39 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=11bd0a533c6c6753739d7ffbf65e1812e31739dc;p=sliver-openvswitch.git debian: Avoid logrotate error if /var/run/openvswitch does not exist. Signed-off-by: Alfredo Finelli Signed-off-by: Ben Pfaff --- 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 }