|
|
@ -1161,6 +1161,9 @@ start_iscsi() {
|
|
|
|
# It is either the root or a swap, other devices are supported in the scripts provided with sys-fs/cryptsetup-luks
|
|
|
|
# It is either the root or a swap, other devices are supported in the scripts provided with sys-fs/cryptsetup-luks
|
|
|
|
# $1 - root/swap
|
|
|
|
# $1 - root/swap
|
|
|
|
open_luks() {
|
|
|
|
open_luks() {
|
|
|
|
|
|
|
|
# TODO(lxnay): what has been seen, cannot be unseen.
|
|
|
|
|
|
|
|
# TODO(lxnay): there is so much wrong in this function...
|
|
|
|
|
|
|
|
|
|
|
|
# please use 'tr' and this line, or remove it
|
|
|
|
# please use 'tr' and this line, or remove it
|
|
|
|
# eval local TYPE=$(uppercase $1)
|
|
|
|
# eval local TYPE=$(uppercase $1)
|
|
|
|
|
|
|
|
|
|
|
@ -1328,6 +1331,7 @@ start_luks() {
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO(lxnay): this sleep 6 thing is hurting my eyes sooooo much.
|
|
|
|
# same for swap, but no need to sleep if root was unencrypted
|
|
|
|
# same for swap, but no need to sleep if root was unencrypted
|
|
|
|
[ -n "${CRYPT_SWAP_KEY}" ] && [ -z "${CRYPT_SWAP_KEYDEV}" ] \
|
|
|
|
[ -n "${CRYPT_SWAP_KEY}" ] && [ -z "${CRYPT_SWAP_KEYDEV}" ] \
|
|
|
|
&& { [ -z "${CRYPT_ROOT}" ] && sleep 6; bootstrap_key "SWAP"; }
|
|
|
|
&& { [ -z "${CRYPT_ROOT}" ] && sleep 6; bootstrap_key "SWAP"; }
|
|
|
@ -1364,7 +1368,6 @@ verbose_kmsg() {
|
|
|
|
[ -n "$QUIET" ] && echo '6' > /proc/sys/kernel/printk
|
|
|
|
[ -n "$QUIET" ] && echo '6' > /proc/sys/kernel/printk
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cdupdate() {
|
|
|
|
cdupdate() {
|
|
|
|
if is_livecd
|
|
|
|
if is_livecd
|
|
|
|
then
|
|
|
|
then
|
|
|
@ -1977,7 +1980,7 @@ rootdev_init() {
|
|
|
|
|
|
|
|
|
|
|
|
good_msg "Mounting ${REAL_ROOT} as root..."
|
|
|
|
good_msg "Mounting ${REAL_ROOT} as root..."
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: determine if it's possible to move this crufty thing into fstype_init
|
|
|
|
# TODO(lxnay): determine if it's possible to move this crufty thing into fstype_init
|
|
|
|
if [ "${ROOTFSTYPE}" = 'zfs' ]
|
|
|
|
if [ "${ROOTFSTYPE}" = 'zfs' ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
if [ "$(zfs get -H -o value mountpoint ${REAL_ROOT})" = 'legacy' ]
|
|
|
|
if [ "$(zfs get -H -o value mountpoint ${REAL_ROOT})" = 'legacy' ]
|
|
|
|