diff --git a/scripts/snap-pac b/scripts/snap-pac index c428e30..9e8a709 100755 --- a/scripts/snap-pac +++ b/scripts/snap-pac @@ -80,11 +80,7 @@ for CONFIG in $SNAPPER_CONFIGS; do if [[ "$pre_or_post" == "pre" ]]; then x=$($snapper_cmd "$(truncate_description $PACMAN_PRE_DESCRIPTION)") printf "==> %s: $(echo $x | tee "$prefile")\n" "$CONFIG" -#FIXME - 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" && "$PACMAN_KEEP_OLD_KERNELS" == "yes" && "$kernel_updated" == "yes" ]]; then + if [[ "$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 @@ -92,11 +88,7 @@ for CONFIG in $SNAPPER_CONFIGS; do ln -s /.snapshots/$x/snapshot/usr/lib/modules/$(uname -r) /usr/lib/modules/ fi elif [[ -f $prefile && "$pre_or_post" == "post" ]]; then -#FIXME - 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" && "$PACMAN_KEEP_OLD_KERNELS" == "yes" && "$kernel_updated" == "yes" ]]; then + if [[ "$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