unit: make sure the dropins we write are high-priority
This commit is contained in:
parent
74c964d369
commit
241da3287d
2
TODO
2
TODO
|
@ -28,6 +28,8 @@ Fedora 19:
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
|
* make BlockIODeviceWeight=, BlockIODeviceBandwidth= runtime settable
|
||||||
|
|
||||||
* split up BlockIOWeight= and BlockIODeviceWeight=
|
* split up BlockIOWeight= and BlockIODeviceWeight=
|
||||||
|
|
||||||
* how to reset dynamically changed attributes sanely?
|
* how to reset dynamically changed attributes sanely?
|
||||||
|
|
|
@ -178,8 +178,8 @@
|
||||||
" <arg name=\"unset\" type=\"as\" direction=\"in\"/>\n" \
|
" <arg name=\"unset\" type=\"as\" direction=\"in\"/>\n" \
|
||||||
" <arg name=\"set\" type=\"as\" direction=\"in\"/>\n" \
|
" <arg name=\"set\" type=\"as\" direction=\"in\"/>\n" \
|
||||||
" </method>\n" \
|
" </method>\n" \
|
||||||
" <method name=\"ListUnitFiles\">\n" \
|
" <method name=\"ListUnitFiles\">\n" \
|
||||||
" <arg name=\"files\" type=\"a(ss)\" direction=\"out\"/>\n" \
|
" <arg name=\"files\" type=\"a(ss)\" direction=\"out\"/>\n" \
|
||||||
" </method>\n" \
|
" </method>\n" \
|
||||||
" <method name=\"GetUnitFileState\">\n" \
|
" <method name=\"GetUnitFileState\">\n" \
|
||||||
" <arg name=\"file\" type=\"s\" direction=\"in\"/>\n" \
|
" <arg name=\"file\" type=\"s\" direction=\"in\"/>\n" \
|
||||||
|
|
|
@ -783,7 +783,6 @@ int bus_unit_set_properties(Unit *u, DBusMessageIter *iter, UnitSetPropertiesMod
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
dbus_message_iter_recurse(iter, &sub);
|
dbus_message_iter_recurse(iter, &sub);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
DBusMessageIter sub2, sub3;
|
DBusMessageIter sub2, sub3;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
@ -830,7 +829,7 @@ int bus_unit_set_properties(Unit *u, DBusMessageIter *iter, UnitSetPropertiesMod
|
||||||
if (n > 0 && UNIT_VTABLE(u)->bus_commit_properties)
|
if (n > 0 && UNIT_VTABLE(u)->bus_commit_properties)
|
||||||
UNIT_VTABLE(u)->bus_commit_properties(u);
|
UNIT_VTABLE(u)->bus_commit_properties(u);
|
||||||
|
|
||||||
return 0;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
const BusProperty bus_unit_properties[] = {
|
const BusProperty bus_unit_properties[] = {
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
" </method>\n" \
|
" </method>\n" \
|
||||||
" <method name=\"ResetFailed\"/>\n" \
|
" <method name=\"ResetFailed\"/>\n" \
|
||||||
" <method name=\"SetProperties\">\n" \
|
" <method name=\"SetProperties\">\n" \
|
||||||
" <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
|
" <arg name=\"runtime\" type=\"b\" direction=\"in\"/>\n" \
|
||||||
" <arg name=\"properties\" type=\"a(sv)\" direction=\"in\"/>\n" \
|
" <arg name=\"properties\" type=\"a(sv)\" direction=\"in\"/>\n" \
|
||||||
" </method>\n" \
|
" </method>\n" \
|
||||||
" <property name=\"Id\" type=\"s\" access=\"read\"/>\n" \
|
" <property name=\"Id\" type=\"s\" access=\"read\"/>\n" \
|
||||||
|
|
|
@ -2675,7 +2675,7 @@ static int drop_in_file(Unit *u, UnitSetPropertiesMode mode, const char *name, c
|
||||||
if (!p)
|
if (!p)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
q = strjoin(p, "/50-", name, ".conf", NULL);
|
q = strjoin(p, "/90-", name, ".conf", NULL);
|
||||||
if (!q) {
|
if (!q) {
|
||||||
free(p);
|
free(p);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -2733,9 +2733,9 @@ int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name) {
|
||||||
|
|
||||||
r = drop_in_file(u, mode, name, &p, &q);
|
r = drop_in_file(u, mode, name, &p, &q);
|
||||||
if (unlink(q) < 0)
|
if (unlink(q) < 0)
|
||||||
r = -errno;
|
r = errno == ENOENT ? 0 : -errno;
|
||||||
else
|
else
|
||||||
r = 0;
|
r = 1;
|
||||||
|
|
||||||
rmdir(p);
|
rmdir(p);
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Reference in New Issue