mirror of
https://github.com/gryf/wicd.git
synced 2026-01-29 11:55:45 +01:00
merged lp:~adamblackburn/wicd/loggroup to allow passing the preferred log group and permissions to setup.py configure -- thanks to David Paleino
This commit is contained in:
@@ -1671,9 +1671,17 @@ def main(argv):
|
||||
output = ManagedStdio(logpath)
|
||||
if os.path.exists(logpath):
|
||||
try:
|
||||
os.chmod(logpath, 0600)
|
||||
os.chmod(logpath, wpath.log_perms)
|
||||
except:
|
||||
print 'unable to chmod log file to 0600'
|
||||
print 'unable to chmod log file to %s' % wpath.log_perms
|
||||
|
||||
try:
|
||||
if wpath.log_group:
|
||||
import grp
|
||||
group = grp.getgrnam(wpath.log_group)
|
||||
os.chown(logpath, 0, group[2])
|
||||
except:
|
||||
print 'unable to chown log file to %s' % group[2]
|
||||
|
||||
if redirect_stdout: sys.stdout = output
|
||||
if redirect_stderr: sys.stderr = output
|
||||
|
||||
Reference in New Issue
Block a user