create core package

This commit is contained in:
aydemir
2015-02-24 11:18:35 +02:00
parent 0e4b743b82
commit 70b25d0f95
1098 changed files with 169545 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/python
import os
import os.path
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
os.system("/bin/chown -R root:cron /var/spool/cron")
os.system("/bin/chmod -R 01730 /var/spool/cron")
os.system("/bin/chmod 0755 /etc/conf.d")
os.system("/bin/chmod 0644 /etc/pam.d/cron")
os.system("/bin/chown root:wheel /usr/sbin/cron")
os.system("/bin/chmod 0750 /usr/sbin/cron")
os.system("/bin/chown root:cron /usr/bin/crontab")
os.system("/bin/chmod 02755 /usr/bin/crontab")
crontabs = "/var/spool/cron/crontabs"
for user in os.listdir(crontabs):
os.system("/bin/chown %s:cron %s" % (user, os.path.join(crontabs, user)))
os.system("/bin/chmod 0600 %s" % os.path.join(crontabs, user))
+20
View File
@@ -0,0 +1,20 @@
from comar.service import *
serviceType = "local"
serviceDesc = _({"en": "Cron Task Scheduler",
"tr": "Cron Görev Zamanlayıcı"})
serviceDefault = "on"
@synchronized
def start():
startService(command="/usr/sbin/cron",
pidfile="/var/run/cron.pid",
donotify=True)
@synchronized
def stop():
stopService(pidfile="/var/run/cron.pid",
donotify=True)
def status():
return isServiceRunning("/var/run/cron.pid")