Merge pull request #7148 from GabyCT/topic/fixtabsinitscript

packaging: Fix indentation in init.sh script
This commit is contained in:
David Esparza 2023-06-21 07:24:25 -06:00 committed by GitHub
commit 90408d66c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,11 +18,11 @@ echo "/sbin/mdev" > /proc/sys/kernel/hotplug
mdev -s mdev -s
get_option() { get_option() {
local value local value
value=" $(cat /proc/cmdline) " value=" $(cat /proc/cmdline) "
value="${value##* ${1}=}" value="${value##* ${1}=}"
value="${value%% *}" value="${value%% *}"
[ "${value}" != "" ] && echo "${value}" [ "${value}" != "" ] && echo "${value}"
} }
rootfs_verifier=$(get_option rootfs_verity.scheme) rootfs_verifier=$(get_option rootfs_verity.scheme)
@ -32,11 +32,11 @@ hash_device=${root_device%?}2
if [ -e ${root_device} ] && [ -e ${hash_device} ] && [ "${rootfs_verifier}" = "dm-verity" ] if [ -e ${root_device} ] && [ -e ${hash_device} ] && [ "${rootfs_verifier}" = "dm-verity" ]
then then
veritysetup open "${root_device}" root "${hash_device}" "${rootfs_hash}" veritysetup open "${root_device}" root "${hash_device}" "${rootfs_hash}"
mount /dev/mapper/root /mnt mount /dev/mapper/root /mnt
else else
echo "No LUKS device found" echo "No LUKS device found"
mount "${root_device}" /mnt mount "${root_device}" /mnt
fi fi
umount /proc umount /proc