blob: 3a6132384233b4ccabdfd82d3e11b9974a049cd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
#!/bin/sh
basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cp /etc/slackpkg/mirrors $basedir/.mirrors-old
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 "this script will open a text editor to edit the mirror list"
echo "for the package manager."
echo "please uncomment a mirror from a location near you,"
echo "by removing the '#' from the beginning of the line."
printf "\x1b[16;32mONLY CHOOSE ONE MIRROR !\n\x1b[0;0m"
printf "\x1b[16;32mDO NOT CHOOSE A -CURRENT MIRROR NOW !\n\x1b[0;0m"
echo "you can save the file by pressing ctrl+x."
printf "\x1b[1;31m================================================================\n\x1b[0;0m"
read -p "press enter to continue"
nano /etc/slackpkg/mirrors
echo "running slackpkg update ..."
slackpkg update
slackpkg update gpg
echo "============== [ system update ] ==============="
echo "simply press OK on the package selection screen"
echo "================================================"
read -p "press enter to continue"
echo "running full system update ..."
slackpkg upgrade slackpkg
slackpkg upgrade-all
slackpkg install-new
cp -f $basedir/.mirrors-old /etc/slackpkg/mirrors
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
slackpkg upgrade slackpkg
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 # newer versions of slackware dont differentiate -generic and -huge
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
echo "================= [ kde purge ] =================="
echo "due to how install-new works, kde is always"
echo "installed during the first system update."
echo "if you would like, you can now purge the install."
echo "=================================================="
echo "would you like to purge all kde packages now?"
read -p "enter your choice [y/n] (n): " choice
if [[ $choice == 'y' ]]; then
echo "purging kde packages ..."
slackpkg remove kde
fi
echo "================== [ TeX packages ] ==============="
echo "similarly to kde, tex packages are always installed"
echo "during the first system update. if you would like,"
echo "you can now purge the install."
echo "=================================================="
echo "would you like to purge all tex packages now?"
read -p "enter your choice [y/n] (y): " choice
if [[ $choice == 'y' ]]; then
echo "purging tex packages ..."
slackpkg remove texlive
fi
|