From d5985290012a09c459b919e4243b80de202a91d5 Mon Sep 17 00:00:00 2001 From: Antynea Date: Sun, 30 Aug 2015 02:23:18 +0200 Subject: [PATCH] fixme : detect kernesl and initramfs with spaces fixme : detect kernel and initramfs with spaces --- 41_snapshots-btrfs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index 3875f52..20b398a 100644 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -158,9 +158,9 @@ detect_kernel() done ## Custom name kernel in GRUB_BTRFS_NKERNEL - if [ ! -z ${nkernel} ] ; then + if [ ! -z "${nkernel}" ] ; then for ckernel in "${nkernel[@]}" ; do - [[ ! -f /"$(boot_dir)/${ckernel}" ]] && continue; + [[ ! -f /"$(boot_dir)"/"${ckernel}" ]] && continue; list_kernel+=("$ckernel") done fi @@ -174,10 +174,10 @@ detect_initramfs() done ## Custom name initramfs in GRUB_BTRFS_NINIT - if [ ! -z ${ninit} ] ; then + if [ ! -z "$ninit" ] ; then for cinitramfs in "${ninit[@]}" ; do - [[ ! -f "/$(boot_dir)/${ninit}" ]] && continue; - list_initramfs+=("$ninit") + [[ ! -f /"$(boot_dir)"/"${cinitramfs}" ]] && continue; + list_initramfs+=("$cinitramfs") done fi }