aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <somasis@exherbo.org>2016-02-12 00:32:02 -0500
committerKylie McClain <somasis@exherbo.org>2016-02-12 00:32:43 -0500
commitcda7e1eea147d3042e18c97eeefa6e28ea8f5c79 (patch)
treed1e85210aefddde8e24743ce4f2930a5f6214a4d
parente82b3beb083f47bdd0cf8cbc31be341d32a7f7fa (diff)
downloadlighter-cda7e1eea147d3042e18c97eeefa6e28ea8f5c79.tar.gz
lighter-cda7e1eea147d3042e18c97eeefa6e28ea8f5c79.tar.xz
lighter-cda7e1eea147d3042e18c97eeefa6e28ea8f5c79.zip
init: use findfs on things that don't start with /dev
-rwxr-xr-xskel/init6
-rw-r--r--skel/mnt/.keep0
2 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
diff --git a/skel/mnt/.keep b/skel/mnt/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/skel/mnt/.keep