simplify case

This commit is contained in:
illiliti 2020-02-19 10:53:43 +03:00
parent 07edd6a6c2
commit 3f2cd7cca5
2 changed files with 13 additions and 23 deletions

20
init
View File

@ -58,21 +58,11 @@ setup_udev() {
findfs_sh() { findfs_sh() {
case "${1%%=*}" in case "${1%%=*}" in
LABEL) LABEL) device="/dev/disk/by-label/${1##*=}" ;;
device="/dev/disk/by-label/${1##*=}" UUID) device="/dev/disk/by-uuid/${1##*=}" ;;
;; PARTUUID) device="/dev/disk/by-partuuid/${1##*=}" ;;
UUID) /dev/*) device="$1" ;;
device="/dev/disk/by-uuid/${1##*=}" *) panic "findfs option broken" ;;
;;
PARTUUID)
device="/dev/disk/by-partuuid/${1##*=}"
;;
/dev/*)
device="$1"
;;
*)
panic "findfs option broken"
;;
esac esac
# avoid race condition # avoid race condition