98 | 98 |
fi
|
99 | 99 |
|
100 | 100 |
while [ -n "$1" ]; do
|
101 | |
@@ -258,7 +258,12 @@
|
|
101 |
@@ -258,7 +263,12 @@ while [ -n "$1" ]; do
|
102 | 102 |
_depend
|
103 | 103 |
cd /
|
104 | 104 |
continue
|
|
124 | 124 |
SUBDIR+= tools
|
125 | 125 |
--- a/src/librc/librc-depend.c
|
126 | 126 |
+++ b/src/librc/librc-depend.c
|
127 | |
@@ -1549,14 +1549,6 @@ rc_deptree_update(void)
|
|
127 |
@@ -1549,14 +1549,6 @@ rc_deptree_update(RC_DT_FLAGS flags)
|
128 | 128 |
strcmp(depend, service) == 0)
|
129 | 129 |
continue;
|
130 | 130 |
|
|
265 | 265 |
+exit 0
|
266 | 266 |
--- /dev/null
|
267 | 267 |
+++ b/src/lsb2rcconf/main.c
|
268 | |
@@ -0,0 +1,654 @@
|
|
268 |
@@ -0,0 +1,642 @@
|
269 | 269 |
+/*
|
270 | 270 |
+ lsb2rcconf - prints configuration for openrc's rc.conf based on LSB
|
271 | 271 |
+
|
|
318 | 318 |
+#include <unistd.h> /* access() */
|
319 | 319 |
+
|
320 | 320 |
+#include "../includes/helpers.h"
|
321 | |
+
|
322 | |
+
|
323 | |
+#define SERVICENAME_ALL "_all"
|
324 | 321 |
+
|
325 | 322 |
+/* === portability hacks === */
|
326 | 323 |
+
|
|
423 | 420 |
+ int *relation_count_p;
|
424 | 421 |
+ int relation_max;
|
425 | 422 |
+ hsearch_data_t *relation_ht_p;
|
426 | |
+ char relation_has_all; /* did we met "$all" virtual services or not */
|
427 | 423 |
+};
|
428 | 424 |
+
|
429 | 425 |
+#define RELATION(relation_name)\
|
|
490 | 486 |
+ switch (*service) {
|
491 | 487 |
+ case '$': {
|
492 | 488 |
+ service++;
|
493 | |
+
|
494 | |
+ if (!arg_p->relation_has_all)
|
495 | |
+ arg_p->relation_has_all = (strcmp(service, "all") == 0);
|
496 | |
+
|
497 | 489 |
+ const char *const services = lsb_v2s(service);
|
498 | 490 |
+ if (services != NULL) {
|
499 | 491 |
+ void relation_add_mark_real_service(char *service, void *arg) {
|
|
650 | 642 |
+{
|
651 | 643 |
+ /* Hardcoded: */
|
652 | 644 |
+ ENTRY entries_v2s[] = {
|
653 | |
+ {"all", "+"SERVICENAME_ALL},
|
654 | |
+ {NULL, NULL},
|
|
645 |
+ {"all", "+*"},
|
|
646 |
+ {NULL, NULL},
|
655 | 647 |
+ };
|
656 | 648 |
+ ENTRY entries_s2v[] = {
|
657 | |
+ {SERVICENAME_ALL, "all"},
|
658 | |
+ {NULL, NULL},
|
|
649 |
+ {"*", "all"},
|
|
650 |
+ {NULL, NULL},
|
659 | 651 |
+ };
|
660 | 652 |
+
|
661 | 653 |
+
|
|
847 | 839 |
+
|
848 | 840 |
+l_lsb_parse_end:
|
849 | 841 |
+
|
850 | |
+ if (state == LP_COMPLETE)
|
851 | |
+ if (! (use_arg.relation_has_all || need_arg.relation_has_all))
|
852 | |
+ PROVIDE(SERVICENAME_ALL);
|
853 | |
+
|
854 | 842 |
+ fclose(file_initdscript);
|
855 | 843 |
+ return state;
|
856 | 844 |
+}
|