summaryrefslogtreecommitdiffstats
path: root/modules.d/99base/parse-root-opts.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xmodules.d/99base/parse-root-opts.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules.d/99base/parse-root-opts.sh b/modules.d/99base/parse-root-opts.sh
new file mode 100755
index 0000000..9525249
--- /dev/null
+++ b/modules.d/99base/parse-root-opts.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# shellcheck disable=SC2034
+root=$(getarg root=)
+
+rflags="$(getarg rootflags=)"
+getargbool 0 ro && rflags="${rflags},ro"
+getargbool 0 rw && rflags="${rflags},rw"
+rflags="${rflags#,}"
+
+fstype="$(getarg rootfstype=)"
+if [ -z "$fstype" ]; then
+ fstype="auto"
+fi