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 ()
;;
#
# Install kernel headers
#
"Headers" )
if ! is_package_manager_running; then
TARGET_BRANCH=$BRANCH
exceptions "$BRANCH"
REMOVE_PKG="linux-headers-*"
if [[ -d /etc/armbian ]]; then
INSTALL_PKG="linux-headers${TARGET_BRANCH}-${TARGET_FAMILY}";
else
INSTALL_PKG="linux-headers-$(uname -r | sed 's/'-$(dpkg --print-architecture)'//')";
fi
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
debconf-apt-progress -- apt-get -y install ${INSTALL_PKG}
fi
# cleanup
debconf-apt-progress -- apt -y autoremove
fi
;;
# Toggle mini and full firmware
#
"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