summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/mv_common.py')
-rwxr-xr-xabs/core/LinHES-config/mv_common.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/abs/core/LinHES-config/mv_common.py b/abs/core/LinHES-config/mv_common.py
index fa610b6..a1b3bef 100755
--- a/abs/core/LinHES-config/mv_common.py
+++ b/abs/core/LinHES-config/mv_common.py
@@ -108,22 +108,24 @@ def link_file(srcfile,link_name):
return
-def mkdir_mythhome(mythhome):
+def mkdir_mythhome(mythhome,user,grp=1000):
if not os.path.exists(mythhome+"/.mythtv"):
logging.debug(" Creating %s/.mythtv",mythhome)
try:
os.mkdir(mythhome+"/.mythtv")
except:
logging.debug(" Couldn't create .mythtv ")
- return
+
try:
- os.chown(mythhome+"/.mythtv", mythuid, mythgid)
- logging.debug("* Couldn't chown of %s", mythhome)
- except:
- cmd = ''' chown -R mythtv %s/.mythtv''' %mythhome
+ #os.chown(mythhome+"/.mythtv", int(user), int(grp))
+ #logging.debug("* Couldn't chown of %s", mythhome)
+
+ cmd = ''' chown -R %s %s/.mythtv''' %(user,mythhome)
runcmd(cmd)
- cmd = ''' chgrp -R mythtv %s/.mythtv''' %mythhome
+ cmd = ''' chgrp -R %s %s/.mythtv''' %(grp,mythhome)
runcmd(cmd)
+ except:
+ logging.debug("* Couldn't chown of %s", mythhome)
pass