Skip to content

Commit

Permalink
On solaris use the tail in /usr/xpg4/bin/tail insteaf of /usr/bin/tai…
Browse files Browse the repository at this point in the history
…l which does not support the -n option
  • Loading branch information
mx-mad committed Feb 10, 2014
1 parent 54efd81 commit 09749e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion slave/buildslave/scripts/logwatcher.py
Expand Up @@ -15,6 +15,7 @@


import os
import platform

from twisted.internet import defer
from twisted.internet import error
Expand Down Expand Up @@ -77,7 +78,11 @@ def start(self):
# been seen within 10 seconds, and with ReconfigError if the error
# line was seen. If the logfile could not be opened, it errbacks with
# an IOError.
self.p = reactor.spawnProcess(self.pp, "/usr/bin/tail",
if platform.system().lower() == 'sunos' and os.path.exists('/usr/xpg4/bin/tail'):
tailBin = "/usr/xpg4/bin/tail"
else:
tailBin = "/usr/bin/tail"
self.p = reactor.spawnProcess(self.pp, tailBin,
("tail", "-f", "-n", "0", self.logfile),
env=os.environ,
)
Expand Down

0 comments on commit 09749e7

Please sign in to comment.