Compare commits

...

2 Commits

View File

@ -9,7 +9,7 @@ mount -o remount,rw /boot
# Set Kernel Version (KVER) # Set Kernel Version (KVER)
function set_kver() { function set_kver() {
echo "Enter the kernel version to use (e.g., '6.6.18-hardened1'):" echo "Enter the kernel version to use (e.g., '6.6.25-hardened1'):"
while true; do while true; do
read -e -i "${KVER:-}" -p "" KVER read -e -i "${KVER:-}" -p "" KVER
if [[ $(echo $KVER | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(-hardened1)$') == '' ]]; then if [[ $(echo $KVER | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(-hardened1)$') == '' ]]; then
@ -28,7 +28,7 @@ function check_distro(){
case "${distroId,,}" in case "${distroId,,}" in
*void*) *void*)
printf '%s\n' "Detected Void Linux..." printf '%s\n' "Detected Void Linux..."
xbps-install -Sy make gcc xz elfutils elfutils-devel flex ncurses-devel openssl openssl-devel argp-standalone gcc-ada mpc libmpc-devel gmp-devel perl zstd xbps-install -Sy make gcc xz elfutils elfutils-devel flex ncurses-devel openssl openssl-devel argp-standalone gcc-ada mpc libmpc-devel gmp-devel perl zstd bc pahole
return 0 return 0
;; ;;
*debian*|*ubuntu*) *debian*|*ubuntu*)
@ -130,17 +130,15 @@ case "${distroId,,}" in
# Remove sysmap/signing keys # Remove sysmap/signing keys
rm /lib/modules/"$KVER"/source/certs/signing_key* rm /usr/src/linux-hardened-"$KVER"/certs/signing_key*
rm /lib/modules/"$KVER"/source/System.map rm /usr/src/linux-hardened-"$KVER"/System.map
rm /lib/modules/"$KVER"/source
rm /lib/modules/"$KVER"/build
echo "Congrats! Your custom kernel based on the PlagueOS kernel configuration has been installed." echo "Congrats! Your custom kernel based on the PlagueOS kernel configuration has been installed."
echo "Reboot now? (y/N): " read -p "Reboot now? (y/N): " response
read reboot_opt response=$(echo $response | tr '[:upper:]' '[:lower:]')
if [[ $response == "y" ]]; then
if [[ "$reboot_opt" == "Y" ]]; then reboot
reboot
else else
exit echo "Exiting..."
fi fi