blob: 853a0041b36e8b58e2b133a57fcb047dd1325705 (
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
135
136
137
138
139
|
#!/bin/bash
#This script should be used to update from R8.1 to R8.2 ONLY
#
#touch /bin/this_should_stop_it
echo ""
echo "About to update the OS to LinHES 8.2"
echo "This process will only work if currently running LinHES 8.1 or later"
echo "* Please respond with Y to ALL the yes/no questions"
echo "* Answer Y to remove sysvinit"
echo "* If prompted about libgl, select the gl that is appropiate for your system"
echo ""
echo "Press Y to continue, any other key to stop"
read a
if [ x$a != "xY" ]
then
echo " Y NOT selected, exiting"
exit 3
fi
echo "Syncing pacman repos..."
pacman -Ssyy LinHES-system | awk '{print $2}' | grep -q "8.2-"
pr=$?
if [ $pr != 0 ]
then
echo ""
echo "WARNING! The current repos in /etc/pacman.conf do not look like they"
echo " contain packages for LinHES 8.2."
echo "Press Y to continue (not recommended), any other key to stop"
read ans
if [ x$ans != "xY" ]
then
echo " Y NOT selected, exiting"
exit 3
fi
fi
echo "Downloading filesystem and glibc for later use, please wait..."
curl -o filesystem-itermediate.pkg.tar.xz http://linhes.org/repo/x86_64/filesystem-itermediate.pkg.tar.xz
rc=$?
if [ $rc != 0 ]
then
echo "Couldn't download filesystem package"
exit 1
else
echo "filesystem package downloaded"
fi
curl -o glibc-2.18-11-x86_64.pkg.tar.xz http://linhes.org/repo/x86_64/core-testing/glibc-2.18-11-x86_64.pkg.tar.xz
rc=$?
if [ $rc != 0 ]
then
echo "Couldn't download glibc package"
exit 1
else
echo "glibc package downloaded"
fi
echo "Installing tdb..."
pacman -S --noconfirm tdb
echo "Removing miscellanous files not in packages..."
rm -f /usr/lib/libtalloc.so.1
rm -f /usr/lib/libtalloc.so.2
rm -f /etc/ssl/certs/java/cacerts
echo "Removing symlinks not in poweroff-scripts package..."
if [ -L /usr/sbin ]
then
rm -f /usr/sbin/reb*
rm -f /usr/sbin/pow*
rm -f /usr/sbin/hal*
fi
if [ -L /sbin ]
then
rm -f /sbin/reb*
rm -f /sbin/pow*
rm -f /sbin/hal*
fi
echo "Updating packages..."
pacman -Syu lirc lirc-utils --ignore filesystem,bash,glibc
rc=$?
if [ $rc != 0 ]
then
echo "FAILED: pacman -Syu lirc lirc-utils --ignore filesystem,bash,glibc"
exit 2
fi
pacman -R tcp_wrappers --noconfirm
pacman -S bash --noconfirm
rc=$?
if [ $rc != 0 ]
then
echo "FAILED: pacman -S bash"
exit 2
fi
pacman -U ./glibc-2.18-11-x86_64.pkg.tar.xz ./filesystem-itermediate.pkg.tar.xz --noconfirm
rc=$?
if [ $rc != 0 ]
then
echo "Filesystem-itermediate update was unable to install"
echo "Please check /bin /usr/sbin /sbin "
echo "for packages that need to be updated"
exit 2
fi
pacman -Su
if [ -e /etc/udev/rules.d/80-net-name-slot.rules ]
then
rm -f /etc/udev/rules.d/80-net-name-slot.rules
fi
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
pacman -S linux --noconfirm
pacman -S filesystem --noconfirm
rc=$?
if [ $rc != 0 ]
then
echo "Filesystem update was unable to install"
echo "Please check /bin /usr/sbin /sbin "
echo "for packages that need to be updated"
exit 2
else
echo "New filesystem in place"
echo "LinHES 8.2 upgrade was successful!"
echo "Please reboot"
fi
|