aboutsummaryrefslogtreecommitdiff
path: root/skel/init
diff options
context:
space:
mode:
Diffstat (limited to 'skel/init')
-rwxr-xr-xskel/init6
1 files changed, 5 insertions, 1 deletions
diff --git a/skel/init b/skel/init
index 62e8b52..d8a130d 100755
--- a/skel/init
+++ b/skel/init
@@ -17,12 +17,16 @@ rescue() {
}
root=$(var root)
+if ! echo "$root" | grep -q '^/dev/';then
+ root=$(findfs "$root")
+fi
init=$(var init)
[ -z "$init" ] && init="/sbin/init"
fsck -p "$root" || rescue
-mount -o ro $(findfs "$root") /mnt/root || rescue
+mkdir /mnt/root
+mount -o ro "$root" /mnt/root || rescue
arg rescue && rescue