File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,15 @@ function module_headers () {
1616
1717 if [[ -f /etc/armbian-release ]]; then
1818 source /etc/armbian-release
19+ # branch information is stored in armbian-release at boot time. When we change kernel branches, we need to re-read this and add it
20+ if [[ -z " ${BRANCH} " ]]; then
21+ BRANCH=$( dpkg -l | grep -E " linux-image" | grep -E " current|vendor|legacy|edge" | awk ' {print $2}' | cut -d" -" -f3 | head -1)
22+ if grep -q BRANCH /etc/armbian-release; then
23+ [[ -n ${BRANCH} ]] && sed -i " s/BRANCH=.*/BRANCH=$BRANCH /g" /etc/armbian-release
24+ else
25+ [[ -n ${BRANCH} ]] && echo " BRANCH=$BRANCH " >> /etc/armbian-release
26+ fi
27+ fi
1928 local install_pkg=" linux-headers-${BRANCH} -${LINUXFAMILY} "
2029 else
2130 local install_pkg=" linux-headers-$( uname -r | sed ' s/' -$( dpkg --print-architecture) ' //' ) "
You can’t perform that action at this time.
0 commit comments