summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinit12
1 files changed, 8 insertions, 4 deletions
diff --git a/init b/init
index c0ffa88..8630934 100755
--- a/init
+++ b/init
@@ -41,20 +41,24 @@ function log {
function parse_cmdline {
local cmdline=${1}
- dev=''
for i in ${cmdline[@]}; do
case "${i}" in
root=*)
if [[ ${i:5:4} == 'UUID' ]]; then
- #mount by uuid
- ROOTDEV="/dev/disk/by-uuid/$(echo ${i} | cut -d '=' -f 3)"
+ # mount by uuid
+ local uuid=$(echo ${i} | cut -d '=' -f 3)
+ ROOTDEV="$(blkid -U ${uuid})"
+ elif [[ ${i:5:5} == 'LABEL' ]]; then
+ # mount by label
+ local label=$(echo ${i} | cut -d '=' -f 3)
+ ROOTDEV="$(blkid -L ${label})"
else
# mount by dev
ROOTDEV="$(echo ${i} | cut -d '=' -f 2)"
fi
;;
initdebug)
- # Enable debug mode (this is gonna be slow
+ # Enable debug mode (this is gonna be slow)
DEBUG=1
;;
interractive)

Generated by cgit