summaryrefslogtreecommitdiff
path: root/slackware-bootstrap/update-current
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-07-03 21:59:24 +0200
committernavewindre <boneyaard@gmail.com>2025-07-03 21:59:24 +0200
commitc6c0f342c889eee0e6db6a192a3b5aad510120a7 (patch)
tree20bcd07d179cad849690d10026f80ab8d8724d97 /slackware-bootstrap/update-current
parent8d26fa137a69df86d033a2681f989557c1af32ea (diff)
split
Diffstat (limited to 'slackware-bootstrap/update-current')
-rw-r--r--slackware-bootstrap/update-current81
1 files changed, 81 insertions, 0 deletions
diff --git a/slackware-bootstrap/update-current b/slackware-bootstrap/update-current
new file mode 100644
index 0000000..a0e07fa
--- /dev/null
+++ b/slackware-bootstrap/update-current
@@ -0,0 +1,81 @@
+#!/bin/sh
+basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+printf "\x1b[1;31m======================= [ \x1b[7;31m ATTENTION \x1b[0;0m\x1b[1;31m ] ========================\n\x1b[0;0m"
+printf "\x1b[16;32mREAD CAREFULLY:\n\x1b[0;0m"
+echo "you will now have to switch the branch to -current"
+echo "same as before, you will have to manually"
+echo "edit the mirror list."
+echo "scroll down below the 15.0 section"
+echo "and select a suitable -current mirror"
+printf "\x1b[1;31m================================================================\n\x1b[0;0m"
+
+read -p "press enter to continue"
+nano /etc/slackpkg/mirrors
+
+cp -f $basedir/slackpkg-blacklist-allowkern /etc/slackpkg/blacklist
+echo "running full system update ..."
+slackpkg update
+slackpkg update gpg
+printf "\x1b[1;31m======================= [ \x1b[7;31m ATTENTION \x1b[0;0m\x1b[1;31m ] ========================\n\x1b[0;0m"
+echo "updating slackpkg, if prompted to overwrite configuration files"
+echo "pick 'Remove (R)' !!!!"
+slackpkg upgrade slackpkg
+echo "==== [ updating system... ] ===="
+slackpkg update gpg
+slackpkg upgrade glibc libgcrypt aaa_glibc-solibs glib2 libffi
+slackpkg upgrade gnupg gnupg2 openssl openssl-solibs openssl11 openssl11-solibs
+slackpkg update gpg
+cp -f $basedir/slackpkg-nogpg.conf /etc/slackpkg/slackpkg.conf
+slackpkg install-new
+slackpkg upgrade-all
+slackpkg update gpg
+slackpkg upgrade-all
+cp -f $basedir/slackpkg-blacklist /etc/slackpkg/blacklist
+cp -f $basedir/slackpkg.conf /etc/slackpkg/slackpkg.conf
+
+isgeneric=1
+kernel=$(ls /boot | grep "vmlinuz-generic-" | sort | tail -1 | cut -d '-' -f 3)
+if [[ $kernel == "" ]]; then
+ kernel=$(ls /boot | grep "vmlinuz-[0-9]" | sort | tail -1 | cut -d '-' -f 2)
+ isgeneric=0
+fi
+
+initrdcmd="$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k $kernel)"
+initrdcmd=$(echo $initrdcmd | tail -1)
+$initrdcmd
+
+echo "==================== [ kernel update ] =========================="
+echo "your kernel has been updated by slackpkg. in order to boot,"
+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'"
+echo "================================================================="
+
+read -p "would you like to update your bootloader? [y/n] (y): " choice
+if [[ $choice != 'n' ]]; then
+ liloconfig
+fi
+
+rm /boot/vmlinuz
+if [[ $isgeneric == 1 ]]; then
+ ln -s /boot/vmlinuz-generic-$kernel /boot/vmlinuz
+else
+ ln -s /boot/vmlinuz-$kernel /boot/vmlinuz
+fi
+
+rm /boot/System.map
+if [[ $isgeneric == 1 ]]; then
+ ln -s /boot/System.map-generic-$kernel /boot/System.map
+else
+ ln -s /boot/System.map-$kernel /boot/System.map
+fi
+
+rm /boot/config
+if [[ $isgeneric == 1 ]]; then
+ ln -s /boot/config-generic-$kernel.x64 /boot/config
+else
+ ln -s /boot/config-$kernel.x64 /boot/config
+fi
+
+touch ~/.current-done