From 6c61d7084354f382428c3bd3dd16a499eb7e746b Mon Sep 17 00:00:00 2001 From: navewindre Date: Wed, 18 Jun 2025 07:43:51 +0200 Subject: a --- slackware-bootstrap/bootstrap | 51 +---------------------------------------- slackware-bootstrap/kernel | 2 +- slackware-bootstrap/step1 | 15 ++++++++++++ slackware-bootstrap/step2 | 53 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 51 deletions(-) create mode 100644 slackware-bootstrap/step1 create mode 100644 slackware-bootstrap/step2 diff --git a/slackware-bootstrap/bootstrap b/slackware-bootstrap/bootstrap index 4ff4dd2..5cbe5f7 100755 --- a/slackware-bootstrap/bootstrap +++ b/slackware-bootstrap/bootstrap @@ -2,7 +2,6 @@ basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) username="user" -kernelver="6.15.2" hasuser=0 while getopts u:a:f: flag @@ -25,52 +24,4 @@ echo "working dir: $basedir" sh $basedir/user $username sh $basedir/sudo -sh $basedir/slackpkg -sh $basedir/slpkg -sh $basedir/multilib - -echo "============== [ kernel update ] ===============" -echo "you can choose to update your kernel" -echo "after system reboot." -echo "this will update your kernel to $kernelver" -echo "================================================" - -nreboot=0 - -read -p "do you want to update your kernel [y/n]? (y):" choice -if [[ $choice == "y" ]]; then - nreboot=1 - echo "sh $basedir/kernel" >> /root/.bashrc -fi - -echo "================= [ nvidia driver ] =================" -echo "you can choose to install the nvidia driver" -echo "after system reboot." -echo "this will install the nvidia kernel module and the" -echo "gpu driver." -echo "=====================================================" - -read -p "do you want to install the nvidia driver [y/n]? (y):" choice -if [[ $choice == "y" ]]; then - nreboot=1 - echo "sh $basedir/nvidia-driver" >> /root/.bashrc -fi - -if [[ $nreboot == 1 ]]; then - echo "sh $basedir/finish" >> /root/.bashrc - echo "rm -f /root/.bashrc" >> /root/.bashrc - echo "============================ [ reboot ] ===========================" - printf "\x1b[1;31mupon reboot, make sure to log in as ROOT first !!!\x1b[0;0m\n" - echo "===================================================================" - read -p "press enter to reboot your system" - echo "rebooting..." - reboot -else - sh $basedir/runlevel - - echo "============== [ setup done ] ===============" - echo "username: $username" - echo "you may now log into your user account." - echo "it is recommended to reboot your system now." - echo "==============================================" -fi +sh $basedir/step1 diff --git a/slackware-bootstrap/kernel b/slackware-bootstrap/kernel index 76ea9ad..742c0ff 100755 --- a/slackware-bootstrap/kernel +++ b/slackware-bootstrap/kernel @@ -29,7 +29,7 @@ if [[ $dirstr != '' ]]; then cp .config /boot/config-6.15.2 echo "==================== [ kernel update ] ==========================" - echo "your kernel has been updated by slackpkg. in order to boot," + echo "your kernel has been updated. in order to boot, you will need" echo "you will need to update your bootloader config." echo "if you do not use LILO, or do not boot off of your slackware disk" echo "simply input 'n'" diff --git a/slackware-bootstrap/step1 b/slackware-bootstrap/step1 new file mode 100644 index 0000000..d303a96 --- /dev/null +++ b/slackware-bootstrap/step1 @@ -0,0 +1,15 @@ +#!/bin/bash +basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +sh $basedir/slackpkg + +echo "sh $basedir/step2" >> /root/.bashrc + +echo "=================== [ system reboot ] ==================" +printf "\x1b[1;31mREAD CAREFULLY:\033[0m\n" +echo "your system will now reboot, after reboot make sure to" +printf "SIGN IN \x1b[1;31mAS ROOT\x1b[0m !!!\n" +echo "========================================================" +read -p "press enter to reboot" +reboot + diff --git a/slackware-bootstrap/step2 b/slackware-bootstrap/step2 new file mode 100644 index 0000000..9190bf0 --- /dev/null +++ b/slackware-bootstrap/step2 @@ -0,0 +1,53 @@ +#!/bin/bash +basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +kernelver="6.15.2" + +sh $basedir/slpkg +sh $basedir/multilib + +echo "============== [ kernel update ] ===============" +echo "you can choose to update your kernel" +echo "after system reboot." +echo "this will update your kernel to $kernelver" +echo "================================================" + +nreboot=0 + +read -p "do you want to update your kernel [y/n]? (y):" choice +if [[ $choice == "y" ]]; then + nreboot=1 + sh $basedir/kernel +fi + +echo "================= [ nvidia driver ] =================" +echo "you can choose to install the nvidia driver" +echo "after system reboot." +echo "this will install the nvidia kernel module and the" +echo "gpu driver." +echo "=====================================================" + +read -p "do you want to install the nvidia driver [y/n]? (y):" choice +if [[ $choice == "y" ]]; then + nreboot=1 + sh $basedir/nvidia +fi + +if [[ $nreboot == 1 ]]; then + echo "sh $basedir/finish" >> /root/.bashrc + echo "rm -f /root/.bashrc" >> /root/.bashrc + echo "============================ [ reboot ] ===========================" + printf "\x1b[1;31mupon reboot, make sure to log in as ROOT first !!!\x1b[0;0m\n" + echo "===================================================================" + read -p "press enter to reboot your system" + echo "rebooting..." + reboot +else + sh $basedir/runlevel + + echo "============== [ setup done ] ===============" + echo "username: $username" + echo "you may now log into your user account." + echo "it is recommended to reboot your system now." + echo "==============================================" +fi -- cgit v1.2.3