rhel: Avoid logrotate error if /var/run/openvswitch does not exist
Avoid also errors if an ovs server didn't start correctly or it crashed without
deleting the pid file.
Reported-at:
missingok
postrotate
# Tell Open vSwitch daemons to reopen their log files
+ if [ -d /var/run/openvswitch ]; then
for pidfile in `cd /var/run/openvswitch && echo *.pid`; do
- ovs-appctl -t "${pidfile%%.pid}" vlog/reopen
+ ovs-appctl -t "${pidfile%%.pid}" vlog/reopen 2>/dev/null || :
done
+ fi
endscript
}
