simplify case
This commit is contained in:
parent
07edd6a6c2
commit
3f2cd7cca5
6
generate
6
generate
@ -368,10 +368,10 @@ fi
|
|||||||
generate_depmod
|
generate_depmod
|
||||||
|
|
||||||
case "$devmgr" in
|
case "$devmgr" in
|
||||||
mdev) install_mdev ;;
|
mdev) install_mdev ;;
|
||||||
mdevd) install_mdevd ;;
|
mdevd) install_mdevd ;;
|
||||||
udev) install_udev ;;
|
udev) install_udev ;;
|
||||||
*) msg panic "devmgr option broken" ;;
|
*) msg panic "devmgr option broken" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ "$luks" = 1 ] && install_luks
|
[ "$luks" = 1 ] && install_luks
|
||||||
|
30
init
30
init
@ -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
|
||||||
@ -95,9 +85,9 @@ mnt_rootfs() {
|
|||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
case "$devmgr" in
|
case "$devmgr" in
|
||||||
mdev) { printf "" > /proc/sys/kernel/hotplug || killall uevent; } > /dev/null 2>&1 ;;
|
mdev) { printf "" > /proc/sys/kernel/hotplug || killall uevent; } > /dev/null 2>&1 ;;
|
||||||
mdevd) killall mdevd ;;
|
mdevd) killall mdevd ;;
|
||||||
udev) udevadm control --exit ;;
|
udev) udevadm control --exit ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# unmount pseudofs's
|
# unmount pseudofs's
|
||||||
@ -119,10 +109,10 @@ boot_system() {
|
|||||||
mnt_pseudofs
|
mnt_pseudofs
|
||||||
|
|
||||||
case "$devmgr" in
|
case "$devmgr" in
|
||||||
mdev) setup_mdev ;;
|
mdev) setup_mdev ;;
|
||||||
mdevd) setup_mdevd ;;
|
mdevd) setup_mdevd ;;
|
||||||
udev) setup_udev ;;
|
udev) setup_udev ;;
|
||||||
*) panic "devmgr option broken" ;;
|
*) panic "devmgr option broken" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# TODO handle situations when LUKS on LVM
|
# TODO handle situations when LUKS on LVM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user