diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-15 11:44:30 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-15 11:46:18 +0000 |
commit | c4bc9ea6dca37b8adc522df24649f7081e26777a (patch) | |
tree | b1688f154179439067c489137ad6189666ebe9ed /main/openrc | |
parent | 8df570d9915181c49b21f33244fa21bf970b4002 (diff) | |
download | aports-c4bc9ea6dca37b8adc522df24649f7081e26777a.tar.bz2 aports-c4bc9ea6dca37b8adc522df24649f7081e26777a.tar.xz |
main/openrc: fix starting service in boot runlevel
upstream issue: https://github.com/OpenRC/openrc/issues/54
Diffstat (limited to 'main/openrc')
-rw-r--r-- | main/openrc/APKBUILD | 6 | ||||
-rw-r--r-- | main/openrc/rc-pull-in-sysinit-and-boot-as-stacked-levels-when-needed.patch | 67 |
2 files changed, 72 insertions, 1 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD index 68b239d200..75f3d9127e 100644 --- a/main/openrc/APKBUILD +++ b/main/openrc/APKBUILD @@ -2,7 +2,7 @@ pkgname=openrc pkgver=0.15.1 _ver=${pkgver/_git*/} -pkgrel=1 +pkgrel=2 pkgdesc="OpenRC manages the services, startup and shutdown of a host" url="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git" arch="all" @@ -19,6 +19,7 @@ source="openrc-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgver. swap-umount-tmpfs.patch swap-ifexists.patch hide-migrate-to-run-error.patch + rc-pull-in-sysinit-and-boot-as-stacked-levels-when-needed.patch hostname.initd hwdrivers.initd @@ -72,6 +73,7 @@ f78b02ad9e4f211eb4740a1d6ddfb7ee 0001-sysctl.Linux.in-fix-for-busybox-sysctl.pa c2af5e52da614a6cef02d1e4d537e360 swap-umount-tmpfs.patch 1c426b84d13a725ad493647b5253f239 swap-ifexists.patch 679c559aa54f9e855cd735866eeaaad6 hide-migrate-to-run-error.patch +db45dc04a50d48a0c377e9de3ee0008b rc-pull-in-sysinit-and-boot-as-stacked-levels-when-needed.patch 2c9cf86959b9e51e662036b4e716617e hostname.initd 887eba592d487d6ffe2b42cfcd2813df hwdrivers.initd 41974f5408fd2e92892f891b58f2e49f keymaps.initd @@ -86,6 +88,7 @@ e869e2076c10a7134f5d9e4ae4a5d09ca35c6333d400556f1e329170d2e58066 0001-Force-roo 84d67ed2cf050e20f52d4ea048e7452e78356ba02b396d8c064a4458c0811ea4 swap-umount-tmpfs.patch 8978b00492d90b573f5254cc394582e8f1a5cd8b4d6c928fa0a9a022dd17fe9c swap-ifexists.patch 786580df90a5a75087e5adfd395d160dee2df4b994e0938e8524198aeaf2d774 hide-migrate-to-run-error.patch +cb4ff88875c0125b68fe567cc41b42743499bbdc90a5c9dfe2b92883b5b05111 rc-pull-in-sysinit-and-boot-as-stacked-levels-when-needed.patch e23db45e9399dab96d6c922af6c0cd6c243bbcc43756c845b70a9c7222a96313 hostname.initd 6cb4d9ea3ad562bcf2697f61f5a76a10481d23f5dead570f82eff576eaca5236 hwdrivers.initd 32562d39ade4092df8163c2e8cf0b31eeec06aa5713d343e1c487bfa6d9f7c84 keymaps.initd @@ -100,6 +103,7 @@ eee27fbf72776fb70d3aa6c6464180731d522191e5755aa431ab09ea11dd11bf001a95618adcaa5c 8fd442d372401740b1c523367c928f49efa8179604aac2b517cdc4264daf303056d5a5e0a2c996db5e6ef9b7cdd0619a16cfabc15c3399e322384844e2a36542 swap-umount-tmpfs.patch c5b8806c693b0ea48ff87e0e3669304f5c2f95954ad54814889047a933f367081a8c8d3bb771dd1ed6c3bc845df894232bd6b662066d09eba3abf3964187d1d1 swap-ifexists.patch 750e3305913d3f6fa6baa0b34b851fe17aacb922e864b95ec9b4b451e8e3c16d0c10686a12f4c7cb9b5d05894e1d89b0dac3beed19b1223d3fbc672f25769145 hide-migrate-to-run-error.patch +a3c2f419a3d475519cc8f78bd3baa26cae90a492a5fc92308b18931889db10452aa33324cca8489058d2bcf720e67ab9163ada090d3d3f54ab55dbd758901d4a rc-pull-in-sysinit-and-boot-as-stacked-levels-when-needed.patch a6e2b44dd548a2470971a44b61ddaaec037438050fe3411b4ea3fe5d36e9ad4cf5b5e226f8d4aacb8f3a4535bb3f2090608275abd76a30de33eb3fadaefad5fd hostname.initd b51d95df7b692aaea3e14ed009d99b46b82500d505e2eeecb6a20136cee140aea4a7377a65ccc5c51fff64be7a50666be48616d179888eaeff9d35178a7a772b hwdrivers.initd 584ecbbcecb284527d7616790b6e337ace610e4b3cedf2993eca294bfbef54674aeaee3078b6c17d746a0c48b5a64a813c3534136915947e6f62a6fa206cd3ca keymaps.initd diff --git a/main/openrc/rc-pull-in-sysinit-and-boot-as-stacked-levels-when-needed.patch b/main/openrc/rc-pull-in-sysinit-and-boot-as-stacked-levels-when-needed.patch new file mode 100644 index 0000000000..b8776553a1 --- /dev/null +++ b/main/openrc/rc-pull-in-sysinit-and-boot-as-stacked-levels-when-needed.patch @@ -0,0 +1,67 @@ +From fbbad65b293c2254edcdfab0171bbe204464d503 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 14 May 2015 18:52:07 +0000 +Subject: [PATCH] rc: pull in sysinit and boot as stacked levels when needed + +We need start services from sysinit and boot runlevel, even if the new +runlevel is empty. + +This fixes problem introduced with commit 7716bf31 (Fix stacked runlevel +support), at which the start_services list are no longer used to start +the services. + +This also make sure that all services in sysinit and boot runlevels are +started before switching to next. This was not guaranteed when switching +to a non-empty runlevel. + +Fixes issue #54. +--- + src/rc/rc.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/rc/rc.c b/src/rc/rc.c +index dd35482..4edb539 100644 +--- a/src/rc/rc.c ++++ b/src/rc/rc.c +@@ -757,6 +757,7 @@ main(int argc, char **argv) + static RC_STRINGLIST *types_n; + static RC_STRINGLIST *types_nua; + static RC_DEPTREE *deptree; ++ RC_STRINGLIST *runlevel_chain; + RC_STRINGLIST *deporder = NULL; + RC_STRINGLIST *tmplist; + RC_STRING *service; +@@ -1016,6 +1017,7 @@ main(int argc, char **argv) + hotplugged_services = rc_services_in_state(RC_SERVICE_HOTPLUGGED); + start_services = rc_services_in_runlevel_stacked(newlevel ? + newlevel : runlevel); ++ runlevel_chain = rc_runlevel_stacks(newlevel ? newlevel : runlevel); + if (strcmp(newlevel ? newlevel : runlevel, RC_LEVEL_SHUTDOWN) != 0 && + strcmp(newlevel ? newlevel : runlevel, RC_LEVEL_SYSINIT) != 0) + { +@@ -1033,6 +1035,7 @@ main(int argc, char **argv) + tmplist = rc_services_in_runlevel(bootlevel); + TAILQ_CONCAT(start_services, tmplist, entries); + free(tmplist); ++ rc_stringlist_add(runlevel_chain, bootlevel); + } + if (hotplugged_services) { + TAILQ_FOREACH(service, hotplugged_services, +@@ -1041,6 +1044,7 @@ main(int argc, char **argv) + service->value); + } + } ++ rc_stringlist_add(runlevel_chain, RC_LEVEL_SYSINIT); + } + + parallel = rc_conf_yesno("rc_parallel"); +@@ -1097,9 +1101,6 @@ main(int argc, char **argv) + + /* If we have a list of services to start then... */ + if (start_services) { +- /* Get a list of the chained runlevels which compose the target runlevel */ +- RC_STRINGLIST *runlevel_chain = rc_runlevel_stacks(runlevel); +- + /* Loop through them in reverse order. */ + RC_STRING *rlevel; + TAILQ_FOREACH_REVERSE(rlevel, runlevel_chain, rc_stringlist, entries) |