base-files: functions: introduce new helper functions
authorDaniel Golle <daniel@makrotopia.org>
Wed, 31 Mar 2021 12:47:35 +0000 (13:47 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 31 Mar 2021 15:53:39 +0000 (16:53 +0100)
commitbb107ad9c13d244bf4aed255da913d6000c28833
tree949ef3e7d9cec809f69e9cb03302b5a66e680646
parent0bc5ecf2d0fdc47ccbc60a840e595937e79689c3
base-files: functions: introduce new helper functions

Introduce cmdline_get_var() to /lib/function.sh and make use of it in
export_rootdev() in /lib/upgrade/common.sh, making the code more
simple and removing one level of indentation.
Introduce get_partition_by_name() to /lib/upgrade/common.sh which is
useful on non-EFI GPT platforms like mt7622.
Remove some dead-code while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/base-files/files/lib/functions.sh
package/base-files/files/lib/upgrade/common.sh