debugging
This commit is contained in:
parent
bc059a3f04
commit
d5d7fe5956
1 changed files with 7 additions and 4 deletions
|
|
@ -24,6 +24,7 @@ while read -r f; do
|
||||||
kernel_updated="yes"
|
kernel_updated="yes"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
printf "Kernel updated: %s\n" $kernel_updated
|
||||||
|
|
||||||
declare -r SNAPPER_CONFIG_FILE=/etc/conf.d/snapper
|
declare -r SNAPPER_CONFIG_FILE=/etc/conf.d/snapper
|
||||||
declare -r DESC_LIMIT=48
|
declare -r DESC_LIMIT=48
|
||||||
|
|
@ -79,15 +80,17 @@ for CONFIG in $SNAPPER_CONFIGS; do
|
||||||
if [[ "$pre_or_post" == "pre" ]]; then
|
if [[ "$pre_or_post" == "pre" ]]; then
|
||||||
x=$($snapper_cmd "$(truncate_description $PACMAN_PRE_DESCRIPTION)")
|
x=$($snapper_cmd "$(truncate_description $PACMAN_PRE_DESCRIPTION)")
|
||||||
printf "==> %s: $(echo $x | tee "$prefile")\n" "$CONFIG"
|
printf "==> %s: $(echo $x | tee "$prefile")\n" "$CONFIG"
|
||||||
elif [[ -f $prefile && "$pre_or_post" == "post" ]]; then
|
|
||||||
if [[ $CONFIG == "root" && $PACMAN_KEEP_OLD_KERNELS == "yes" && $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"
|
||||||
printf "==> Linking old kernels and modules..."
|
|
||||||
x=$(<$prefile)
|
|
||||||
find /usr/lib/modules -xtype l -delete
|
find /usr/lib/modules -xtype l -delete
|
||||||
find /boot/old -xtype l -delete
|
find /boot/old -xtype l -delete
|
||||||
ln -s /.snapshots/$x/snapshot/boot/vmlinuz-linux/boot/old/vmlinuz-linux-$(uname -r)
|
ln -s /.snapshots/$x/snapshot/boot/vmlinuz-linux/boot/old/vmlinuz-linux-$(uname -r)
|
||||||
ln -s /.snapshots/$x/snapshot/usr/lib/modules/$(uname -r) /usr/lib/modules/
|
ln -s /.snapshots/$x/snapshot/usr/lib/modules/$(uname -r) /usr/lib/modules/
|
||||||
|
fi
|
||||||
|
elif [[ -f $prefile && "$pre_or_post" == "post" ]]; 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
|
kver=$(pacman -Q linux | awk '{print $2}')-ARCH
|
||||||
mv /boot/vmlinuz-linux /boot/vmlinuz-linux-$kver
|
mv /boot/vmlinuz-linux /boot/vmlinuz-linux-$kver
|
||||||
mv /boot/initramfs-linux.img /boot/initramfs-linux-$kver.img
|
mv /boot/initramfs-linux.img /boot/initramfs-linux-$kver.img
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue