which would trigger 'set -e', instead of continuing with correct (empty)
strings.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
boot_kernels="$(boot_kernel_list)"
if [ -e "$MANUAL_KERNEL_LIST" ]; then
- manual_kernels="$(echo "$boot_kernels" | grep -Fx -f "$MANUAL_KERNEL_LIST")"
- boot_kernels="$(echo "$boot_kernels" | grep -Fxv -f "$MANUAL_KERNEL_LIST")"
+ manual_kernels="$(echo "$boot_kernels" | grep -Fx -f "$MANUAL_KERNEL_LIST" || true)"
+ boot_kernels="$(echo "$boot_kernels" | grep -Fxv -f "$MANUAL_KERNEL_LIST" || true)"
fi
if [ -z "$manual_kernels" ]; then
boot_kernel_list() {
list="$(kernel_keep_versions "$@")"
- echo "$list" | grep -E '^[^ ]+-pve'
-
+ echo "$list" | grep -E '^[^ ]+-pve' || true
}
warn() {
cat <<-EOF
/* Debug information:
# dpkg list:
- $(dpkg -l | grep 'pve-kernel')
+ $(dpkg -l | grep -F 'pve-kernel' || true)
# list of installed kernel packages:
$kernels
*/