From c6b758e562a15c23c991ce783a9f0b9dbb527601 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Fri, 15 Dec 2006 00:39:48 +0000 Subject: Added new busybox in new place (tools, Makefile, ...) Busybox has modified switch_root (same as for run-init ...) Updated mkdxsinitrd for busybox usage (same has to be done for slxmkramfs when tested properly) Minor fixes ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@536 95ad53e4-c205-0410-b2fa-d234c58c8868 --- tools/busybox | Bin 0 -> 321920 bytes tools/unionfs-run-init | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 tools/busybox (limited to 'tools') diff --git a/tools/busybox b/tools/busybox new file mode 100755 index 00000000..ca196c13 Binary files /dev/null and b/tools/busybox differ diff --git a/tools/unionfs-run-init b/tools/unionfs-run-init index af09bf00..01d71b74 100644 --- a/tools/unionfs-run-init +++ b/tools/unionfs-run-init @@ -22,3 +22,18 @@ drunterliegende Rootfs ... Laengeres Rumprobieren und nun scheint es erstmal zu klappen. Zur Zeit checkt der einfach nur (bis ich das raus hatte :-)) ob ein "/rorootfs" da ist und verschiebt das dann. Wenn nicht, bleibts so wie vorher. + +Gilt auch fuer busybox: + + // Overmount / with newdir and chroot into it. The chdir is needed to + // recalculate "." and ".." links. And check for UnionFS specific +dir. + + if ( !lstat("/rorootfs", &st1 ) ) + if ( mount("/rorootfs", "/", NULL, MS_MOVE, NULL) ) + bb_error_msg_and_die("moving rorootfs"); + + + if (mount(".", "/", NULL, MS_MOVE, NULL) || chroot(".") || +chdir("/")) + bb_error_msg_and_die("moving root"); -- cgit v1.2.3-55-g7522