LINUX.ORG.RU

История изменений

Исправление wakuwaku, (текущая версия) :

Теперь так, интересно, будет работать?

KLINK=$(readlink /usr/src/linux)
#.+[0-9]{,3}\.[0-9]{,3}\.[0-9]{,3}\(
LKERN=$(eix -c gentoo-sources | sed -r 's/.+\(([0-9]{,3}\.[0-9]{,3}\.[0-9]{,3})\)\@[0-9]{2}\/[0-9]{2}\/[0-9]{4}\).+/\1/')
[[ $(echo ${LKERN} | wc -c) -le 11 ]] || exit
CKERN=$(uname -r)
LKERN+=-${CKERN##*-}
[[ $KLINK = linux-$LKERN ]] || ln -sT /usr/src/linux-${LKERN} /usr/src/linux && echo '\nSymlink was updated\n\n' || echo '\nFailed to change symlink\n\n' && exit
[[ linux-$CKERN = $KLINK ]] || cp -l "/usr/src/linux-${CKERN}/.config" "/usr/src/linux-${LKERN}/.config" && echo '\nCurrently loaded kernel differs from selected, hard link config file\n\n'
cd /usr/src/linux
make oldconfig
make -j5 menuconfig
make -j5 && make INSTALL_MOD_STRIP=1 -j5 modules_install
mount /boot
cp -v /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-shiawase-${KLINK#*-}
grub2-mkconfig -o /boot/grub2/grub.cfg
find /lib/modules/ -type f -exec chmod -R 644 {} \;
find /lib/modules/ -type d -exec chmod -R 755 {} \;
find /usr/src/linux/ -type d -exec chmod -R 755 {} \;
sed 's/^CONFIG_R8169/\#CONFIG_R8169/' -i /usr/src/linux/.config
emerge @module-rebuild
sed 's/^\#CONFIG_R8169/CONFIG_R8169/' -i /usr/src/linux/.config
Только вот как более старые ядра отнесутся к конфигу от более нового.

Исходная версия wakuwaku, :

Теперь так, интересно, будет работать?

KLINK=$(readlink /usr/src/linux)
#.+[0-9]{,3}\.[0-9]{,3}\.[0-9]{,3}\(
LKERN=$(eix -c gentoo-sources | sed -r 's/.+\(([0-9]{,3}\.[0-9]{,3}\.[0-9]{,3})\)\@[0-9]{2}\/[0-9]{2}\/[0-9]{4}\).+/\1/')
[[ $(echo ${LKERN} | wc -c) -le 11 ]] || exit
CKERN=$(uname -r)
LKERN+=-${CKERN##*-}
[[ $KLINK = linux-$LKERN ]] || ln -sT /usr/src/linux-${LKERN} /usr/src/linux && echo '\nSymlink was updated\n\n' || echo '\nFailed to change symlink\n\n' && exit
[[ linux-$CKERN = $KLINK ]] || cp -l "/usr/src/linux-${CKERN}/.config" "/usr/src/linux-${LKERN}/.config" && echo '\nCurrently loaded kernel differs from selected, hard link config file\n\n'
cd /usr/src/linux
make oldconfig
make -j5 menuconfig
make -j5 && make INSTALL_MOD_STRIP=1 -j5 modules_install
mount /boot
cp -v /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-shiawase-${KLINK#*-}
grub2-mkconfig -o /boot/grub2/grub.cfg
find /lib/modules/ -type f -exec chmod -R 644 {} \;
find /lib/modules/ -type d -exec chmod -R 755 {} \;
find /usr/src/linux/ -type d -exec chmod -R 755 {} \;
sed 's/^CONFIG_R8169/\#CONFIG_R8169/' -i /usr/src/linux/.config
emerge @module-rebuild
sed 's/^\#CONFIG_R8169/CONFIG_R8169/' -i /usr/src/linux/.config