Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
settingsd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
settingsd
Commits
8a4b339b
Commit
8a4b339b
authored
Jan 31, 2011
by
Devaev Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring, policy update for fmod_system_service
parent
c085bee1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
org.etersoft.settingsd.conf
configs/dbus/org.etersoft.settingsd.conf
+1
-0
fmod_system_services.py
plugins/functions/fmod_system_services.py
+8
-1
No files found.
configs/dbus/org.etersoft.settingsd.conf
View file @
8a4b339b
...
...
@@ -55,6 +55,7 @@
<!--
fmod_system_services
-->
<
policy
context
=
"default"
>
<
allow
send_destination
=
"org.etersoft.settingsd"
send_interface
=
"org.etersoft.settingsd.functions.systemServices"
send_member
=
"servicesChanged"
/>
<
allow
send_destination
=
"org.etersoft.settingsd"
send_interface
=
"org.etersoft.settingsd.functions.systemService"
send_member
=
"description"
/>
<
allow
send_destination
=
"org.etersoft.settingsd"
send_interface
=
"org.etersoft.settingsd.functions.systemService"
send_member
=
"shortDescription"
/>
<
allow
send_destination
=
"org.etersoft.settingsd"
send_interface
=
"org.etersoft.settingsd.functions.systemService"
send_member
=
"levelsMap"
/>
...
...
plugins/functions/fmod_system_services.py
View file @
8a4b339b
...
...
@@ -40,6 +40,12 @@ class SystemService(service.FunctionObject) :
self
.
__system_service_name
=
system_service_name
### Public ###
def
name
(
self
)
:
return
self
.
__system_service_name
### DBus methods ###
@service.functionMethod
(
SYSTEM_SERVICE_METHODS_NAMESPACE
,
in_signature
=
"s"
,
out_signature
=
"i"
)
...
...
@@ -101,7 +107,8 @@ class SystemService(service.FunctionObject) :
logger
.
verbose
(
"Request to
%
s service
\"
%
s
\"
on runlevels
\"
%
s
\"
"
%
(
(
"enable"
if
enabled_flag
else
"disable"
),
self
.
__system_service_name
,
(
levels
if
levels
!=
None
else
"default"
)
))
proc_args
=
"
%
s
%
s
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"chkconfig_prog_path"
),
(
"--level
%
s"
%
(
levels
)
if
levels
!=
None
else
""
),
proc_args
=
"
%
s
%
s
%
s
%
s"
%
(
config
.
value
(
SERVICE_NAME
,
"chkconfig_prog_path"
),
(
"--level
%
s"
%
(
levels
)
if
levels
!=
None
else
""
),
self
.
__system_service_name
,
(
"on"
if
enabled_flag
else
"off"
)
)
return
tools
.
process
.
execProcess
(
proc_args
,
False
)[
2
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment