Skip to content

Commit

Permalink
dont assume busybox is available
Browse files Browse the repository at this point in the history
  • Loading branch information
falconindy committed Apr 22, 2011
1 parent 1dd110d commit 63eda44
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions init.c
Expand Up @@ -27,6 +27,7 @@
#define TMPFS_FLAGS MS_NOEXEC|MS_NODEV|MS_NOSUID

#define NEWROOT "/new_root"
#define BUSYBOX "/bin/busybox"
#define UDEVD "/sbin/udevd"
#define UDEVADM "/sbin/udevadm"

Expand Down Expand Up @@ -159,8 +160,12 @@ static void delete_contents(char *path, dev_t rootdev) { /* {{{ */
} /* }}} */

static void start_rescue_shell(void) { /* {{{ */
char *bboxinstall[] = { "/bin/busybox", "--install", NULL };
char *bboxlaunch[] = { "/bin/busybox", "ash", NULL };
char *bboxinstall[] = { BUSYBOX, "--install", NULL };
char *bboxlaunch[] = { BUSYBOX, "ash", NULL };

if (access(BUSYBOX, X_OK) != 0) {
return;
}

/* install symlinks */
forkexecwait(bboxinstall);
Expand Down

0 comments on commit 63eda44

Please sign in to comment.