Browse Source

Remove old kernel via dpkg instead of apt

During remove previous kernel apt installs latest available kernel

Change-Id: Ife9c1a57257bd790e01a597d1a853cadd38bb03b
pull/139/head
Sergey Otpuschennikov 7 years ago
parent
commit
5413281426
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      linux/system/kernel.sls

+ 1
- 1
linux/system/kernel.sls View File

@@ -55,7 +55,7 @@ linux_kernel_package:
# Not very Salt-ish.. :-(
linux_kernel_old_absent:
cmd.wait:
- name: "apt-get purge -y $(dpkg -l '*linux-image-[0-9]*' '*linux-headers-[0-9]*' '*linux-image-extra-[0-9]*' | grep -E '^ii' | awk '{print $2}' | grep -v '{{ system.kernel.version }}')"
- name: "dpkg -l '*linux-generic-*[0-9]*' '*linux-image-*[0-9]*' '*linux-headers-*[0-9]*' '*linux-image-extra-*[0-9]*' | grep -E '^ii' | awk '{print $2}' | grep -v '{{ system.kernel.version }}' | xargs dpkg --purge --force-depends"
- watch:
- pkg: linux_kernel_package


Loading…
Cancel
Save