Commit a60e8461 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Kernel headers install/uninstall bugfix

parent 851fc2bd
...@@ -134,27 +134,34 @@ function jobs () ...@@ -134,27 +134,34 @@ function jobs ()
;; ;;
#
# Install kernel headers # Install kernel headers
# #
"Headers" ) "Headers" )
if ! is_package_manager_running; then if ! is_package_manager_running; then
TARGET_BRANCH=$BRANCH TARGET_BRANCH=$BRANCH
exceptions "$BRANCH" exceptions "$BRANCH"
REMOVE_PKG="linux-headers-*"
if [[ -d /etc/armbian ]]; then if [[ -d /etc/armbian ]]; then
INSTALL_PKG="linux-headers${TARGET_BRANCH}-${TARGET_FAMILY}"; INSTALL_PKG="linux-headers${TARGET_BRANCH}-${TARGET_FAMILY}";
else else
INSTALL_PKG="linux-headers-$(uname -r | sed 's/'-$(dpkg --print-architecture)'//')"; INSTALL_PKG="linux-headers-$(uname -r | sed 's/'-$(dpkg --print-architecture)'//')";
fi fi
if [[ -n $(dpkg -l | grep linux-headers) ]]; then if [[ -n $(dpkg -l | grep linux-headers) ]]; then
debconf-apt-progress -- apt-get -y purge ${INSTALL_PKG} debconf-apt-progress -- apt-get -y purge ${REMOVE_PKG}
else else
debconf-apt-progress -- apt-get -y install ${INSTALL_PKG} debconf-apt-progress -- apt-get -y install ${INSTALL_PKG}
fi fi
# cleanup
debconf-apt-progress -- apt -y autoremove
fi fi
;; ;;
# Toggle mini and full firmware # Toggle mini and full firmware
# #
"Full"|"Mini" ) "Full"|"Mini" )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment