# will overwrite the db when it exits.
-#
eval $(apt-config shell APT_CONF_D Dir::Etc::parts/d)
test -n "${APT_CONF_D}" || APT_CONF_D="/etc/apt/apt.conf.d"
config_file=${APT_CONF_D}/01autoremove-kernels
return "$?"
}
-list=$($DPKG -l 'linux-image-[0-9]*'|awk '/^ii/ { print $2 }' | sed -e's/linux-image-//')
+list=$(${DPKG} -l 'linux-image-[0-9]*'|awk '/^ii/ && $2 !~ /-dbg$/ { print $2 }' | sed -e's/linux-image-//')
latest_version=""
previous_version=""
)
cat > "$config_file".dpkg-new <<EOF
-# File autogenerated by $0, do not edit
+// File autogenerated by $0, do not edit
APT
{
NeverAutoRemove
echo " \"^linux-image-extra-${kernel}$\";" >> "$config_file".dpkg-new
echo " \"^linux-signed-image-${kernel}$\";" >> "$config_file".dpkg-new
echo " \"^linux-backports-modules-.*-${kernel}$\";" >> "$config_file".dpkg-new
+ echo " \"^linux-headers-${kernel}$\";" >> "$config_file".dpkg-new
done
cat >> "$config_file".dpkg-new <<EOF
};