Kaydet (Commit) 5b33d741 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

added

üst 2d29529c
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -67,7 +67,7 @@ class Call: ...@@ -67,7 +67,7 @@ class Call:
def handleResult(*result): def handleResult(*result):
self.async(self.package, None, result) self.async(self.package, None, result)
def handleError(exception): def handleError(exception):
if "policy.auth" in exception._dbus_error_name or "Comar.PolicyKit" in exception._dbus_error_name: if "policy.auth" in exception._dbus_error_name or "Scom.PolicyKit" in exception._dbus_error_name:
action = exception.get_dbus_message() action = exception.get_dbus_message()
if self.queryPolicyKit(action): if self.queryPolicyKit(action):
return self.call(*args, **kwargs) return self.call(*args, **kwargs)
...@@ -120,7 +120,7 @@ class Call: ...@@ -120,7 +120,7 @@ class Call:
try: try:
return met(dbus_interface="%s.%s.%s" % (self.link.interface, self.group, self.class_), timeout=self.timeout, *args) return met(dbus_interface="%s.%s.%s" % (self.link.interface, self.group, self.class_), timeout=self.timeout, *args)
except dbus.DBusException as exception: except dbus.DBusException as exception:
if "policy.auth" in exception._dbus_error_name or "Comar.PolicyKit" in exception._dbus_error_name: if "policy.auth" in exception._dbus_error_name or "Scom.PolicyKit" in exception._dbus_error_name:
action = exception.get_dbus_message() action = exception.get_dbus_message()
if self.queryPolicyKit(action): if self.queryPolicyKit(action):
return self.call(*args, **kwargs) return self.call(*args, **kwargs)
......
...@@ -227,7 +227,7 @@ def startService(command, args=None, pidfile=None, makepid=False, nice=None, det ...@@ -227,7 +227,7 @@ def startService(command, args=None, pidfile=None, makepid=False, nice=None, det
and run it in the background. and run it in the background.
makepid: Write the pid file if service does not create on its own. Mostly useful makepid: Write the pid file if service does not create on its own. Mostly useful
with the detach option. with the detach option.
donotify: If True, automatically make Comar notification when service is run. donotify: If True, automatically make Scom notification when service is run.
Also automatically fail() if something goes wrong. Also automatically fail() if something goes wrong.
""" """
cmd = [ command ] cmd = [ command ]
...@@ -307,7 +307,7 @@ def stopService(pidfile=None, command=None, args=None, chuid=None, user=None, na ...@@ -307,7 +307,7 @@ def stopService(pidfile=None, command=None, args=None, chuid=None, user=None, na
user: Stop processes belonging to this user name. user: Stop processes belonging to this user name.
signalno: Specify the signal to send to processes being stopped. signalno: Specify the signal to send to processes being stopped.
Default is SIGTERM. Default is SIGTERM.
donotify: If True, automatically make Comar notification when service is stopped. donotify: If True, automatically make Scom notification when service is stopped.
Also automatically fail() if something goes wrong. Also automatically fail() if something goes wrong.
""" """
if signalno is None: if signalno is None:
...@@ -386,7 +386,7 @@ def isServiceRunning(pidfile=None, command=None): ...@@ -386,7 +386,7 @@ def isServiceRunning(pidfile=None, command=None):
return False return False
return True return True
# Default Comar class methods # Default Scom class methods
def info(): def info():
from csl import serviceType from csl import serviceType
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -16,8 +16,9 @@ SET (APP_SUFFIX "3") ...@@ -16,8 +16,9 @@ SET (APP_SUFFIX "3")
# Uncomment this for production releases. # Uncomment this for production releases.
SET (VERSION_SUFFIX "") SET (VERSION_SUFFIX "")
SET (FLAGS "-g -O0 -Wcast-align -Wno-uninitialized -Wall -fstrict-aliasing") #SET (FLAGS "-g -O0 -Wcast-align -Wno-uninitialized -Wall -fstrict-aliasing")
SET (FLAGS "-g -O0 -Wno-uninitialized -Wall -fstrict-aliasing")
# Uncomment this for gprof profiling # Uncomment this for gprof profiling
# SET (FLAGS "-g -O0 -Werror -Wcast-align -Wno-uninitialized -Wall -fstrict-aliasing -fprofile-arcs -ftest-coverage") # SET (FLAGS "-g -O0 -Werror -Wcast-align -Wno-uninitialized -Wall -fstrict-aliasing -fprofile-arcs -ftest-coverage")
SET (CMAKE_C_FLAGS "${FLAGS}") SET (CMAKE_C_FLAGS "${FLAGS}")
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>computer</icon_name> <icon_name>computer</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>computer</icon_name> <icon_name>computer</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>drive-harddisk</icon_name> <icon_name>drive-harddisk</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>applications-internet</icon_name> <icon_name>applications-internet</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>applications-internet</icon_name> <icon_name>applications-internet</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>applications-internet</icon_name> <icon_name>applications-internet</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>applications-internet</icon_name> <icon_name>applications-internet</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>applications-system</icon_name> <icon_name>applications-system</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>package</icon_name> <icon_name>package</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>package</icon_name> <icon_name>package</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>package</icon_name> <icon_name>package</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>preferences-system-session</icon_name> <icon_name>preferences-system-session</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>preferences-system</icon_name> <icon_name>preferences-system</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>date</icon_name> <icon_name>date</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>system-users</icon_name> <icon_name>system-users</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>video-display</icon_name> <icon_name>video-display</icon_name>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>Pardus</vendor> <vendor>Sulin</vendor>
<vendor_url>http://www.sulin.org.tr</vendor_url> <vendor_url>http://www.sulin.org.tr</vendor_url>
<icon_name>video-display</icon_name> <icon_name>video-display</icon_name>
......
...@@ -53,12 +53,12 @@ script_init() ...@@ -53,12 +53,12 @@ script_init()
Py_InitializeEx(0); Py_InitializeEx(0);
// Initialize exceptions // Initialize exceptions
PyExc_SCOM_Internal = PyErr_NewException("Comar.Internal", NULL, NULL); PyExc_SCOM_Internal = PyErr_NewException("Scom.Internal", NULL, NULL);
PyExc_SCOM_Invalid = PyErr_NewException("Comar.Invalid", NULL, NULL); PyExc_SCOM_Invalid = PyErr_NewException("Scom.Invalid", NULL, NULL);
PyExc_SCOM_Script = PyErr_NewException("Comar.Script", NULL, NULL); PyExc_SCOM_Script = PyErr_NewException("Scom.Script", NULL, NULL);
PyExc_SCOM_Missing = PyErr_NewException("Comar.Missing", NULL, NULL); PyExc_SCOM_Missing = PyErr_NewException("Scom.Missing", NULL, NULL);
PyExc_DBus = PyErr_NewException("Comar.DBus", NULL, NULL); PyExc_DBus = PyErr_NewException("Scom.DBus", NULL, NULL);
PyExc_PolicyKit = PyErr_NewException("Comar.PolicyKit", NULL, NULL); PyExc_PolicyKit = PyErr_NewException("Scom.PolicyKit", NULL, NULL);
// Load model definitions // Load model definitions
PyObject *py_models; PyObject *py_models;
...@@ -349,7 +349,7 @@ c_i18n(PyObject *self, PyObject *args) ...@@ -349,7 +349,7 @@ c_i18n(PyObject *self, PyObject *args)
return py_value; return py_value;
} }
else { else {
PyErr_Format(PyExc_SCOM_Script, "'en' locale string should be provided by default in COMAR scripts."); PyErr_Format(PyExc_SCOM_Script, "'en' locale string should be provided by default in SCOM scripts.");
return NULL; return NULL;
} }
} }
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment