On Mon, Sep 26, 2011 at 8:22 PM, Dave Reisner <d@falconindy.com> wrote:
This is a constant which will never vary based on setup. Do it during the build to save the forks at runtime. And why does/how can new_root get the same treatment? I'm speaking as one trying to be unfamiliar with the guts here, but worth at least mentioning in the commit message so it doesn't look unintentional.
Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- init | 4 ---- install/base | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/init b/init index f14261d..8891a69 100644 --- a/init +++ b/init @@ -1,12 +1,8 @@ #!/bin/busybox ash -# Install busybox's applets as symlinks PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-busybox --install -s - . /init_functions
-mkdir -p /new_root mount -t proc proc /proc -o nosuid,noexec,nodev mount -t sysfs sys /sys -o nosuid,noexec,nodev if grep -q devtmpfs /proc/filesystems 2>/dev/null; then diff --git a/install/base b/install/base index e85551c..9135ced 100644 --- a/install/base +++ b/install/base @@ -1,10 +1,13 @@ #!/bin/bash
build() { - for dir in proc sys dev run usr/{bin,sbin}; do + for dir in proc sys dev run usr/{bin,sbin} new_root; do add_dir "/$dir" done
+ # install busybox's applets as symlinks + /lib/initcpio/busybox --install -s "$BUILDROOT/usr/bin" + add_binary /lib/initcpio/busybox /bin/busybox add_binary /sbin/modprobe add_binary /sbin/blkid -- 1.7.6.4