2021-08-24 07:55:14 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#########################
|
|
|
|
# Alnux sel(ect) Script #
|
|
|
|
#########################
|
|
|
|
. "/etc/al/lnver.v"
|
|
|
|
case $1 in
|
2021-08-24 08:32:32 +03:00
|
|
|
linux) if [ $(whoami) != root ]; then
|
|
|
|
case $2 in
|
2021-08-24 07:55:14 +03:00
|
|
|
list) ls /usr/src/ | grep 'linux' &&
|
|
|
|
ls -L /usr/src/linux 2>/dev/null
|
|
|
|
;;
|
|
|
|
set) lnver=${3} > /etc/al/lnver.v
|
|
|
|
;;
|
|
|
|
link) ln -sv /usr/src/linux-${lnver} /usr/src/linux &&
|
|
|
|
mkdir -pv /var/aps/packages/linux/ &&
|
|
|
|
echo "/boot/vmlinuz-linux-${lnver}" > /var/aps/packages/linux/payloadfiles &&
|
|
|
|
echo "/usr/src/${lnver}" >> /var/aps/packages/linux/payloadfiles &&
|
|
|
|
echo "pkg_config_deploy=true" > /var/aps/packages/linux/package &&
|
|
|
|
echo "pkg_config_ver='${lnver}'" >> /var/aps/packages/linux/package &&
|
|
|
|
echo "pkg_config_name='linux'" >> /var/aps/packages/linux/package &&
|
|
|
|
echo "pkg_config_makedepends=''" >> /var/aps/packages/linux/package &&
|
|
|
|
echo "pkg_config_depends=''" >> /var/aps/packages/linux/package
|
|
|
|
;;
|
|
|
|
esac
|
2021-08-24 08:32:32 +03:00
|
|
|
fi
|
2021-08-24 07:55:14 +03:00
|
|
|
esac
|