chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
read-ahead: Fix broken systemd-readahead-collect on mips.
[elogind.git]
/
src
/
service.c
diff --git
a/src/service.c
b/src/service.c
index 85175793428f77b8d7ac8261a40dc11490329e82..0f28312b380dc6c549e020fecc43e4aee76fe680 100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-35,13
+35,12
@@
#include "special.h"
#include "bus-errors.h"
#include "exit-status.h"
#include "special.h"
#include "bus-errors.h"
#include "exit-status.h"
-
-#define COMMENTS "#;\n"
-#define NEWLINES "\n\r"
+#include "def.h"
+#include "util.h"
#ifdef HAVE_SYSV_COMPAT
#ifdef HAVE_SYSV_COMPAT
-#define DEFAULT_SYSV_TIMEOUT_USEC (
3
*USEC_PER_MINUTE)
+#define DEFAULT_SYSV_TIMEOUT_USEC (
5
*USEC_PER_MINUTE)
typedef enum RunlevelType {
RUNLEVEL_UP,
typedef enum RunlevelType {
RUNLEVEL_UP,
@@
-275,7
+274,13
@@
static int sysv_translate_facility(const char *name, const char *filename, char
static const char * const table[] = {
/* LSB defined facilities */
"local_fs", SPECIAL_LOCAL_FS_TARGET,
static const char * const table[] = {
/* LSB defined facilities */
"local_fs", SPECIAL_LOCAL_FS_TARGET,
+#ifndef TARGET_MANDRIVA
+ /* Due to unfortunate name selection in Mandriva,
+ * $network is provided by network-up which is ordered
+ * after network which actually starts interfaces.
+ * To break the loop, just ignore it */
"network", SPECIAL_NETWORK_TARGET,
"network", SPECIAL_NETWORK_TARGET,
+#endif
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
@@
-345,9
+350,7
@@
static int sysv_translate_facility(const char *name, const char *filename, char
return -ENOMEM;
finish:
return -ENOMEM;
finish:
-
- if (_r)
- *_r = r;
+ *_r = r;
return 1;
}
return 1;
}
@@
-837,7
+840,7
@@
static int service_load_sysv_path(Service *s, const char *path) {
if (description) {
char *d;
if (description) {
char *d;
- if (!(d = strappend(
"LSB
: ", description))) {
+ if (!(d = strappend(
s->sysv_has_lsb ? "LSB: " : "SYSV
: ", description))) {
r = -ENOMEM;
goto finish;
}
r = -ENOMEM;
goto finish;
}
@@
-1655,7
+1658,7
@@
static int service_spawn(
}
if (set_notify_socket)
}
if (set_notify_socket)
- if (asprintf(our_env + n_env++, "NOTIFY_SOCKET=
@
%s", s->meta.manager->notify_socket) < 0) {
+ if (asprintf(our_env + n_env++, "NOTIFY_SOCKET=%s", s->meta.manager->notify_socket) < 0) {
r = -ENOMEM;
goto fail;
}
r = -ENOMEM;
goto fail;
}