aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2013-04-24 09:30:58 +0100
committerStuart Shelton <stuart@shelton.me>2013-04-24 09:30:58 +0100
commite994d89698f233447d7c190758da0aad58318807 (patch)
tree62b74090901938f1461e433f944179f330102ad9 /sys-apps
parentAdd baselayout-2.2.ebuild (diff)
parentRemove github README.md (diff)
downloadsrcshelton-e994d89698f233447d7c190758da0aad58318807.tar.gz
srcshelton-e994d89698f233447d7c190758da0aad58318807.tar.bz2
srcshelton-e994d89698f233447d7c190758da0aad58318807.zip
Merge branch 'master' of git+ssh://alexandria.seventytwo.miltonroad.net/storage/src/github/gentoo-ebuilds
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/busybox/Manifest34
-rw-r--r--sys-apps/busybox/busybox-1.20.2.ebuild291
-rw-r--r--sys-apps/busybox/files/busybox-1.19.0-bb.patch22
-rw-r--r--sys-apps/busybox/files/busybox-1.19.3-getty.patch12
-rw-r--r--sys-apps/busybox/files/busybox-1.19.3-kernel-nfs.patch121
-rw-r--r--sys-apps/busybox/files/busybox-1.19.3-modinfo.patch10
-rw-r--r--sys-apps/busybox/files/busybox-1.20.0-buildsys.patch11
-rw-r--r--sys-apps/busybox/files/busybox-1.20.0-getty.patch17
-rw-r--r--sys-apps/busybox/files/busybox-1.20.0-lineedit.patch22
-rw-r--r--sys-apps/busybox/files/busybox-1.20.0-sed.patch29
-rw-r--r--sys-apps/busybox/files/busybox-1.20.0-udhcpc6-ipv6.patch33
-rw-r--r--sys-apps/busybox/files/busybox-1.20.2-glibc-sys-resource.patch109
-rw-r--r--sys-apps/busybox/files/busybox-1.20.2-selinux-pkg-config.patch67
-rw-r--r--sys-apps/busybox/files/busybox-1.21.0-mdev.patch35
-rw-r--r--sys-apps/busybox/files/busybox-1.21.0-platform.patch24
-rw-r--r--sys-apps/busybox/files/busybox-1.21.0-xz.patch84
-rw-r--r--sys-apps/busybox/files/ginit.c124
-rw-r--r--sys-apps/busybox/files/klogd.confd9
-rw-r--r--sys-apps/busybox/files/klogd.initd12
-rwxr-xr-xsys-apps/busybox/files/mdev-start.sh125
-rw-r--r--sys-apps/busybox/files/mdev.conf105
-rwxr-xr-xsys-apps/busybox/files/mdev.rc9
-rwxr-xr-xsys-apps/busybox/files/mdev.rc.198
-rw-r--r--sys-apps/busybox/files/mdev/dvbdev18
-rw-r--r--sys-apps/busybox/files/mdev/ide_links23
-rwxr-xr-xsys-apps/busybox/files/mdev/usb78
-rw-r--r--sys-apps/busybox/files/mdev/usbdev62
-rw-r--r--sys-apps/busybox/files/mdev/usbdisk_link34
-rw-r--r--sys-apps/busybox/files/ntpd.confd6
-rw-r--r--sys-apps/busybox/files/ntpd.initd13
-rw-r--r--sys-apps/busybox/files/syslogd.confd9
-rw-r--r--sys-apps/busybox/files/syslogd.initd13
-rw-r--r--sys-apps/busybox/files/watchdog.confd9
-rw-r--r--sys-apps/busybox/files/watchdog.initd12
34 files changed, 1680 insertions, 0 deletions
diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
new file mode 100644
index 00000000..bc36fdbc
--- /dev/null
+++ b/sys-apps/busybox/Manifest
@@ -0,0 +1,34 @@
+AUX busybox-1.19.0-bb.patch 908 SHA256 98f92c2edbcf61d1bacef783ea8b08cce07051b0a4489ed3f4579296846f89f1 SHA512 d4024e531ce7113cf554646608b1ef356e51691e3e21d165621b3690c82b56a319867b90d9daba548b635d9dbd41be5efea63181b7123d4505e529d863a8214c WHIRLPOOL b0d6d9b08ad0930e5243c7addc8a6db61505e95ed8e72c64fbfd734cb6ff9e303b3eb8ea6ec4790b2be567783664230cf278eb3e673fa0844c3881cf993f7cb8
+AUX busybox-1.19.3-getty.patch 323 SHA256 6afda2e44b184a00dbffb5aac2c0e73b6fadbca24b2accbfac9c9ec8b56efe67 SHA512 ccb34bd7d929a20e01a1ecf45ca5c0378b1459c8d14c0a3d5ad731d0def71943e5d9169921f30d166dd1269fafeb00dbb6494e2a2d960e09239a29e6d6e03ee9 WHIRLPOOL 8ca140ad8d01753a060cf5b1fec70859729ed70a62bda5d9959085a6b27afed39c91f252e46fa98af5ef0e4f40e5a67d64056d3dd126ca07df9ed044a4ba8427
+AUX busybox-1.19.3-kernel-nfs.patch 3879 SHA256 c8f9aacfe7264a3585210fd1bca93c7cc9b2b99fcd847cf29097eccfd06a6980 SHA512 b9360f110808a841f2d7eb1ed3a08dc081af1a4a15e9038ba6f1262b4567e66f951460f59d7b18da30a9e8afc9ea048bae19b686c41b002c36259da4acada21c WHIRLPOOL 33ef6fd082a78d585bd43e7ba111548206a9ec2f6d3f49e5e8fe723fda9add99f8980c964ac6d25c3e51bf7a28d6d52fc1b02d345244c6650e87448b43cde895
+AUX busybox-1.19.3-modinfo.patch 283 SHA256 62fdafc82ad8396459ba35b18974d87c875cede65f7b1329db0eb3361ba09474 SHA512 2529623c07db870116e63d6200170e520f80aff7756c122d5ea8d8bab450655730843b88f03aaf44096a76744d25ad25115702175f77c8688b6ff336e6577f3d WHIRLPOOL 747e3280dd2438acdbbac3fda06a0ec3dbf9ae662abd4891385ec9ab915f55d78f7570fdc2d55405b5bb72b1a420afc6e29eff5d8df7c40728b393913baf24dd
+AUX busybox-1.20.0-buildsys.patch 695 SHA256 2162c1d21dc9199fc8e547385bdc64fe3fc3cfbdbda76708ec40be7f49d46551 SHA512 936992d9916c6e759c11f5bfb727869f106c1841bfec9287d5c666309b1ba52731ffc3518e433b2d4743037b1ee61af8724f0def6f223dcf17d2fd6c9bb8a2d6 WHIRLPOOL 0a546c09be946fbf5c1015b765f71922da003eaf03f29d0a74cb7bcc6a2843249fbc8758aa8c3cf0447cd3c9c4969d624877b4e82216b2ba48c99a047bb9b2fb
+AUX busybox-1.20.0-getty.patch 477 SHA256 9fad6e4652b61f387cf4595ef151667cdea3fb470a23b8f7771ed51550ee100e SHA512 a35076b03aa76f5abd3e27428e20365b079e26964fb7e7489aed1a3554f0b8d95cb8c2aac5ed0a7ebd07826b6eaa95ffe7c9774d3d1a5ce870f1336841ae24ac WHIRLPOOL b64facafb33677fa35ac11c0eb86b319cedb34a9fffc616eab8d21c39a3c5feb1bf7ede72d84adedd9721609943f8c8723f4a50e11284c3a11ac2b0475daa28f
+AUX busybox-1.20.0-lineedit.patch 768 SHA256 f52874c75c2bf1ec5a101a1da111ec31fceee6e94ad895deadcbf9a4780503b2 SHA512 d9e9210ac3a37a29af325ccddcec173f6c5c1b3ee09ebe2a316ffa648da9dadb7ad96e91d948a4dfce955e48edf8f5e79f3209245d58200126e0a6a066f7b83a WHIRLPOOL 7b29d2f2ede3fd0a45d9334d33b38ded5d823dc09f2217883303af6523e67c1480932c56eb102047a76a1dbbcaa07a8c85acebee01b052f8643305bfe9d8b011
+AUX busybox-1.20.0-sed.patch 710 SHA256 4d0a7670848967afee436d0692d4395c61677cbef67c2c0d1f44f1878d2ebadd SHA512 e33437060b41ac9593f696ebf739945a7c1dc273c04a7777df97928562abc605df96c560800a96e8fa54a577fc29cc74a149144ff391792c2052ea8ae7790d19 WHIRLPOOL 564c3992c98ffaec93e7ac93a22739f45105429adbb0dc2be768a94d59fdade49616f5ef708f7705f0c4b190d846d1395132dcd6aba02ea8571194e63f94903c
+AUX busybox-1.20.0-udhcpc6-ipv6.patch 998 SHA256 58ac58c6d4e5d9d1d838d2e30f631b4b63a6187fd685d454294bee3646721d54 SHA512 4e506b1b8151aa5511a68c45fe95b7d8617738aed148ee60905fa4239c57d95b1b58cfa1d079be35411e5580936c5397eda34dba3a03290c788891b8cfdc6872 WHIRLPOOL 4cbd680815120425df0e2d955f8f79cf2d9ec516f7d360309feb7044a634408d79db4d967858a56669e9794e87cc8b7eea86597b89ed7507fbff1f21d79aaa61
+AUX busybox-1.20.2-glibc-sys-resource.patch 3054 SHA256 03d64c3b864fc5caa9ec56e3d2bf3bcd43801ee82e27332dbfe412138c9502d7 SHA512 c895d7ad0bf379b3ff1c4114af7f8fe0d53b1e60371ac1faaaf3434c293e125be4d79a6ee17d1aa2a923629b09416b833dd3408b9b4dabf56dd74d630c24e9ff WHIRLPOOL ff3e347035a4eb500762d59e35ff8cd2a91130de1c73b0666331f62fc19c586646fd713814e6712d53449d484fc2479ec0e5c29dfe3a19feb2163350a9171fac
+AUX busybox-1.20.2-selinux-pkg-config.patch 2009 SHA256 09d34cafa860cfabfb6911b087fa5887dd7f8b0026955654904fdb79d5281e76 SHA512 7b9b5cfc890d6c751727c6873df66ada967973786a2056a33e76663358aefe2d5828b366f6ce85b573bc01737426a1019dd2f0177caceef9dfac32904ee01d84 WHIRLPOOL fef2b477065ed309298788e35b82fd77d3297eb52eb59f065ebb9c631ec4a3f849ef99a014bdf682469ee1e8683debc312993faf1ad094e2f9afd8ce99c955aa
+AUX busybox-1.21.0-mdev.patch 1173 SHA256 911371ceff8c6a899323cda8d63a20b5f98d503681e5617b2448b555c4fecc61 SHA512 490a9a85d6df17e0111ad86f420207fed1b699b3b4e9ebe8d6700d4ce33ab3de0e0137dba1326efb5011dbcd53c769448ddab855995c896135ed6adbe61d2e44 WHIRLPOOL 2a302d310a6e82f3aa1c878a14fc4d2b1644d4e724aae1e25c1390cbd3852d252a38c76fd38fc79ee4b08d8f83aa2a442963955fe49486a28c060d1d4b6edc47
+AUX busybox-1.21.0-platform.patch 1227 SHA256 ee7b96577330a68598d4ec48ce94f6eca3079c32a86cca32f3bb6cc28d467654 SHA512 595e1081dcc9f2dca714066c1f59659d7c7e3f702df937c138ff60cf9af42272b71ac354521c3abd26ac406eb07a710c14c4f94e62a293edcd6473ba1fd53675 WHIRLPOOL d18661bccd8f43bc4fcb492013a647480ff4e0e88a1ac8ea9a1a3f176193363bfbd7777589b2796ccdf92315cd80a5d6999a321dafc441f4939546d6272002eb
+AUX busybox-1.21.0-xz.patch 2647 SHA256 c807f73718e836a81ee74987306c72297ddba209038240f81fab96b4a28b73b4 SHA512 696dd31a73bbd919435a3ee1b8cd05769e6c3a45e853e3e052a22b7290bf332cd3b7e17e394911864b3c7ed7f9eea604dfbd7a5c43f0eb1e65b257d679fcccd3 WHIRLPOOL a3be95e60602374daff1629c38556f93b2342d81939afda86613f5fb0af0f7b600656118712ac33237cba230369f622a18502347e1dad0aa3570dc1d0a1725f1
+AUX ginit.c 3091 SHA256 c5a4d5dedf402742611fea7607f0d870a918da06ed5ee98796371e158956ca80 SHA512 70afaa9e7eea9f72b30ad43cbb5e70c2105c735eca888836791c2f289274fcec16545134aca4d7ab3d750bdefe445d0586fc115a6060b509a2e77ed8d37f0f3f WHIRLPOOL 43e925d52d2f05b474834288f82777c481d84fe8904e0390e2f3298cbea55f671706fa79dbc7b570c6d700f53b23667dcec058e397a06b1b1979e350c19b3e9b
+AUX klogd.confd 218 SHA256 737b78745964e110da2fd3357c6d5fb80ccacf979039b8d40c03cf1cb969e5f3 SHA512 3348d5376b368b28d1431692a93868cd4550be12ad729340c5f78da35a5bd295e7613d70ce8ccde5029ad6d87a41c2f24155180f3570de8a9174dd63dece143f WHIRLPOOL ea28c1d926e36fba0ab69de8ddfd2503889b7cfa3a4ada347a9d22d9894fe30be068c0ed55f899b952e62b8de3cb69e1a4209f7864787988ded28ede10c7445a
+AUX klogd.initd 359 SHA256 ef607b72d270797e4be1fba425c23ba26078633c47c698063bd4b17e7b4ff8c3 SHA512 e9d6215e4b0dcc4fbb507ce2bb84c818ad18951282c47c98b0c98b3fa58e6b28218f608689a7786cb0447673ae1f5c3ba5767f9b29cffd73325d93bf2a928ac9 WHIRLPOOL d7e82a0d2a6a60b2444a3b212022250297ca163001045bf508442972fc6330c4eea55cb965920778e090c92a69441e864e6721f02ecc6d10279b6196b14f7e71
+AUX mdev-start.sh 2758 SHA256 9904263c8dfe2b8c3e968a9b4245fa0c162a2413110c037cdd797ac3773587d7 SHA512 532ececdf40769e8059172b95f600c92ddda9490dcf04dc76b11cd669b2b35740aeb02ef7c152a42c13d5adfefb391de01239ebbb4efd06faadc0d096fcde6f5 WHIRLPOOL aace77a07eedfea3ffab029ce25334ff58f512bf5c67512c1f4a40fd51278c2b8b764e55dbf975f74bb4423cfc3f35482a5d3ee8397032fcbf22ad1f91c7c4ea
+AUX mdev.conf 3324 SHA256 09f48cc2320125a9639061af9f02a968f394f1e8af10772186ea1413e9e33e62 SHA512 273166276f0fcab2d2d2a15350aef5f93465344c872e5935485016734653b947346e2e6f5a50c75c21125dd8b38a8d9f1b09a3a684bb158a27145f662646f3b8 WHIRLPOOL c7ac8de98ed99521f784498cdbd497b5835f94c6753c0628e17b32481d9dde0a49cf7a560b8972ad37f2c3279758106e873e408f757608df886ab100cab8f9d7
+AUX mdev.rc 282 SHA256 e52abbc3399fc85ce1f097e8f12b25a5ca7fe2e3d648bee60c061b547ba39dc5 SHA512 b3e5f0810a5e33047ea73c6a4d846087100fb8c566cfa001e07fc0c1448d2024913ac06355122076ec6c79146867af77a02bbc6509b009afa97b5207588da1b9 WHIRLPOOL 2bd20507d115c82076653c6c78899751f8e3b8cde14c81c8f10ef7747ccba867360b463c90b9b3053cd6cb8599f297362153ebbff0dfad90c2fac8f445668320
+AUX mdev.rc.1 2202 SHA256 5235a2cd5e4ce92032a5e3e314c6e2980d98df8a6a387d2cf3e0d30d29f62cd5 SHA512 27435ac949ee351aa957f23a31b08f8689f284449928fba495f9432c893e30cd8ab8f883ee131626310f09e9edc615908484c7402009df3cba3a6eaf137f8afc WHIRLPOOL 54c23164ed320efe654d36656bd4be2be383199c003a57806a850692b38556d4f961b9608c1561f16fa108bac64643ab2270a8a1a5edf8e5d1e24a967f549b76
+AUX mdev/dvbdev 356 SHA256 ef091bb4c8943a99b9a97b556cdc15ddd20275f5afa8287e201419b08c4e71de SHA512 ebd82f935da2ca89097234dd8a8f47e179a423652c151123a1f3343f3e1e7bfaba2b8800380e988d4e8f4294545d3a9ab6708ae2e77c5b108b5f091bbce8f94a WHIRLPOOL ec24a4afe8333e2d4d856fe3853b844d113057daf3fe536a4c8ef481a5ec925254c7daeb09df378922fabb96400440f4bde40979417b7c35467934d7e2235739
+AUX mdev/ide_links 440 SHA256 3fccc9ee437e3dcc8ac73bfe3713334a7156a112fe442e052fff4f26ff0f6a88 SHA512 0142234d0bda86ad1e5f88f1da34669e5fda46a0fd52ce507bd49ce74d2b7c12c323e8db863bccb924e6d632b568db8b243361b217c5b2e1d92a25feb6e62dec WHIRLPOOL ce02358a65ad2beeab12485379e322736c7b6b58ff44a20b880d9bab8806e04890a385b94228f2db685150dfe0a3c716f842ce5c1c7f579c8208ab4e9a6ae852
+AUX mdev/usb 2511 SHA256 2911b4d02d79b56e6f9fc11efc3be5d7088e9deb98a6ccd88be165769380dd84 SHA512 67d334a707a201e928d19da608547af4068babb13243892c2b29f8804334478455f60c03d3597381674c1202d1f7ff4d30cc8a40f3ef35b06e772958d7dd6ec6 WHIRLPOOL ea5a70c3937c94debcd6dbe788e56a7b21acd75e139160d16cf79dd1826d942af53e2c256355fb7198c48b1c609f9bdcd0d7488f32c1584dd16123c3783fb38c
+AUX mdev/usbdev 1625 SHA256 38d9818cf5ab202ce84af9a73036c4b8cce27cccb051be288ce9ad9cf55130fa SHA512 34a9235f35cecba139be9fa1694c77a7ca874e6f18a164019b5c4a5be57d4e50e108ae7e51f65c28c4916d53f6056d999876dee5768ff15f74ae86cec08ff34a WHIRLPOOL 8395ace4b5d35d91d33ac7d623a22fd3b13786ce139f8a60101a5510c343a2288226fed99117e24f347606ab7300b6d3b726713e0666163cc0e24f9507a1bb67
+AUX mdev/usbdisk_link 984 SHA256 4957f6991e0cb988b263b5276b582f1757deecad19cddebe3c615b381df9f858 SHA512 392c40d223bdff59a624bd67907c06cff9c1b5468c25c19e10dbc3cef3208275d93966e760f140d71a86cb36ec796ea08dbaa767b40c12e9326c3c72964b28a8 WHIRLPOOL 439e0c86e312e685bce1f7a4a67f709c4556de69b40112d97d6a376bc7da9d73e794663d06097f721173d97bf4f671ddbb4d0c4838db604e7cd13d2c531ede19
+AUX ntpd.confd 186 SHA256 4bff7f5c66f4eece52e4381fd2706e591f10eb50f3c3a4132344d34150dc54de SHA512 b0ef111ea7dd6a096acf711d2d84a7c3d38e7e8c181f734053d38c565ab44ecf843ef32c0de0c4e7ecec990e97468a2545f83821beedb125cd6723ed74c67ad8 WHIRLPOOL a1b228ae22c61de6ecc7fa58edcd4c3941b3762a45fcc38d05bd1c9428bc553b1a158c101d65a99ba63d4bc19b269e834b3f0eba40a5a1c81e0ae876a2ecb42c
+AUX ntpd.initd 372 SHA256 66266f86f65a5095bdbcba4d8ec5893b086849e4dcf43dab81b2bcc5970f8e35 SHA512 4daec8c17e2d89abc386178ac172092b682b46d74dbb43c20bc9d0723bede720bc7dc5e90c24b33c6a7344d58f0ef43aab2fc331343ba12e69ff5446ac2a1345 WHIRLPOOL 4e92d44c95ae93622c838b4e0221e3d201983b649a50fe6ffceaab020aad7ec88024f66c9d9cbe044345af48bed81a1b985a8ed00df79bdf08045f9394add4b9
+AUX syslogd.confd 234 SHA256 65166088cb173582200b8c0d3bc6ea339b5929dbafa816780bfaf50e3514bc25 SHA512 01a2ecf89c49e3e06dd1b6f6673fca16d0f2dd01ff27c0d609c803bc2c81b5ced8245b6388e48ffa2f05ff4e8c1824af73df6364bbebebc722166447bd412f52 WHIRLPOOL b0a9e82225968d44446025242ac6c9429dc2e01a3720d94349756f71ec3a11c3ff2217bce7c4f1a1ea8a2a8baecd3265c3cce01675138674c05a9f2a96ade2ae
+AUX syslogd.initd 383 SHA256 b66e709317513b79139d5441c712839e271ff5177a3d743b86e39f70906fe2ee SHA512 b6bd8b7cb990c7c9c242baf4b3d20b3351e6ca0054b6d231787540b318ea9ac2332ac97ae4b56d07d2cf9ae52fb9c1644dede47bbfdd9f8bc7727bcfd0da8ed7 WHIRLPOOL 4b7a3e4ad7cc9e07853cc0e43b8f15aa0cb71642afeee89392190ba75d547e156ec4b790f8e35e56851bae01ff3965ef36e9160bf61aae95376c9fa2189f11a7
+AUX watchdog.confd 232 SHA256 786d9497ad55c29d6fff231709e71ecad94f2ee1de3b45b461deb29c3eba1c63 SHA512 8fd7121075535195f3e5d43ec773713c883fb7865cd5e5927b3b20c2605c50acb81d50461bd1a246c1282006ce74b11932ac1cec67ddc2be15da2f9aa8674232 WHIRLPOOL 8ea0f6b759198c978f10bf0b2b00cc73343e72401a05edf257b9c5e1032e8a619328aaa02936b5b5a717a021baa84b5653b8c9826e14e5c07c7b7af98f878767
+AUX watchdog.initd 368 SHA256 9500b556625c4df2b4dd98e6646956709356e463d7df05840b8be7f75d4a88f5 SHA512 98ea3a1334ec9e837dd935fb3b8c62715580ddb51babf6c85e2630f87af4370c63d88c75d0fa0b9ec01007f38016502d3442ee1206368b20cacf0fac6493e791 WHIRLPOOL 6ff235d62ee7008cf46d6cae1c7949d22f6275eb6c8caff96d51ae301f88c531d7f9518728419f27468f8d1be9f63c0c2238c9772cf26439818abe31449cac65
+DIST busybox-1.20.2.tar.bz2 2186738 SHA256 eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882 SHA512 089b67cd920f332daf910711739b1e55ba4c76cfa2122dfe5464432e0d76d3af8327837ebc3cc9954deef3e8f766d16a1928aecb2c169fe3de5a722eea7ea3dd WHIRLPOOL aa8fec92d0ac8bb246dea7353537d425a5fecfa0bb807d0e291c7351e8289b84aab83303c45b75f9b7a98cd10177e210511064f0709425c2f84b069fe6a06420
+EBUILD busybox-1.20.2.ebuild 8685 SHA256 f0841c513ad012029711535ba65b270e2e5be5a4e4536f1097b6a21839489278 SHA512 00cb862b18bf497b335805d47fbe573bb7e1506a33384fbf028604e9c556a4e5f646d0eacd6c4bf4cc9718d79c67c1c7f70bc163963e388812d0081c7bd624af WHIRLPOOL 3cbaa48b99e863b44536f53e674c8053f1dcc4cd8786b651ee9ea8b6b5cca2e064222dbcc80d3faf66ead68b914f4f695fad8df2693b4117e503731e612abdc4
diff --git a/sys-apps/busybox/busybox-1.20.2.ebuild b/sys-apps/busybox/busybox-1.20.2.ebuild
new file mode 100644
index 00000000..38e6d595
--- /dev/null
+++ b/sys-apps/busybox/busybox-1.20.2.ebuild
@@ -0,0 +1,291 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.20.2.ebuild,v 1.12 2012/11/02 18:59:14 vapier Exp $
+
+EAPI="4"
+inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
+
+################################################################################
+# BUSYBOX ALTERNATE CONFIG MINI-HOWTO
+#
+# Busybox can be modified in many different ways. Here's a few ways to do it:
+#
+# (1) Emerge busybox with FEATURES=keepwork so the work directory won't
+# get erased afterwards. Add a definition like ROOT=/my/root/path to the
+# start of the line if you're installing to somewhere else than the root
+# directory. This command will save the default configuration to
+# ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not
+# defined), and it will tell you that it has done this. Note the location
+# where the config file was saved.
+#
+# FEATURES=keepwork USE=savedconfig emerge busybox
+#
+# (2) Go to the work directory and change the configuration of busybox using its
+# menuconfig feature.
+#
+# cd /var/tmp/portage/busybox*/work/busybox-*
+# make menuconfig
+#
+# (3) Save your configuration to the default location and copy it to the
+# one of the locations listed in /usr/portage/eclass/savedconfig.eclass
+#
+# (4) Emerge busybox with USE=savedconfig to use the configuration file you
+# just generated.
+#
+################################################################################
+#
+# (1) Alternatively skip the above steps and simply emerge busybox without
+# USE=savedconfig.
+#
+# (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF}
+#
+# (3) Remerge busybox as using USE=savedconfig.
+#
+################################################################################
+
+DESCRIPTION="Utilities for rescue and embedded systems"
+HOMEPAGE="http://www.busybox.net/"
+if [[ ${PV} == "9999" ]] ; then
+ MY_P=${PN}
+ EGIT_REPO_URI="git://busybox.net/busybox.git"
+ inherit git-2
+else
+ MY_P=${PN}-${PV/_/-}
+ SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ipv6 livecd make-symlinks math +mdev -pam selinux sep-usr +static systemd"
+RESTRICT="test"
+
+RDEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
+ pam? ( sys-libs/pam )"
+DEPEND="${RDEPEND}
+ static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
+ >=sys-kernel/linux-headers-2.6.39"
+
+S=${WORKDIR}/${MY_P}
+
+busybox_config_option() {
+ case $1 in
+ y) sed -i -e "s:.*\<CONFIG_$2\>.*set:CONFIG_$2=y:g" .config;;
+ n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;;
+ *) use $1 \
+ && busybox_config_option y $2 \
+ || busybox_config_option n $2
+ return 0
+ ;;
+ esac
+ einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...)
+}
+
+src_prepare() {
+ unset KBUILD_OUTPUT #88088
+ append-flags -fno-strict-aliasing #310413
+ use ppc64 && append-flags -mminimal-toc #130943
+
+ # patches go here!
+ epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
+ epatch "${FILESDIR}"/${PN}-1.20.0-udhcpc6-ipv6.patch
+ epatch "${FILESDIR}"/${P}-*.patch
+ cp "${FILESDIR}"/ginit.c init/ || die
+
+ # flag cleanup
+ sed -i -r \
+ -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
+ Makefile.flags || die
+ #sed -i '/bbsh/s:^//::' include/applets.h
+ sed -i '/^#error Aborting compilation./d' applets/applets.c || die
+ use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
+ sed -i \
+ -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
+ -e "/^AR\>/s:=.*:= $(tc-getAR):" \
+ -e "/^CC\>/s:=.*:= $(tc-getCC):" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
+ Makefile || die
+ sed -i \
+ -e 's:-static-libgcc::' \
+ Makefile.flags || die
+}
+
+src_configure() {
+ # check for a busybox config before making one of our own.
+ # if one exist lets return and use it.
+
+ restore_config .config
+ if [ -f .config ]; then
+ yes "" | emake -j1 oldconfig > /dev/null
+ return 0
+ else
+ ewarn "Could not locate user configfile, so we will save a default one"
+ fi
+
+ # setup the config file
+ emake -j1 allyesconfig > /dev/null
+ # nommu forces a bunch of things off which we want on #387555
+ busybox_config_option n NOMMU
+ sed -i '/^#/d' .config
+ yes "" | emake -j1 oldconfig >/dev/null
+
+ # now turn off stuff we really don't want
+ busybox_config_option n DMALLOC
+ busybox_config_option n FEATURE_SUID_CONFIG
+ busybox_config_option n BUILD_AT_ONCE
+ busybox_config_option n BUILD_LIBBUSYBOX
+ busybox_config_option n FEATURE_CLEAN_UP
+ busybox_config_option n MONOTONIC_SYSCALL
+ busybox_config_option n USE_PORTABLE_CODE
+ busybox_config_option n WERROR
+
+ # If these are not set and we are using a uclibc/busybox setup
+ # all calls to system() will fail.
+ busybox_config_option y ASH
+ busybox_config_option n HUSH
+
+ # disable ipv6 applets
+ if ! use ipv6; then
+ busybox_config_option n FEATURE_IPV6
+ busybox_config_option n TRACEROUTE6
+ busybox_config_option n PING6
+ fi
+
+ if use static && use pam ; then
+ ewarn "You cannot have USE='static pam'. Assuming static is more important."
+ fi
+ busybox_config_option $(usex static n pam) PAM
+ busybox_config_option static STATIC
+ busybox_config_option systemd FEATURE_SYSTEMD
+ busybox_config_option math FEATURE_AWK_LIBM
+
+ # all the debug options are compiler related, so punt them
+ busybox_config_option n DEBUG
+ busybox_config_option y NO_DEBUG_LIB
+ busybox_config_option n DMALLOC
+ busybox_config_option n EFENCE
+
+ busybox_config_option selinux SELINUX
+
+ # this opt only controls mounting with <linux-2.6.23
+ busybox_config_option n FEATURE_MOUNT_NFS
+
+ # default a bunch of uncommon options to off
+ local opt
+ for opt in \
+ ADD_SHELL \
+ BEEP BOOTCHARTD \
+ CRONTAB \
+ DC DEVFSD DNSD DPKG{,_DEB} \
+ FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
+ FEATURE_DEVFS \
+ HOSTID HUSH \
+ INETD INOTIFYD IPCALC \
+ LOCALE_SUPPORT LOGNAME LPD \
+ MAKEMIME MKFS_MINIX MSH \
+ OD \
+ RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
+ SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
+ TASKSET TCPSVD \
+ RPM RPM2CPIO \
+ UDPSVD UUDECODE UUENCODE
+ do
+ busybox_config_option n ${opt}
+ done
+
+ emake -j1 oldconfig > /dev/null
+}
+
+src_compile() {
+ unset KBUILD_OUTPUT #88088
+ export SKIP_STRIP=y
+
+ emake V=1 busybox
+}
+
+src_install() {
+ unset KBUILD_OUTPUT #88088
+ save_config .config
+
+ into /
+ dodir /bin
+ if use sep-usr ; then
+ # install /ginit to take care of mounting stuff
+ exeinto /
+ newexe busybox_unstripped ginit
+ dosym /ginit /bin/bb
+ dosym bb /bin/busybox
+ else
+ newbin busybox_unstripped busybox
+ dosym busybox /bin/bb
+ fi
+ if use mdev ; then
+ dodir /$(get_libdir)/mdev/
+ use make-symlinks || dosym /bin/bb /sbin/mdev
+ cp "${FILESDIR}"/mdev.conf "${ED}"/etc/mdev.conf
+
+ exeinto /$(get_libdir)/mdev/
+ doexe "${FILESDIR}"/mdev/*
+
+ newinitd "${FILESDIR}"/mdev.rc.1 mdev
+ fi
+ if use livecd ; then
+ dosym busybox /bin/vi
+ fi
+
+ # bundle up the symlink files for use later
+ emake DESTDIR="${ED}" install
+ rm _install/bin/busybox
+ tar cf busybox-links.tar -C _install . || : #;die
+ insinto /usr/share/${PN}
+ use make-symlinks && doins busybox-links.tar
+
+ dodoc AUTHORS README TODO
+
+ cd docs
+ docinto txt
+ dodoc *.txt
+ docinto pod
+ dodoc *.pod
+ dohtml *.html
+
+ cd ../examples
+ docinto examples
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm
+}
+
+pkg_preinst() {
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
+ ewarn "If you are creating a binary only and not merging this is probably ok."
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
+ die "silly options will destroy your system"
+ fi
+
+ if use make-symlinks ; then
+ mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
+ fi
+}
+
+pkg_postinst() {
+ savedconfig_pkg_postinst
+
+ if use make-symlinks ; then
+ cd "${T}" || die
+ mkdir _install
+ tar xf busybox-links.tar -C _install || die
+ cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
+ fi
+
+ if use sep-usr ; then
+ elog "In order to use the sep-usr support, you have to update your"
+ elog "kernel command line. Add the option:"
+ elog " init=/ginit"
+ elog "To launch a different init than /sbin/init, use:"
+ elog " init=/ginit /sbin/yourinit"
+ elog "To get a rescue shell, you may boot with:"
+ elog " init=/ginit bb"
+ fi
+}
diff --git a/sys-apps/busybox/files/busybox-1.19.0-bb.patch b/sys-apps/busybox/files/busybox-1.19.0-bb.patch
new file mode 100644
index 00000000..a66b45a5
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.19.0-bb.patch
@@ -0,0 +1,22 @@
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -75,6 +75,8 @@
+ //applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP))
+ //applet:IF_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, sh))
+ //applet:IF_FEATURE_BASH_IS_ASH(APPLET_ODDNAME(bash, ash, BB_DIR_BIN, BB_SUID_DROP, bash))
++//applet:IF_ASH(APPLET_ODDNAME(bb, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
++//applet:IF_ASH(APPLET_ODDNAME(bbsh, ash, BB_DIR_BIN, BB_SUID_DROP, ash))
+
+ //kbuild:lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o shell_common.o
+ //kbuild:lib-$(CONFIG_ASH_RANDOM_SUPPORT) += random.o
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -7255,6 +7255,8 @@
+ }
+ /* re-exec ourselves with the new arguments */
+ execve(bb_busybox_exec_path, argv, envp);
++ execve("/bin/busybox.static", argv, envp);
++ execve("/bin/busybox", argv, envp);
+ /* If they called chroot or otherwise made the binary no longer
+ * executable, fall through */
+ }
diff --git a/sys-apps/busybox/files/busybox-1.19.3-getty.patch b/sys-apps/busybox/files/busybox-1.19.3-getty.patch
new file mode 100644
index 00000000..84dad6f1
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.19.3-getty.patch
@@ -0,0 +1,12 @@
+--- busybox-1.19.3/loginutils/getty.c
++++ busybox-1.19.3-getty/loginutils/getty.c
+@@ -271,7 +271,9 @@ static void termios_init(int speed)
+ #ifdef CMSPAR
+ | CMSPAR /* mark or space parity */
+ #endif
++#ifdef CBAUD
+ | CBAUD /* (output) baud rate */
++#endif
+ #ifdef CBAUDEX
+ | CBAUDEX /* (output) baud rate */
+ #endif
diff --git a/sys-apps/busybox/files/busybox-1.19.3-kernel-nfs.patch b/sys-apps/busybox/files/busybox-1.19.3-kernel-nfs.patch
new file mode 100644
index 00000000..70894008
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.19.3-kernel-nfs.patch
@@ -0,0 +1,121 @@
+From a86e02492d7700ce8cb4108f53646dfb025c2dff Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Thu, 10 Nov 2011 16:53:35 +0100
+Subject: [PATCH] mount: make FEATURE_MOUNT_NFS not needed for Linux 2.6.23+
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+---
+ util-linux/Config.src | 11 ++++++++---
+ util-linux/mount.c | 47 +++++++++++++++++++++++++++++++++++++++++------
+ 2 files changed, 49 insertions(+), 9 deletions(-)
+
+diff --git a/util-linux/Config.src b/util-linux/Config.src
+index 888bc8f..57a52ce 100644
+--- a/util-linux/Config.src
++++ b/util-linux/Config.src
+@@ -485,13 +485,18 @@ config FEATURE_MOUNT_LABEL
+ This also enables label or uuid support for swapon.
+
+ config FEATURE_MOUNT_NFS
+- bool "Support mounting NFS file systems"
+- default y
++ bool "Support mounting NFS file systems on Linux < 2.6.23"
++ default n
+ depends on MOUNT
+ select FEATURE_HAVE_RPC
+ select FEATURE_SYSLOG
+ help
+- Enable mounting of NFS file systems.
++ Enable mounting of NFS file systems on Linux kernels prior
++ to version 2.6.23. Note that in this case mounting of NFS
++ over IPv6 will not be possible.
++
++ Note that this option links in RPC support from libc,
++ which is rather large (~10 kbytes on uclibc).
+
+ config FEATURE_MOUNT_CIFS
+ bool "Support mounting CIFS/SMB file systems"
+diff --git a/util-linux/mount.c b/util-linux/mount.c
+index 1dd4c0c..7ae1981 100644
+--- a/util-linux/mount.c
++++ b/util-linux/mount.c
+@@ -1144,7 +1144,7 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
+ pathname = s + 1;
+ *s = '\0';
+ /* Ignore all but first hostname in replicated mounts
+- until they can be fully supported. (mack@sgi.com) */
++ * until they can be fully supported. (mack@sgi.com) */
+ s = strchr(hostname, ',');
+ if (s) {
+ *s = '\0';
+@@ -1683,7 +1683,6 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
+
+ /* Perform actual mount */
+ do_mount:
+- mp->mnt_type = (char*)"nfs";
+ retval = mount_it_now(mp, vfsflags, (char*)&data);
+ goto ret;
+
+@@ -1708,8 +1707,43 @@ static NOINLINE int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
+
+ #else // !ENABLE_FEATURE_MOUNT_NFS
+
+-// Never called. Call should be optimized out.
+-int nfsmount(struct mntent *mp, long vfsflags, char *filteropts);
++/* Linux 2.6.23+ supports nfs mounts with options passed as a string.
++ * For older kernels, you must build busybox with ENABLE_FEATURE_MOUNT_NFS.
++ * (However, note that then you lose any chances that NFS over IPv6 would work).
++ */
++static int nfsmount(struct mntent *mp, long vfsflags, char *filteropts)
++{
++ len_and_sockaddr *lsa;
++ char *opts;
++ char *end;
++ char *dotted;
++ int ret;
++
++# if ENABLE_FEATURE_IPV6
++ end = strchr(mp->mnt_fsname, ']');
++ if (end && end[1] == ':')
++ end++;
++ else
++# endif
++ /* mount_main() guarantees that ':' is there */
++ end = strchr(mp->mnt_fsname, ':');
++
++ *end = '\0';
++ lsa = xdotted2sockaddr(mp->mnt_fsname, /*port:*/ 0);
++ *end = ':';
++ dotted = xmalloc_sockaddr2dotted_noport(&lsa->u.sa);
++ if (ENABLE_FEATURE_CLEAN_UP) free(lsa);
++ opts = xasprintf("%s%saddr=%s",
++ filteropts ? filteropts : "",
++ filteropts ? "," : "",
++ dotted
++ );
++ if (ENABLE_FEATURE_CLEAN_UP) free(dotted);
++ ret = mount_it_now(mp, vfsflags, opts);
++ if (ENABLE_FEATURE_CLEAN_UP) free(opts);
++
++ return ret;
++}
+
+ #endif // !ENABLE_FEATURE_MOUNT_NFS
+
+@@ -1800,10 +1834,11 @@ static int singlemount(struct mntent *mp, int ignore_busy)
+ }
+
+ // Might this be an NFS filesystem?
+- if (ENABLE_FEATURE_MOUNT_NFS
+- && (!mp->mnt_type || strcmp(mp->mnt_type, "nfs") == 0)
++ if ((!mp->mnt_type || strncmp(mp->mnt_type, "nfs", 3) == 0)
+ && strchr(mp->mnt_fsname, ':') != NULL
+ ) {
++ if (!mp->mnt_type)
++ mp->mnt_type = (char*)"nfs";
+ rc = nfsmount(mp, vfsflags, filteropts);
+ goto report_error;
+ }
+--
+1.7.6.1
+
diff --git a/sys-apps/busybox/files/busybox-1.19.3-modinfo.patch b/sys-apps/busybox/files/busybox-1.19.3-modinfo.patch
new file mode 100644
index 00000000..9dd5c103
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.19.3-modinfo.patch
@@ -0,0 +1,10 @@
+--- busybox-1.19.3/modutils/modinfo.c
++++ busybox-1.19.3-modinfo/modutils/modinfo.c
+@@ -13,6 +13,7 @@
+ //config:config MODINFO
+ //config: bool "modinfo"
+ //config: default y
++//config: select PLATFORM_LINUX
+ //config: help
+ //config: Show information about a Linux Kernel module
+
diff --git a/sys-apps/busybox/files/busybox-1.20.0-buildsys.patch b/sys-apps/busybox/files/busybox-1.20.0-buildsys.patch
new file mode 100644
index 00000000..b9d2a5e8
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.20.0-buildsys.patch
@@ -0,0 +1,11 @@
+--- busybox-1.20.0/archival/libarchive/Kbuild.src
++++ busybox-1.20.0-buildsys/archival/libarchive/Kbuild.src
+@@ -60,7 +60,7 @@ lib-$(CONFIG_FEATURE_SEAMLESS_GZ)
+ lib-$(CONFIG_FEATURE_SEAMLESS_BZ2) += open_transformer.o decompress_bunzip2.o
+ lib-$(CONFIG_FEATURE_SEAMLESS_LZMA) += open_transformer.o decompress_unlzma.o
+ lib-$(CONFIG_FEATURE_SEAMLESS_XZ) += open_transformer.o decompress_unxz.o
+-lib-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o
++lib-$(CONFIG_FEATURE_COMPRESS_USAGE) += open_transformer.o decompress_bunzip2.o
+ lib-$(CONFIG_FEATURE_COMPRESS_BBCONFIG) += decompress_bunzip2.o
+ lib-$(CONFIG_FEATURE_TAR_TO_COMMAND) += data_extract_to_command.o
+
diff --git a/sys-apps/busybox/files/busybox-1.20.0-getty.patch b/sys-apps/busybox/files/busybox-1.20.0-getty.patch
new file mode 100644
index 00000000..ed52159f
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.20.0-getty.patch
@@ -0,0 +1,17 @@
+--- busybox-1.20.0/loginutils/getty.c
++++ busybox-1.20.0-getty/loginutils/getty.c
+@@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, ch
+ */
+ fd = open("/dev/tty", O_RDWR | O_NONBLOCK);
+ if (fd >= 0) {
++ /* TIOCNOTTY sends SIGHUP to the foreground
++ * process group - which may include us!
++ * Make sure to not die on it:
++ */
++ sighandler_t old = signal(SIGHUP, SIG_IGN);
+ ioctl(fd, TIOCNOTTY);
+ close(fd);
++ signal(SIGHUP, old);
+ }
+ }
+
diff --git a/sys-apps/busybox/files/busybox-1.20.0-lineedit.patch b/sys-apps/busybox/files/busybox-1.20.0-lineedit.patch
new file mode 100644
index 00000000..ee236ffc
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.20.0-lineedit.patch
@@ -0,0 +1,22 @@
+--- busybox-1.20.0/libbb/lineedit.c
++++ busybox-1.20.0-lineedit/libbb/lineedit.c
+@@ -1352,8 +1352,7 @@ static void load_history(line_input_t *s
+ /* fill temp_h[], retaining only last MAX_HISTORY lines */
+ memset(temp_h, 0, sizeof(temp_h));
+ idx = 0;
+- if (!ENABLE_FEATURE_EDITING_SAVE_ON_EXIT)
+- st_parm->cnt_history_in_file = 0;
++ st_parm->cnt_history_in_file = 0;
+ while ((line = xmalloc_fgetline(fp)) != NULL) {
+ if (line[0] == '\0') {
+ free(line);
+@@ -1361,8 +1360,7 @@ static void load_history(line_input_t *s
+ }
+ free(temp_h[idx]);
+ temp_h[idx] = line;
+- if (!ENABLE_FEATURE_EDITING_SAVE_ON_EXIT)
+- st_parm->cnt_history_in_file++;
++ st_parm->cnt_history_in_file++;
+ idx++;
+ if (idx == st_parm->max_history)
+ idx = 0;
diff --git a/sys-apps/busybox/files/busybox-1.20.0-sed.patch b/sys-apps/busybox/files/busybox-1.20.0-sed.patch
new file mode 100644
index 00000000..70dc63f4
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.20.0-sed.patch
@@ -0,0 +1,29 @@
+--- busybox-1.20.0/editors/sed.c
++++ busybox-1.20.0-sed/editors/sed.c
+@@ -743,7 +743,7 @@ static int do_subst_command(sed_cmd_t *s
+ */
+ if (!G.regmatch[0].rm_so && !G.regmatch[0].rm_eo && match_count) {
+ pipe_putc(*line++);
+- continue;
++ goto next;
+ }
+
+ match_count++;
+@@ -755,7 +755,7 @@ static int do_subst_command(sed_cmd_t *s
+ ) {
+ for (i = 0; i < G.regmatch[0].rm_eo; i++)
+ pipe_putc(*line++);
+- continue;
++ goto next;
+ }
+
+ /* print everything before the match */
+@@ -773,7 +773,7 @@ static int do_subst_command(sed_cmd_t *s
+ /* if we're not doing this globally, get out now */
+ if (sed_cmd->which_match != 0)
+ break;
+-
++ next:
+ if (*line == '\0')
+ break;
+
diff --git a/sys-apps/busybox/files/busybox-1.20.0-udhcpc6-ipv6.patch b/sys-apps/busybox/files/busybox-1.20.0-udhcpc6-ipv6.patch
new file mode 100644
index 00000000..0148809d
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.20.0-udhcpc6-ipv6.patch
@@ -0,0 +1,33 @@
+From 3da46c8163ecf14a02f8317d0b76b225eceaf28c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 2 May 2012 21:45:35 -0400
+Subject: [PATCH] udhcpc6: depend on ipv6
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ networking/udhcp/d6_dhcpc.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
+index a792a9d..7c9f52a 100644
+--- a/networking/udhcp/d6_dhcpc.c
++++ b/networking/udhcp/d6_dhcpc.c
+@@ -12,10 +12,11 @@
+ */
+
+ //config:config UDHCPC6
+-//config: bool "udhcp client for DHCPv6 (udhcpc6)"
+-//config: default n # not yet ready
+-//config: help
+-//config: udhcpc6 is a DHCPv6 client
++//config: bool "udhcp client for DHCPv6 (udhcpc6)"
++//config: default n # not yet ready
++//config: depends on FEATURE_IPV6
++//config: help
++//config: udhcpc6 is a DHCPv6 client
+
+ //applet:IF_UDHCPC6(APPLET(udhcpc6, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+--
+1.7.9.7
+
diff --git a/sys-apps/busybox/files/busybox-1.20.2-glibc-sys-resource.patch b/sys-apps/busybox/files/busybox-1.20.2-glibc-sys-resource.patch
new file mode 100644
index 00000000..f682d00f
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.20.2-glibc-sys-resource.patch
@@ -0,0 +1,109 @@
+https://bugs.gentoo.org/424954
+
+From c5fe9f7b723f949457263ef8e22ab807d5b549ce Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 5 Jul 2012 23:19:09 -0400
+Subject: [PATCH] include sys/resource.h where needed
+
+We use functions from sys/resource.h in misc applets, but don't include
+the header. This breaks building with newer glibc versions, so add the
+include where needed.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ loginutils/passwd.c | 1 +
+ miscutils/time.c | 1 +
+ networking/inetd.c | 1 +
+ networking/ntpd.c | 1 +
+ networking/ntpd_simple.c | 1 +
+ runit/chpst.c | 1 +
+ shell/shell_common.c | 1 +
+ 7 files changed, 7 insertions(+)
+
+diff --git a/loginutils/passwd.c b/loginutils/passwd.c
+index b83db00..a7006f0 100644
+--- a/loginutils/passwd.c
++++ b/loginutils/passwd.c
+@@ -15,6 +15,7 @@
+
+ #include "libbb.h"
+ #include <syslog.h>
++#include <sys/resource.h> /* setrlimit */
+
+ static void nuke_str(char *str)
+ {
+diff --git a/miscutils/time.c b/miscutils/time.c
+index 945f15f..ffed386 100644
+--- a/miscutils/time.c
++++ b/miscutils/time.c
+@@ -16,6 +16,7 @@
+ //usage: "\n -v Verbose"
+
+ #include "libbb.h"
++#include <sys/resource.h> /* getrusage */
+
+ /* Information on the resources used by a child process. */
+ typedef struct {
+diff --git a/networking/inetd.c b/networking/inetd.c
+index 1308d74..00baf69 100644
+--- a/networking/inetd.c
++++ b/networking/inetd.c
+@@ -165,6 +165,7 @@
+ //usage: "\n (default: 0 - disabled)"
+
+ #include <syslog.h>
++#include <sys/resource.h> /* setrlimit */
+ #include <sys/un.h>
+
+ #include "libbb.h"
+diff --git a/networking/ntpd.c b/networking/ntpd.c
+index 72e9d0b..5b92db6 100644
+--- a/networking/ntpd.c
++++ b/networking/ntpd.c
+@@ -46,6 +46,7 @@
+ #include "libbb.h"
+ #include <math.h>
+ #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
++#include <sys/resource.h> /* setpriority */
+ #include <sys/timex.h>
+ #ifndef IPTOS_LOWDELAY
+ # define IPTOS_LOWDELAY 0x10
+diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c
+index 4ad44e4..1b7c66b 100644
+--- a/networking/ntpd_simple.c
++++ b/networking/ntpd_simple.c
+@@ -7,6 +7,7 @@
+ */
+ #include "libbb.h"
+ #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
++#include <sys/resource.h> /* setpriority */
+ #ifndef IPTOS_LOWDELAY
+ # define IPTOS_LOWDELAY 0x10
+ #endif
+diff --git a/runit/chpst.c b/runit/chpst.c
+index ac296ba..ed72c8b 100644
+--- a/runit/chpst.c
++++ b/runit/chpst.c
+@@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ //usage: "\n a SIGXCPU after N seconds"
+
+ #include "libbb.h"
++#include <sys/resource.h> /* getrlimit */
+
+ /*
+ Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit.
+diff --git a/shell/shell_common.c b/shell/shell_common.c
+index 51c92d6..780e27e 100644
+--- a/shell/shell_common.c
++++ b/shell/shell_common.c
+@@ -18,6 +18,7 @@
+ */
+ #include "libbb.h"
+ #include "shell_common.h"
++#include <sys/resource.h> /* getrlimit */
+
+ const char defifsvar[] ALIGN1 = "IFS= \t\n";
+
+--
+1.7.9.7
+
diff --git a/sys-apps/busybox/files/busybox-1.20.2-selinux-pkg-config.patch b/sys-apps/busybox/files/busybox-1.20.2-selinux-pkg-config.patch
new file mode 100644
index 00000000..5e9ef26d
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.20.2-selinux-pkg-config.patch
@@ -0,0 +1,67 @@
+From 5694afd72a0a424fcdd2ac85838229a1a86b7e84 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 20 Oct 2012 15:01:26 -0400
+Subject: [PATCH] build system: use pkg-config to look up selinux libs
+
+Newer versions of libselinux has started linking against more libs.
+Rather than continuing hardcoding things, switch to using pkg-config
+to query for its dependencies.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 1 +
+ Makefile.flags | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b2e9477..8995ff5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -297,6 +297,7 @@ NM = $(CROSS_COMPILE)nm
+ STRIP = $(CROSS_COMPILE)strip
+ OBJCOPY = $(CROSS_COMPILE)objcopy
+ OBJDUMP = $(CROSS_COMPILE)objdump
++PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
+ AWK = awk
+ GENKSYMS = scripts/genksyms/genksyms
+ DEPMOD = /sbin/depmod
+diff --git a/Makefile.flags b/Makefile.flags
+index e77c0e5..307afa7 100644
+--- a/Makefile.flags
++++ b/Makefile.flags
+@@ -78,6 +78,12 @@ ARCH_FPIC ?= -fpic
+ ARCH_FPIE ?= -fpie
+ ARCH_PIE ?= -pie
+
++# Usage: $(eval $(call pkg_check_modules,VARIABLE-PREFIX,MODULES))
++define pkg_check_modules
++$(1)_CFLAGS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags $(2))
++$(1)_LIBS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs $(2))
++endef
++
+ ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
+ # on i386: 14% smaller libbusybox.so
+ # (code itself is 9% bigger, we save on relocs/PLT/GOT)
+@@ -89,6 +95,7 @@ endif
+
+ ifeq ($(CONFIG_STATIC),y)
+ CFLAGS_busybox += -static
++PKG_CONFIG_FLAGS += --static
+ endif
+
+ ifeq ($(CONFIG_PIE),y)
+@@ -131,7 +138,10 @@ LDLIBS += pam pam_misc pthread
+ endif
+
+ ifeq ($(CONFIG_SELINUX),y)
+-LDLIBS += selinux sepol
++SELINUX_PC_MODULES = libselinux libsepol
++$(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES)))
++CPPFLAGS += $(SELINUX_CFLAGS)
++LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
+ endif
+
+ ifeq ($(CONFIG_EFENCE),y)
+--
+1.7.12
+
diff --git a/sys-apps/busybox/files/busybox-1.21.0-mdev.patch b/sys-apps/busybox/files/busybox-1.21.0-mdev.patch
new file mode 100644
index 00000000..cb873faf
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.21.0-mdev.patch
@@ -0,0 +1,35 @@
+--- busybox-1.21.0/util-linux/mdev.c
++++ busybox-1.21.0-mdev/util-linux/mdev.c
+@@ -661,6 +661,8 @@ static void make_device(char *device_nam
+ if (mknod(node_name, rule->mode | type, makedev(major, minor)) && errno != EEXIST)
+ bb_perror_msg("can't create '%s'", node_name);
+ if (ENABLE_FEATURE_MDEV_CONF) {
++ if (G.verbose)
++ bb_error_msg("chmod: %o chown: %u:%u", rule->mode, rule->ugid.uid, rule->ugid.gid);
+ chmod(node_name, rule->mode);
+ chown(node_name, rule->ugid.uid, rule->ugid.gid);
+ }
+@@ -813,6 +815,7 @@ static void load_firmware(const char *fi
+ full_write(loading_fd, "-1", 2);
+
+ out:
++ xchdir("/dev");
+ if (ENABLE_FEATURE_CLEAN_UP) {
+ close(firmware_fd);
+ close(loading_fd);
+@@ -919,11 +922,13 @@ int mdev_main(int argc UNUSED_PARAM, cha
+ }
+
+ {
+- int logfd = open("/dev/mdev.log", O_WRONLY | O_APPEND);
++ int logfd = open("mdev.log", O_WRONLY | O_APPEND);
+ if (logfd >= 0) {
+ xmove_fd(logfd, STDERR_FILENO);
+ G.verbose = 1;
+- bb_error_msg("seq: %s action: %s", seq, action);
++ if (seq)
++ applet_name = xasprintf("%s[%s]", applet_name, seq);
++ bb_error_msg("action: %s", action);
+ }
+ }
+
diff --git a/sys-apps/busybox/files/busybox-1.21.0-platform.patch b/sys-apps/busybox/files/busybox-1.21.0-platform.patch
new file mode 100644
index 00000000..9be6cb8f
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.21.0-platform.patch
@@ -0,0 +1,24 @@
+--- busybox-1.21.0/archival/libarchive/decompress_unxz.c
++++ busybox-1.21.0-platform/archival/libarchive/decompress_unxz.c
+@@ -30,8 +30,8 @@ static uint32_t xz_crc32(const uint8_t *
+ /* We use arch-optimized unaligned accessors */
+ #define get_unaligned_le32(buf) ({ uint32_t v; move_from_unaligned32(v, buf); SWAP_LE32(v); })
+ #define get_unaligned_be32(buf) ({ uint32_t v; move_from_unaligned32(v, buf); SWAP_BE32(v); })
+-#define put_unaligned_le32(val, buf) move_to_unaligned16(buf, SWAP_LE32(val))
+-#define put_unaligned_be32(val, buf) move_to_unaligned16(buf, SWAP_BE32(val))
++#define put_unaligned_le32(val, buf) move_to_unaligned32(buf, SWAP_LE32(val))
++#define put_unaligned_be32(val, buf) move_to_unaligned32(buf, SWAP_BE32(val))
+
+ #include "unxz/xz_dec_bcj.c"
+ #include "unxz/xz_dec_lzma2.c"
+--- busybox-1.21.0/include/platform.h
++++ busybox-1.21.0-platform/include/platform.h
+@@ -228,7 +228,7 @@ typedef uint32_t bb__aliased_uint32_t FI
+ # define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4))
+ # define move_to_unaligned16(u16p, v) do { \
+ uint16_t __t = (v); \
+- memcpy((u16p), &__t, 4); \
++ memcpy((u16p), &__t, 2); \
+ } while (0)
+ # define move_to_unaligned32(u32p, v) do { \
+ uint32_t __t = (v); \
diff --git a/sys-apps/busybox/files/busybox-1.21.0-xz.patch b/sys-apps/busybox/files/busybox-1.21.0-xz.patch
new file mode 100644
index 00000000..56ba1a27
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.21.0-xz.patch
@@ -0,0 +1,84 @@
+--- busybox-1.21.0/archival/libarchive/decompress_unxz.c
++++ busybox-1.21.0-xz/archival/libarchive/decompress_unxz.c
+@@ -40,6 +40,7 @@ static uint32_t xz_crc32(const uint8_t *
+ IF_DESKTOP(long long) int FAST_FUNC
+ unpack_xz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
+ {
++ enum xz_ret xz_result;
+ struct xz_buf iobuf;
+ struct xz_dec *state;
+ unsigned char *membuf;
+@@ -63,9 +64,8 @@ unpack_xz_stream(transformer_aux_data_t
+ /* Limit memory usage to about 64 MiB. */
+ state = xz_dec_init(XZ_DYNALLOC, 64*1024*1024);
+
++ xz_result = X_OK;
+ while (1) {
+- enum xz_ret r;
+-
+ if (iobuf.in_pos == iobuf.in_size) {
+ int rd = safe_read(src_fd, membuf, BUFSIZ);
+ if (rd < 0) {
+@@ -73,28 +73,57 @@ unpack_xz_stream(transformer_aux_data_t
+ total = -1;
+ break;
+ }
++ if (rd == 0 && xz_result == XZ_STREAM_END)
++ break;
+ iobuf.in_size = rd;
+ iobuf.in_pos = 0;
+ }
++ if (xz_result == XZ_STREAM_END) {
++ /*
++ * Try to start decoding next concatenated stream.
++ * Stream padding must always be a multiple of four
++ * bytes to preserve four-byte alignment. To keep the
++ * code slightly smaller, we aren't as strict here as
++ * the .xz spec requires. We just skip all zero-bytes
++ * without checking the alignment and thus can accept
++ * files that aren't valid, e.g. the XZ utils test
++ * files bad-0pad-empty.xz and bad-0catpad-empty.xz.
++ */
++ do {
++ if (membuf[iobuf.in_pos] != 0) {
++ xz_dec_reset(state);
++ goto do_run;
++ }
++ iobuf.in_pos++;
++ } while (iobuf.in_pos < iobuf.in_size);
++ }
++ do_run:
+ // bb_error_msg(">in pos:%d size:%d out pos:%d size:%d",
+ // iobuf.in_pos, iobuf.in_size, iobuf.out_pos, iobuf.out_size);
+- r = xz_dec_run(state, &iobuf);
++ xz_result = xz_dec_run(state, &iobuf);
+ // bb_error_msg("<in pos:%d size:%d out pos:%d size:%d r:%d",
+-// iobuf.in_pos, iobuf.in_size, iobuf.out_pos, iobuf.out_size, r);
++// iobuf.in_pos, iobuf.in_size, iobuf.out_pos, iobuf.out_size, xz_result);
+ if (iobuf.out_pos) {
+ xwrite(dst_fd, iobuf.out, iobuf.out_pos);
+ IF_DESKTOP(total += iobuf.out_pos;)
+ iobuf.out_pos = 0;
+ }
+- if (r == XZ_STREAM_END) {
+- break;
++ if (xz_result == XZ_STREAM_END) {
++ /*
++ * Can just "break;" here, if not for concatenated
++ * .xz streams.
++ * Checking for padding may require buffer
++ * replenishment. Can't do it here.
++ */
++ continue;
+ }
+- if (r != XZ_OK && r != XZ_UNSUPPORTED_CHECK) {
++ if (xz_result != XZ_OK && xz_result != XZ_UNSUPPORTED_CHECK) {
+ bb_error_msg("corrupted data");
+ total = -1;
+ break;
+ }
+ }
++
+ xz_dec_end(state);
+ free(membuf);
+
diff --git a/sys-apps/busybox/files/ginit.c b/sys-apps/busybox/files/ginit.c
new file mode 100644
index 00000000..355ae483
--- /dev/null
+++ b/sys-apps/busybox/files/ginit.c
@@ -0,0 +1,124 @@
+/*
+ * simple init to bootstrap sep-/usr
+ *
+ * Copyright (C) 2012 Mike Frysinger <vapier@gentoo.org>
+ *
+ * Licensed under GPLv2 or later
+ */
+
+//applet:IF_INIT(APPLET(ginit, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_GINIT) += ginit.o
+
+//config:config GINIT
+//config: bool "ginit"
+//config: default y
+//config: select MKDIR
+//config: select MDEV
+//config: select MOUNT
+//config: select MOUNTPOINT
+//config: help
+//config: sep-/usr bootstrapper
+
+//usage:#define ginit_trivial_usage NOUSAGE_STR
+//usage:#define ginit_full_usage ""
+
+#include "libbb.h"
+
+#define eprintf(fmt, args...) printf("%s" fmt, "sep-usr init: ", ## args)
+
+static void process_args(char **args)
+{
+ size_t i;
+
+ eprintf("running: ");
+ for (i = 0; args[i]; ++i) {
+ /* String needs to be writable, so dupe it */
+ args[i] = xstrdup(args[i]);
+ printf("'%s' ", args[i]);
+ }
+ printf("\n");
+}
+
+int ginit_main(int argc UNUSED_PARAM, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int ginit_main(int argc UNUSED_PARAM, char **argv)
+{
+ FILE *mntlist;
+ bool ismnted_dev, ismnted_sys, ismnted_usr;
+ struct mntent *mntent;
+
+ /*
+ int fd = open("/dev/console", O_RDWR);
+ if (fd >= 0) {
+ dup2(fd, 0);
+ dup2(fd, 1);
+ dup2(fd, 2);
+ }
+ */
+
+ /* If given an argv[] with an applet name, run it instead.
+ * Makes recovering simple by doing: init=/ginit bb
+ */
+ if (argv[1] && argv[1][0] != '/') {
+ eprintf("running user requested applet %s\n", argv[1]);
+ return spawn_and_wait(argv+1);
+ }
+
+#define saw(argv...) \
+ ({ \
+ static const char *args[] = { argv, NULL }; \
+ /* These casts are fine -- see process_args for mem setup */ \
+ process_args((void *)args); \
+ spawn_and_wait((void *)args); \
+ })
+
+ /* First setup basic /dev */
+ if (saw("mountpoint", "-q", "/dev") != 0) {
+ /* Try /etc/fstab */
+ if (saw("mount", "-n", "/dev"))
+ /* Then devtmpfs */
+ if (saw("mount", "-n", "-t", "devtmpfs", "devtmpfs", "/dev"))
+ /* Finally normal tmpfs */
+ saw("mount", "-n", "-t", "tmpfs", "dev", "/dev");
+ } else {
+ eprintf("%s appears to be mounted; skipping its setup\n", "/dev");
+ }
+
+ /* If /dev is empty (e.g. tmpfs), run mdev to seed things */
+ if (access("/dev/console", F_OK) != 0) {
+ if (saw("mountpoint", "-q", "/sys") != 0) {
+ if (saw("mount", "-n", "/sys"))
+ saw("mount", "-n", "-t", "sysfs", "sysfs", "/sys");
+ } else {
+ eprintf("%s appears to be mounted; skipping its setup\n", "/sys");
+ }
+
+ /* Mount /proc as mdev will fork+exec /proc/self/exe */
+ if (saw("mountpoint", "-q", "/proc") != 0) {
+ /* Try /etc/fstab */
+ if (saw("mount", "-n", "/proc"))
+ saw("mount", "-n", "-t", "proc", "proc", "/proc");
+ }
+
+ saw("mdev", "-s");
+ }
+
+ /* Then seed the stuff we care about */
+ saw("mkdir", "-p", "/dev/pts", "/dev/shm");
+
+ /* Then mount /usr */
+ if (saw("mountpoint", "-q", "/usr") != 0) {
+ saw("mount", "-n", "/usr", "-o", "ro");
+ } else {
+ eprintf("%s appears to be mounted; skipping its setup\n", "/usr");
+ }
+
+ /* Now that we're all done, exec the real init */
+ if (!argv[1]) {
+ argv[0] = (void *)"/sbin/init";
+ argv[1] = NULL;
+ } else
+ ++argv;
+ process_args(argv);
+ return execv(argv[0], argv);
+}
diff --git a/sys-apps/busybox/files/klogd.confd b/sys-apps/busybox/files/klogd.confd
new file mode 100644
index 00000000..4c16096a
--- /dev/null
+++ b/sys-apps/busybox/files/klogd.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/busybox-sysklogd
+
+# run "/sbin/klogd --help" to see all possible options.
+
+# activate if you need remote logging
+#rc_need="net"
+
+# send warnings and above to the console
+KLOGD_OPTS="-c 3"
diff --git a/sys-apps/busybox/files/klogd.initd b/sys-apps/busybox/files/klogd.initd
new file mode 100644
index 00000000..4c6dbbc5
--- /dev/null
+++ b/sys-apps/busybox/files/klogd.initd
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/klogd.initd,v 1.2 2012/12/21 03:15:28 blueness Exp $
+
+command="/bin/busybox klogd"
+command_args="${KLOGD_OPTS}"
+pidfile="/var/run/klogd.pid"
+
+depend() {
+ need clock hostname
+}
diff --git a/sys-apps/busybox/files/mdev-start.sh b/sys-apps/busybox/files/mdev-start.sh
new file mode 100755
index 00000000..8784cd55
--- /dev/null
+++ b/sys-apps/busybox/files/mdev-start.sh
@@ -0,0 +1,125 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+find_mdev()
+{
+ if [ -x /sbin/mdev ] ; then
+ echo "/sbin/mdev"
+ else
+ echo "/bin/busybox mdev"
+ fi
+}
+
+populate_mdev()
+{
+ # populate /dev with devices already found by the kernel
+
+ if get_bootparam "nocoldplug" ; then
+ RC_COLDPLUG="no"
+ ewarn "Skipping mdev coldplug as requested in kernel cmdline"
+ fi
+
+ ebegin "Populating /dev with existing devices with mdev -s"
+ $(find_mdev) -s
+ eend $?
+
+ return 0
+}
+
+seed_dev()
+{
+ # Seed /dev with some things that we know we need
+
+ # creating /dev/console and /dev/tty1 to be able to write
+ # to $CONSOLE with/without bootsplash before mdev creates it
+ [ -c /dev/console ] || mknod /dev/console c 5 1
+ [ -c /dev/tty1 ] || mknod /dev/tty1 c 4 1
+
+ # udevd will dup its stdin/stdout/stderr to /dev/null
+ # and we do not want a file which gets buffered in ram
+ [ -c /dev/null ] || mknod /dev/null c 1 3
+
+ # copy over any persistant things
+ if [ -d /lib/mdev/devices ] ; then
+ cp -RPp /lib/mdev/devices/* /dev 2>/dev/null
+ fi
+
+ # Not provided by sysfs but needed
+ ln -snf /proc/self/fd /dev/fd
+ ln -snf fd/0 /dev/stdin
+ ln -snf fd/1 /dev/stdout
+ ln -snf fd/2 /dev/stderr
+ [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core
+
+ # Create problematic directories
+ mkdir -p /dev/pts /dev/shm
+}
+
+mount_it_b1()
+{
+ if [ "${RC_USE_FSTAB}" = "yes" ] ; then
+ mntcmd=$(get_mount_fstab /dev)
+ else
+ unset mntcmd
+ fi
+ if [ -n "${mntcmd}" ] ; then
+ try mount -n ${mntcmd}
+ else
+ if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then
+ mntcmd="tmpfs"
+ else
+ mntcmd="ramfs"
+ fi
+ # many video drivers require exec access in /dev #92921
+ try mount -n -t "${mntcmd}" -o exec,nosuid,mode=0755 mdev /dev
+ fi
+}
+mount_it_b2()
+{
+ if fstabinfo --quiet /dev ; then
+ mount -n /dev
+ else
+ # Some devices require exec, Bug #92921
+ mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" mdev /dev
+ fi
+}
+mount_it()
+{
+ type fstabinfo && mount_it_b2 || mount_it_b1
+}
+
+main()
+{
+ # Setup temporary storage for /dev
+ ebegin "Mounting /dev for mdev"
+ mount_it
+ eend $?
+
+ # Create a file so that our rc system knows it's still in sysinit.
+ # Existance means init scripts will not directly run.
+ # rc will remove the file when done with sysinit.
+ touch /dev/.rcsysinit
+
+ # Selinux lovin; /selinux should be mounted by selinux-patched init
+ if [ -x /sbin/restorecon ] && [ -c /selinux/null ] ; then
+ restorecon /dev > /selinux/null
+ fi
+
+ seed_dev
+
+ # Setup hotplugging (if possible)
+ if [ -e /proc/sys/kernel/hotplug ] ; then
+ ebegin "Setting up proper hotplug agent"
+ eindent
+ einfo "Setting /sbin/mdev as hotplug agent ..."
+ echo $(find_mdev) > /proc/sys/kernel/hotplug
+ eoutdent
+ eend 0
+ fi
+
+ populate_mdev
+}
+
+main
+
+# vim:ts=4
diff --git a/sys-apps/busybox/files/mdev.conf b/sys-apps/busybox/files/mdev.conf
new file mode 100644
index 00000000..11c256d7
--- /dev/null
+++ b/sys-apps/busybox/files/mdev.conf
@@ -0,0 +1,105 @@
+# Provide user, group, and mode information for devices. If a regex matches
+# the device name provided by sysfs, use the appropriate user:group and mode
+# instead of the default 0:0 660.
+#
+# Syntax:
+# [-]devicename_regex user:group mode [>|=path] [@|$|*cmd args...]
+#
+# Leading minus in 1st field means "don't stop on this line", otherwise
+# search is stopped after the matching line is encountered.
+# Leading @ allows specification as @major,minor[-minor2] for disambiguation
+#
+# =: move, >: move and create a symlink, !: don't create node
+# @|$|*: run $cmd on delete, @cmd on create, *cmd on both
+
+# support module loading on hotplug
+$MODALIAS=.* root:root 660 @/sbin/modprobe "$MODALIAS"
+
+# Log without creating nodes
+#-.* nobody:nogroup 400 @/lib/mdev/mdev_debug ; /bin/rm $MDEV
+
+# null may already exist; therefore ownership has to be changed with command
+null root:root 666 @/bin/chmod 666 $MDEV
+zero root:root 666
+full root:root 666
+random root:root 644
+urandom root:root 644
+hwrandom root:root 644
+grsec root:root 660
+
+kmem root:kmem 640
+kmsg root:root 600
+mem root:kmem 640
+port root:kmem 640
+# console may already exist; therefore ownership has to be changed with command
+console root:tty 600 @/bin/chmod 600 $MDEV
+ptmx root:tty 666
+pty.* root:tty 660
+
+-cpu.* root:root 755 @/bin/mkdir -pm 755 cpu ; /bin/rm $MDEV
+cpu([0-9]+) root:root 444 =cpu/%1/cpuid
+-msr.* root:root 755 @/bin/mkdir -pm 755 cpu ; /bin/rm $MDEV
+msr([0-9]+) root:root 600 =cpu/%1/msr
+microcode root:root 600 =cpu/
+
+# Typical devices
+
+tty root:tty 666
+tty[0-9]+ root:tty 620
+vcsa?[0-9]* root:tty 660
+ttyS[0-9]+ root:uucp 660
+ttyprintk root:root 600
+
+# block devices
+ram([0-9]+) root:disk 660 >rd/%1
+loop([0-9]+) root:disk 660 >loop/%1
+sd[a-z].* root:disk 660 */lib/mdev/usbdisk_link
+#hd[a-z][0-9]* root:disk 660 */lib/mdev/ide_links
+md[0-9]+ root:disk 660 @/bin/mkdir -pm 755 md ; /bin/ln -sf ../$MDEV md/${MDEV/md}
+#sr[0-9]+ root:cdrom 660 @/bin/ln -sf $MDEV cdrom
+#fd[0-9]+ root:floppy 660
+bsg/.* root:root 600 =bsg/
+
+# net devices
+-net/.* root:root 600 @/sbin/nameif
+tun[0-9]* root:root 666 =net/
+tap[0-9]* root:root 666 =net/
+
+# i2c
+i2c([0-9]+) root:root 600 >i2c/%1
+i2c-([0-9]+) root:root 600 >i2c/%1
+
+# usb bus devices
+-usb.* root:usb 755 @/bin/mkdir -pm 755 bus/usb ; /bin/chmod 755 bus ; /bin/rm $MDEV
+usb([0-9]) root:usb 664 =bus/usb/00%1/001
+usb([1-9][0-9]) root:usb 664 =bus/usb/0%1/001
+usb([1-9][0-9]{2}) root:usb 664 =bus/usb/%1/001
+# usb devices
+([0-9]+)-([0-9]+) root:usb 664 */lib/mdev/usb
+hiddev[0-9]+ root:root 600 =usb/
+hidraw[0-9]+ root:root 600
+ttyUSB[0-9]+ root:uucp 660
+# Traditionally, USB devices appeared as, e.g., '/dev/usbdev1.1_ep00'
+usbdev[0-9]\.[0-9] root:root 664 */lib/mdev/usbdev
+usbdev[0-9]\.[0-9]_.* root:root 664
+
+# misc stuff
+#misc/.* nobody:nogroup 0 !
+#rtc root:root 600 >misc/
+rtc0 root:root 600 @/bin/ln -sf $MDEV rtc
+
+# input stuff
+event[0-9]+ root:root 640 =input/
+mice root:root 640 =input/
+mouse[0-9]+ root:root 640 =input/
+ts[0-9]+ root:root 600 =input/
+
+# Less typical devices
+
+fuse root:root 666
+
+#ttyLTM[0-9]+ root:dialout 660 @/bin/ln -sf $MDEV modem
+#ttySHSF[0-9]+ root:dialout 660 @/bin/ln -sf $MDEV modem
+#slamr root:dialout 660 @/bin/ln -sf $MDEV slamr0
+#slusb root:dialout 660 @/bin/ln -sf $MDEV slusb0
+
diff --git a/sys-apps/busybox/files/mdev.rc b/sys-apps/busybox/files/mdev.rc
new file mode 100755
index 00000000..5470404a
--- /dev/null
+++ b/sys-apps/busybox/files/mdev.rc
@@ -0,0 +1,9 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/mdev.rc,v 1.1 2010/08/15 03:55:29 vapier Exp $
+
+start()
+{
+ . /lib/rcscripts/addons/mdev-start.sh
+}
diff --git a/sys-apps/busybox/files/mdev.rc.1 b/sys-apps/busybox/files/mdev.rc.1
new file mode 100755
index 00000000..569d5407
--- /dev/null
+++ b/sys-apps/busybox/files/mdev.rc.1
@@ -0,0 +1,98 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/mdev.rc.1,v 1.2 2012/09/26 21:25:23 robbat2 Exp $
+
+depend()
+{
+ provide dev dev-mount
+ need sysfs
+}
+
+find_mdev()
+{
+ if [ -x /sbin/mdev ] ; then
+ echo "/sbin/mdev"
+ else
+ echo "/bin/busybox mdev"
+ fi
+}
+
+populate_mdev()
+{
+ # populate /dev with devices already found by the kernel
+
+ if get_bootparam "nocoldplug" ; then
+ RC_COLDPLUG="no"
+ ewarn "Skipping mdev coldplug as requested in kernel cmdline"
+ fi
+
+ ebegin "Populating /dev with existing devices with mdev -s"
+ $(find_mdev) -s
+ eend $?
+
+ return 0
+}
+
+seed_dev()
+{
+ # Seed /dev with some things that we know we need
+
+ # creating /dev/console and /dev/tty1 to be able to write
+ # to $CONSOLE with/without bootsplash before mdev creates it
+ [ -c /dev/console ] || mknod /dev/console c 5 1
+ [ -c /dev/tty1 ] || mknod /dev/tty1 c 4 1
+
+ # udevd will dup its stdin/stdout/stderr to /dev/null
+ # and we do not want a file which gets buffered in ram
+ [ -c /dev/null ] || mknod /dev/null c 1 3
+
+ # copy over any persistant things
+ if [ -d /lib/mdev/devices ] ; then
+ cp -RPp /lib/mdev/devices/* /dev 2>/dev/null
+ fi
+
+ # Not provided by sysfs but needed
+ ln -snf /proc/self/fd /dev/fd
+ ln -snf fd/0 /dev/stdin
+ ln -snf fd/1 /dev/stdout
+ ln -snf fd/2 /dev/stderr
+ [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core
+
+ # Create problematic directories
+ mkdir -p /dev/pts /dev/shm
+}
+
+mount_it()
+{
+ if fstabinfo --quiet /dev ; then
+ mount -n /dev
+ else
+ # Some devices require exec, Bug #92921
+ mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" mdev /dev
+ fi
+}
+
+start()
+{
+ # Setup temporary storage for /dev
+ ebegin "Mounting /dev for mdev"
+ mount_it
+ eend $?
+
+ # Create a file so that our rc system knows it's still in sysinit.
+ # Existance means init scripts will not directly run.
+ # rc will remove the file when done with sysinit.
+ touch /dev/.rcsysinit
+
+ seed_dev
+
+ # Setup hotplugging (if possible)
+ if [ -e /proc/sys/kernel/hotplug ] ; then
+ ebegin "Setting up mdev as hotplug agent"
+ echo $(find_mdev) > /proc/sys/kernel/hotplug
+ eend 0
+ fi
+
+ populate_mdev
+}
diff --git a/sys-apps/busybox/files/mdev/dvbdev b/sys-apps/busybox/files/mdev/dvbdev
new file mode 100644
index 00000000..f0186c17
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/dvbdev
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# MDEV=dvb0.demux1 -> ADAPTER=dvb0 -> N=0
+ADAPTER=${MDEV%.*}
+N=${ADAPTER#dvb}
+# MDEV=dvb0.demux1 -> DEVB_DEV=demux1
+DVB_DEV=${MDEV#*.}
+
+case "$ACTION" in
+ add|"")
+ mkdir -p dvb/adapter${N}
+ mv ${MDEV} dvb/adapter${N}/${DVB_DEV}
+ ;;
+ remove)
+ rm -f dvb/adapter${N}/${DVB_DEV}
+ rmdir dvb/adapter${N} 2>/dev/null
+ rmdir dvb/ 2>/dev/null
+esac
diff --git a/sys-apps/busybox/files/mdev/ide_links b/sys-apps/busybox/files/mdev/ide_links
new file mode 100644
index 00000000..be0c95aa
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/ide_links
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+[ -f /proc/ide/$MDEV/media ] || exit
+
+media=`cat /proc/ide/$MDEV/media`
+for i in $media $media[0-9]* ; do
+ if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then
+ LINK=$i
+ break
+ fi
+done
+
+# link exist, remove if necessary and exit
+if [ "$LINK" ] ; then
+ [ "$ACTION" = remove ] && rm $LINK
+ exit
+fi
+
+# create a link
+num=`ls $media[0-9]* 2>/dev/null | wc -l`
+ln -sf $MDEV "$media`echo $num`"
+[ -e "$media" ] || ln -sf $MDEV "$media"
+
diff --git a/sys-apps/busybox/files/mdev/usb b/sys-apps/busybox/files/mdev/usb
new file mode 100755
index 00000000..2035b53d
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/usb
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+if [ -w "kmsg" ]; then
+ LOGFILE="kmsg"
+else
+ LOGFILE="mdev_usb.log"
+fi
+
+echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) mdev usb helper started as '$0' in '$( pwd )', MDEV '$MDEV', ACTION '$ACTION', DEVPATH '$DEVPATH', SUBSYSTEM '$SUBSYSTEM', SEQNUM '$SEQNUM'"
+
+[ -n "$MDEV" ] || exit 0
+[ -n "$DEVPATH" ] || exit 0
+[ "$SUBSYSTEM" = "usb" ] || exit 0
+
+# add zeros to device or bus
+function add_zeros() {
+ case "$( echo "$1" | wc -L )" in
+ 1) echo "00$1"
+ ;;
+ 2) echo "0$1"
+ ;;
+ *) echo "$1"
+ ;;
+ esac
+ return 0
+}
+
+# e.g. DEVPATH=/devices/pci0000:00/0000:00:0f.4/usb2/2-1, MDEV=2-1
+BUS=""
+USB_DEV=""
+if [ -d /sys/devices ]; then
+ BUS="$( add_zeros "$( cat "/sys$DEVPATH/busnum" 2>/dev/null )" )"
+ USB_DEV="$( add_zeros "$( cat "/sys$DEVPATH/devnum" 2>/dev/null )" )"
+fi
+if [ -z "$BUS" ]; then
+ BUS="$( add_zeros "$( echo "$DEVPATH" | cut -d'/' -f 5 | sed 's/^usb//' )" )"
+fi
+if [ -z "$USB_DEV" ]; then
+ USB_DEV="$( add_zeros "$( echo "$MDEV" | cut -d'-' -f 1 )" )"
+fi
+#USB_FUNC="$( add_zeros "$( echo "$MDEV" | cut -d'-' -f 2 )" )"
+
+# try to load the proper driver for usb devices
+case "$ACTION" in
+ add|"")
+ echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) Performing 'add' ACTION"
+
+ # move usb device file
+ if [ ! -d "bus/usb/$BUS" ]; then
+ echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) WARNING USB bus directory 'bus/usb/$BUS' doesn't exist - is USB initialised?"
+ mkdir -p "bus/usb/$BUS" \
+ && echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) mkdir succeeded for 'bus/usb/$BUS'" \
+ || { echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) mkdir failed for 'bus/usb/$BUS'" ; exit 0 ; }
+ fi
+ mv "$MDEV" "bus/usb/$BUS/$USB_DEV" \
+ && echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) mv succeeded for 'bus/usb/$BUS/$USB_DEV'" \
+ || { echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) mv failed for 'bus/usb/$BUS/$USB_DEV'" ; exit 0 ; }
+ ;;
+ remove)
+ echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) Performing 'add' ACTION"
+
+ # remove device file and possible empty dirs
+ if rm -f "bus/usb/$BUS/$USB_DEV" 2>/dev/null \
+ && echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) rm -f 'bus/usb/$BUS/$USB_DEV' succeeded"
+ then
+ rmdir -p "bus/usb/$BUS" 2>/dev/null \
+ && echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) rmdir -p 'bus/usb/$BUS' succeeded" \
+ || { echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) rmdir -p 'bus/usb/$BUS' failed" ; exit 0 ; }
+ else
+ echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) rm -f 'bus/usb/$BUS/$USB_DEV' failed"
+ exit 0
+ fi
+ ;;
+esac
+
+echo >>"$LOGFILE" "$$ $( date +"%T.%N" ) usb helper completed successfully"
+
+exit 0
diff --git a/sys-apps/busybox/files/mdev/usbdev b/sys-apps/busybox/files/mdev/usbdev
new file mode 100644
index 00000000..e1338a2d
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/usbdev
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# script is buggy; until patched just do exit 0
+#exit 0
+
+# add zeros to device or bus
+add_zeros () {
+ case "$(echo $1 | wc -L)" in
+ 1) echo "00$1" ;;
+ 2) echo "0$1" ;;
+ *) echo "$1"
+ esac
+ exit 0
+}
+
+
+# bus and device dirs in /sys
+USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/')
+USB_PATH=$(find /sys/devices -type d -name "$USB_PATH")
+USB_DEV_DIR=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/')
+
+# dir names in /dev
+BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/'))
+USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/'))
+
+
+# try to load the proper driver for usb devices
+case "$ACTION" in
+ add|"")
+ # load usb bus driver
+ for i in $USB_PATH/*/modalias ; do
+ modprobe `cat $i` 2>/dev/null
+ done
+ # load usb device driver if existent
+ if [ -d $USB_PATH/$USB_DEV_DIR ]; then
+ for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
+ modprobe `cat $i` 2>/dev/null
+ done
+ fi
+ # move usb device file
+ mkdir -p bus/usb/$BUS
+ mv $MDEV bus/usb/$BUS/$USB_DEV
+ ;;
+ remove)
+ # unload device driver, if device dir is existent
+ if [ -d $USB_PATH/$USB_DEV_DIR ]; then
+ for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
+ modprobe -r `cat $i` 2>/dev/null
+ done
+ fi
+ # unload usb bus driver. Does this make sense?
+ # what happens, if two usb devices are plugged in
+ # and one is removed?
+ for i in $USB_PATH/*/modalias ; do
+ modprobe -r `cat $i` 2>/dev/null
+ done
+ # remove device file and possible empty dirs
+ rm -f bus/usb/$BUS/$USB_DEV
+ rmdir bus/usb/$BUS/ 2>/dev/null
+ rmdir bus/usb/ 2>/dev/null
+ rmdir bus/ 2>/dev/null
+esac
diff --git a/sys-apps/busybox/files/mdev/usbdisk_link b/sys-apps/busybox/files/mdev/usbdisk_link
new file mode 100644
index 00000000..750242bb
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/usbdisk_link
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# NOTE: since mdev -s only provide $MDEV, don't depend on any hotplug vars.
+
+current=$(readlink usbdisk)
+
+if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then
+ rm -f usbdisk usba1
+fi
+[ -n "$current" ] && exit
+
+if [ -e /sys/block/$MDEV ]; then
+ SYSDEV=$(readlink -f /sys/block/$MDEV/device)
+ # if /sys device path contains '/usb[0-9]' then we assume its usb
+ # also, if its an usb without partitions we require FAT
+ if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
+ # do not create link if there is not FAT
+ dd if=/dev/$MDEV bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0
+
+ ln -sf $MDEV usbdisk
+ # keep this for compat. people have it in fstab
+ ln -sf $MDEV usba1
+ fi
+
+elif [ -e /sys/block/*/$MDEV ] ; then
+ PARENT=$(dirname /sys/block/*/$MDEV)
+ SYSDEV=$(readlink -f $PARENT/device)
+ if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
+ ln -sf $MDEV usbdisk
+ # keep this for compat. people have it in fstab
+ ln -sf $MDEV usba1
+ fi
+fi
+
diff --git a/sys-apps/busybox/files/ntpd.confd b/sys-apps/busybox/files/ntpd.confd
new file mode 100644
index 00000000..f50d4c2e
--- /dev/null
+++ b/sys-apps/busybox/files/ntpd.confd
@@ -0,0 +1,6 @@
+# Config file for /etc/init.d/busybox-ntpd
+
+# run "/sbin/ntpd --help" to see all possible options.
+
+# Get time from specified server and run in background
+NTPD_OPTS="-N -p pool.ntp.org"
diff --git a/sys-apps/busybox/files/ntpd.initd b/sys-apps/busybox/files/ntpd.initd
new file mode 100644
index 00000000..5a05c31f
--- /dev/null
+++ b/sys-apps/busybox/files/ntpd.initd
@@ -0,0 +1,13 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/ntpd.initd,v 1.2 2012/12/21 03:15:28 blueness Exp $
+
+command="/bin/busybox ntpd"
+command_args="${NTPD_OPTS}"
+pidfile="/var/run/ntpd.pid"
+
+depend() {
+ use net dns logger
+ after ntp-client
+}
diff --git a/sys-apps/busybox/files/syslogd.confd b/sys-apps/busybox/files/syslogd.confd
new file mode 100644
index 00000000..7df6885c
--- /dev/null
+++ b/sys-apps/busybox/files/syslogd.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/busybox-sysklogd
+
+# run "/sbin/syslogd --help" to see all possible options.
+
+# activate if you need remote logging
+#rc_need="net"
+
+# Log to shared mem buffer (use logread to read it)
+SYSLOGD_OPTS="-C128"
diff --git a/sys-apps/busybox/files/syslogd.initd b/sys-apps/busybox/files/syslogd.initd
new file mode 100644
index 00000000..f14224ae
--- /dev/null
+++ b/sys-apps/busybox/files/syslogd.initd
@@ -0,0 +1,13 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/syslogd.initd,v 1.2 2012/12/21 03:15:28 blueness Exp $
+
+command="/bin/busybox syslogd"
+command_args="${SYSLOGD_OPTS}"
+pidfile="/var/run/syslogd.pid"
+
+depend() {
+ need clock hostname
+ provide logger
+}
diff --git a/sys-apps/busybox/files/watchdog.confd b/sys-apps/busybox/files/watchdog.confd
new file mode 100644
index 00000000..bd6aec0a
--- /dev/null
+++ b/sys-apps/busybox/files/watchdog.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/busybox-watchdog
+
+# run "/sbin/watchdog --help" to see all possible options.
+
+# Periodically write to watchdog device
+WATCHDOG_OPTS="/dev/watchdog"
+
+# optionally set the nice-level
+#SSD_NICELEVEL="-20"
diff --git a/sys-apps/busybox/files/watchdog.initd b/sys-apps/busybox/files/watchdog.initd
new file mode 100644
index 00000000..821c0f8c
--- /dev/null
+++ b/sys-apps/busybox/files/watchdog.initd
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/watchdog.initd,v 1.2 2012/12/21 03:15:28 blueness Exp $
+
+command="/bin/busybox watchdog"
+command_args="${WATCHDOG_OPTS}"
+pidfile="/var/run/watchdog.pid"
+
+depend() {
+ provide watchdog
+}