X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 064C4DC1B34 for ; Sat, 29 Aug 2015 17:13:27 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id D28E5DC013A for ; Sat, 29 Aug 2015 17:13:26 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D99DD203A6 for ; Sat, 29 Aug 2015 13:13:24 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Sat, 29 Aug 2015 13:13:24 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=jlyo.org; h=date :from:message-id:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh= F4vKaJdz8NqFwVmZlebqsbCwArY=; b=QRjIHSgatxKXw3S8geCFuTZ7qjTp6r7R g3snioLPT1JUSLr7P93W+RsMrhstgHq/Vu249JUMQ0iBrM8zB3TWpglIBw+p9qZb 5SGcKrQqRQwWu+Qn2Tvi2cUbEAaJW0YJLphcZIYsXU7bt8WZpa0Bz9IIW+r/Yq/5 aBnkGW1YHfg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=F4vKaJdz8NqFwVmZlebqsbCwAr Y=; b=BpukD6Xz1QfhGhMFdHGCF3C9R7mt/lm1X11BV4YYVJ7aXMaCZcivmwPLDv /Qf+Y0oQTCbJqeXLce3hzm7Mnj+zdR4XCHJaEwMcbAtU30Kr4TccK9rQjrHyfnoW p52LW7Bt4PPDQzzobj1UUMeVodBdt6kaQvPTyUdvyQz76X9E0= X-Sasl-enc: w/wK2xMnlOKxP4EsPEDU0C+FcJoNRAn35v2a5mg52Nu4 1440868404 Received: from bard.jlyo.org (c-67-175-216-24.hsd1.il.comcast.net [67.175.216.24]) by mail.messagingengine.com (Postfix) with ESMTPA id 8FF07680090 for ; Sat, 29 Aug 2015 13:13:24 -0400 (EDT) Received: (qmail 30547 invoked by uid 204); 29 Aug 2015 17:13:23 -0000 From: Jesse Young To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH] init: make init a /proc/cmdline option Date: Sat, 29 Aug 2015 12:13:22 -0500 Message-Id: <1440868402-30501-1-git-send-email-jlyo@jlyo.org> X-Mailer: git-send-email 2.5.0 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- initramfs-init.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/initramfs-init.in b/initramfs-init.in index 934fe92..aa68db5 100755 --- a/initramfs-init.in +++ b/initramfs-init.in @@ -386,8 +386,8 @@ find_boot_repositories() { set -- $(cat /proc/cmdline) myopts="alpine_dev autodetect autoraid chart cryptroot cryptdm debug_init - dma init_args keep_apk_new modules ovl_dev pkgs quiet root_size root - usbdelay ip alpine_repo apkovl alpine_start splash blacklist + dma init init_args keep_apk_new modules ovl_dev pkgs quiet root_size + root usbdelay ip alpine_repo apkovl alpine_start splash blacklist overlaytmpfs rootfstype rootflags" for opt; do @@ -566,7 +566,7 @@ if [ -n "$KOPT_root" ]; then fi done sync - exec /bin/busybox switch_root $sysroot $chart_init /sbin/init $KOPT_init_args + exec /bin/busybox switch_root $sysroot $chart_init ${KOPT_init:-/sbin/init} $KOPT_init_args echo "initramfs emergency recovery shell launched" exec /bin/busybox sh fi @@ -825,9 +825,9 @@ if [ "$KOPT_chart" = yes ]; then chart_init="/sbin/bootchartd start-rootfs" fi -if [ ! -x $sysroot/sbin/init ]; then +if [ ! -x "${sysroot}${KOPT_init:-/sbin/init}" ]; then [ "$KOPT_splash" != "no" ] && echo exit > $sysroot/$splashfile - echo "/sbin/init not found in new root. Launching emergency recovery shell" + echo "${KOPT_init:-/sbin/init} not found in new root. Launching emergency recovery shell" echo "Type exit to continue boot." /bin/busybox sh fi @@ -843,7 +843,7 @@ sync [ "$KOPT_splash" = "init" ] && echo exit > $sysroot/$splashfile echo "" -exec /bin/busybox switch_root $sysroot $chart_init /sbin/init $KOPT_init_args +exec /bin/busybox switch_root $sysroot $chart_init ${KOPT_init:-/sbin/init} $KOPT_init_args [ "$KOPT_splash" != "no" ] && echo exit > $sysroot/$splashfile echo "initramfs emergency recovery shell launched" -- 2.5.0 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---