|
|
@ -315,7 +315,7 @@ class CronVar(object):
|
|
|
|
return "%s -l %s" % (pipes.quote(CRONCMD), pipes.quote(self.user))
|
|
|
|
return "%s -l %s" % (pipes.quote(CRONCMD), pipes.quote(self.user))
|
|
|
|
elif platform.system() == 'HP-UX':
|
|
|
|
elif platform.system() == 'HP-UX':
|
|
|
|
return "%s %s %s" % (CRONCMD , '-l', pipes.quote(self.user))
|
|
|
|
return "%s %s %s" % (CRONCMD , '-l', pipes.quote(self.user))
|
|
|
|
else:
|
|
|
|
elif pwd.getpwuid(os.getuid())[0] != self.user:
|
|
|
|
user = '-u %s' % pipes.quote(self.user)
|
|
|
|
user = '-u %s' % pipes.quote(self.user)
|
|
|
|
return "%s %s %s" % (CRONCMD , user, '-l')
|
|
|
|
return "%s %s %s" % (CRONCMD , user, '-l')
|
|
|
|
|
|
|
|
|
|
|
@ -327,7 +327,7 @@ class CronVar(object):
|
|
|
|
if self.user:
|
|
|
|
if self.user:
|
|
|
|
if platform.system() in ['SunOS', 'HP-UX', 'AIX']:
|
|
|
|
if platform.system() in ['SunOS', 'HP-UX', 'AIX']:
|
|
|
|
return "chown %s %s ; su '%s' -c '%s %s'" % (pipes.quote(self.user), pipes.quote(path), pipes.quote(self.user), CRONCMD, pipes.quote(path))
|
|
|
|
return "chown %s %s ; su '%s' -c '%s %s'" % (pipes.quote(self.user), pipes.quote(path), pipes.quote(self.user), CRONCMD, pipes.quote(path))
|
|
|
|
else:
|
|
|
|
elif pwd.getpwuid(os.getuid())[0] != self.user:
|
|
|
|
user = '-u %s' % pipes.quote(self.user)
|
|
|
|
user = '-u %s' % pipes.quote(self.user)
|
|
|
|
return "%s %s %s" % (CRONCMD , user, pipes.quote(path))
|
|
|
|
return "%s %s %s" % (CRONCMD , user, pipes.quote(path))
|
|
|
|
|
|
|
|
|
|
|
|