summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-18 17:38:55 +0100
committerDave Reisner <dreisner@archlinux.org>2012-11-24 00:01:34 +0100
commite8f0c1226fbf87d3be711a36693c30ed7745e45d (patch)
treefde854cb33a7a1966116de46d655a7f48af745bd
parent4976072037baede0faeaf94362e282f26f19d6af (diff)
downloadmkinitcpio-e8f0c1226fbf87d3be711a36693c30ed7745e45d.tar.gz
mkinitcpio-e8f0c1226fbf87d3be711a36693c30ed7745e45d.tar.xz
init: declare defaults earlier
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--init5
1 files changed, 3 insertions, 2 deletions
diff --git a/init b/init
index b375e72..f3f9253 100644
--- a/init
+++ b/init
@@ -1,6 +1,8 @@
#!/usr/bin/ash
udevd_running=0
+mount_handler=default_mount_handler
+init=/sbin/init
if [ -x /usr/bin/systemd-timestamp ]; then
RD_TIMESTAMP=$(systemd-timestamp)
@@ -43,12 +45,11 @@ unset rootdev
fsck_root
# Mount root at /new_root
-${mount_handler:-default_mount_handler} /new_root
+"$mount_handler" /new_root
run_hookfunctions 'run_latehook' 'late hook' $LATEHOOKS
run_hookfunctions 'run_cleanuphook' 'cleanup hook' $CLEANUPHOOKS
-init=${init:-/sbin/init}
if [ "$(stat -c %D /)" = "$(stat -c %D /new_root)" ]; then
# Nothing got mounted on /new_root. This is the end, we don't know what to do anymore
# We fall back into a shell, but the shell has now PID 1