optimus add repository

This commit is contained in:
burakerturk
2016-04-10 19:45:21 +03:00
parent 4d67565be8
commit 18ef7661e2
12 changed files with 79348 additions and 79071 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from grp import getgrnam
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
if not os.path.isdir("/run/bumblebee"): os.makedirs("/run/bumblebee", int("0775", 8))
try:
os.chown("/run/bumblebee", -1, getgrnam("bumblebee").gr_gid)
except KeyError:
os.system("groupadd -r bumblebee")
os.chown("/run/bumblebee", -1, getgrnam("bumblebee").gr_gid)
for u in getgrnam("users").gr_mem:
os.system("gpasswd -a %s bumblebee" % u)