From 641531cb671f9a172cb60cd2b47a23a3f1a37f83 Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Sun, 5 Mar 2023 10:06:29 -0700 Subject: init:Remove cryptroot option This option existed previously to handle luks encrypted root volumes. However, recent changes allow the init process to detect at runtime encrypted root volumes that are set with the `root` option, so this option is no longer needed and effectively does nothing at this point besides break encrypted device detection when used next to `root`. It is required to only use `root` now. --- init | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/init b/init index 8330797..b1d3fca 100755 --- a/init +++ b/init @@ -19,7 +19,6 @@ export DEBUG=0 export QUIET=0 export INTERACTIVE=0 export ROOTDEV='' -export CRYPTROOT='' export MOUNTOPTS=() screen_init() { @@ -78,18 +77,6 @@ parse_cmdline() { ROOTDEV="${i##*=}" fi ;; - cryptroot=*) - if [ "${i:10:4}" == 'UUID' ]; then - # mount by uuid - CRYPTROOT="/dev/disk/by-uuid/${i##*=}" - elif [ "${i:10:5}" == 'LABEL' ]; then - # mount by label - CRYPTROOT=/dev/disk/by-partlabel/${i##*=} - else - # mount by dev - CRYPTROOT="${i##*=}" - fi - ;; subvol=*) MOUNTOPTS+=(-o subvol=${i#*=}) ;; @@ -144,13 +131,11 @@ udev_populate() { # Start udevd if not already running pidof -s udevd > /dev/null || /sbin/udevd --daemon - /sbin/udevadm trigger --type=subsystems --action=add /sbin/udevadm trigger --type=devices --action=add --subsystem-match=block /sbin/udevadm trigger --type=devices --action=add --subsystem-match=input /sbin/udevadm settle - # Shut down udevd once devices are populated so main init can handle udevd to - # finish booting + # Stop udevd once devices are populated so main udevd can finish booting kill $(pidof udevd) } @@ -204,11 +189,6 @@ main() { log INFO "New rootdev: ${ROOTDEV}" fi - if [ ! -z "${CRYPTROOT}" ]; then - log INFO "Cryptroot defined. Changing rootdev to '${CRYPTROOT}'" - ROOTDEV="${CRYPTROOT}" - fi - # Drop to interactive shell if requested if [ "${INTERACTIVE}" == 1 ]; then log INFO "Interractive shell requested. Type 'exit' to continue boot sequence." -- cgit v1.2.3