From 67a89013cd040c11910fad4fb42f14e3bb261aac Mon Sep 17 00:00:00 2001 From: James Barnett Date: Tue, 18 Apr 2017 20:18:26 -0500 Subject: [PATCH] and --- scripts/snap-pac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/snap-pac b/scripts/snap-pac index a23a012..c428e30 100755 --- a/scripts/snap-pac +++ b/scripts/snap-pac @@ -84,7 +84,7 @@ for CONFIG in $SNAPPER_CONFIGS; do printf "Kernel updated: %s\n" $kernel_updated printf "PACMAN_KEEP_OLD_KERNELS: %s\n" $PACMAN_KEEP_OLD_KERNELS printf "CONFIG: %s\n" $CONFIG - if [[ "$CONFIG" == "root" -a "$PACMAN_KEEP_OLD_KERNELS" == "yes" -a "$kernel_updated" == "yes" ]]; then + if [[ "$CONFIG" == "root" && "$PACMAN_KEEP_OLD_KERNELS" == "yes" && "$kernel_updated" == "yes" ]]; then printf "==> Linking old kernels and modules...\n" find /usr/lib/modules -xtype l -delete find /boot/old -xtype l -delete @@ -96,7 +96,7 @@ for CONFIG in $SNAPPER_CONFIGS; do printf "Kernel updated: %s\n" $kernel_updated printf "PACMAN_KEEP_OLD_KERNELS: %s\n" $PACMAN_KEEP_OLD_KERNELS printf "CONFIG: %s\n" $CONFIG - if [[ "$CONFIG" == "root" -a "$PACMAN_KEEP_OLD_KERNELS" == "yes" -a "$kernel_updated" == "yes" ]]; then + if [[ "$CONFIG" == "root" && "$PACMAN_KEEP_OLD_KERNELS" == "yes" && "$kernel_updated" == "yes" ]]; then [[ -d /boot/old ]] && mkdir -p /boot/old printf "==> Linking old kernels and modules...\n" kver=$(pacman -Q linux | awk '{print $2}')-ARCH