Ниже приведена логика Bash для компиляции и установки ядра Linux, если в номере патча в версии ядра Linux. < /p> [code]post_kernel_postinst() { # Extract the new and current kernal verisons NEW_KV=$(eselect kernel show | tail -n 1 | grep -oE '[0-9\.]{5,7}') CURRENT_KV=$(uname -r | grep -oE '[0-9\.]{5,7}')
# Split the version strings into arrays IFS='.' read -r -a NEW_KV_ARR post_kernel_postinst() { # Extract the new and current kernal verisons NEW_KV=$(eselect --color=no kernel show | tail -n 1 | grep -oE '[0-9.]{5,7}') CURRENT_KV=$(uname -r | grep -oE '[0-9.]{5,7}')
# Split the version strings into arrays IFS='.' read -r -a NEW_KV_ARR greninja@ash ~ $ source ./temp.sh NEW_KV 6.14.3 CURRENT_KV 6.14.3 NEW_KERNEL_PATCH_VERSION 3 CURRENT_KERNEL_PATCH_VERSION 3 GoodBye!!