diff options
author | maximilian attems <max@stro.at> | 2010-08-25 20:34:26 +0200 |
---|---|---|
committer | maximilian attems <max@stro.at> | 2010-08-25 20:40:28 +0200 |
commit | 61368211ae1e77fa2ef82bb9135c7b8e9447023e (patch) | |
tree | f88639fe94e360b929c3cad1c491813d5efb7a05 | |
parent | 2028152b7af7700e01bd3300c3f7d903afbf34de (diff) | |
download | klibc-61368211ae1e77fa2ef82bb9135c7b8e9447023e.tar.gz |
[klibc] run-init: get rid of over paranoid test for /initklibc-1.5.20
switch_root in util-linux hasn't it either.
cc0c0262 added the checks, but probably didn't have the following
application in mind.
In fact it can break chainloading of bigger initramfs out of small one:
"I boot via pxe, kernel + very small ramfs this ramfs start an
application that grabs a bigger ramfs and store it locally
I did the following: creating a tmpfs, uncpio the ramfs and try to
run-init on it, but my miniramfs doesn't have a /init as I specified
rdinit=/sbin/init."
So for now just get rid of that check.
Reported-by: Erwan Velu <erwan.velu@zodiacaerospace.com>
Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r-- | usr/kinit/run-init/runinitlib.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/usr/kinit/run-init/runinitlib.c b/usr/kinit/run-init/runinitlib.c index 423637e20a62e..50baa3d3edacc 100644 --- a/usr/kinit/run-init/runinitlib.c +++ b/usr/kinit/run-init/runinitlib.c @@ -176,10 +176,6 @@ const char *run_init(const char *realroot, const char *console, if (rst.st_dev == cst.st_dev) return "current directory on the same filesystem as the root"; - /* The initramfs should have /init */ - if (stat("/init", &ist) || !S_ISREG(ist.st_mode)) - return "can't find /init on initramfs"; - /* Make sure we're on a ramfs */ if (statfs("/", &sfs)) return "statfs /"; |