mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-08-01 15:09:33 +08:00
10 lines
319 B
Plaintext
10 lines
319 B
Plaintext
[ "$ACTION" = "add" ] && {
|
|
[ "$(uci -q get partexp.global.target_disk)" ] || {
|
|
target_disk="$(lsblk -o NAME | grep sd | grep -v "[0-9]" | tail -n 1)"
|
|
[ "$(block info | grep "$target_disk" | grep "kernel")" ] || {
|
|
uci -q set partexp.global.target_disk="$target_disk"
|
|
uci commit partexp
|
|
}
|
|
}
|
|
}
|