summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-10-20 19:00:16 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-10-20 19:00:16 (GMT)
commitbe2c4f5e6bf5ea5423ae9abd6bc1dcc3491bd3ca (patch)
tree83e4a545f65de8085097015f8707b4a4f8fff322 /abs/core
parent4c7427ac2a34fd0cf47f2ef83372d8d2c77a5fff (diff)
downloadlinhes_pkgbuild-be2c4f5e6bf5ea5423ae9abd6bc1dcc3491bd3ca.zip
linhes_pkgbuild-be2c4f5e6bf5ea5423ae9abd6bc1dcc3491bd3ca.tar.gz
linhes_pkgbuild-be2c4f5e6bf5ea5423ae9abd6bc1dcc3491bd3ca.tar.bz2
update81-82.sh: add warning if R8.2 pkgs are not found in repo
check /sbin and /usr/sbin if symlinks
Diffstat (limited to 'abs/core')
-rw-r--r--abs/core/update81-82.sh55
1 files changed, 37 insertions, 18 deletions
diff --git a/abs/core/update81-82.sh b/abs/core/update81-82.sh
index 60c1a02..8967549 100644
--- a/abs/core/update81-82.sh
+++ b/abs/core/update81-82.sh
@@ -7,7 +7,7 @@
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 "* 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 ""
@@ -17,15 +17,31 @@ echo "Press Y to continue, any other key to stop"
read a
if [ x$a != "xY" ]
then
- echo " Y NOT selected, exiting"
- exit 3
+ echo " Y NOT selected, exiting"
+ exit 3
fi
+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"
+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 ]
@@ -47,35 +63,39 @@ else
fi
+pacman -S --noconfirm tdb
-
-pacman -Sy --noconfirm tdb
-echo "Removing select symlinks and files not in poweroff-scripts package "
+echo "Removing select symlinks and files not in poweroff-scripts package..."
rm -f /usr/lib/libtalloc.so.1
rm -f /usr/lib/libtalloc.so.2
-rm -f /usr/sbin/re*
-rm -f /usr/sbin/pow*
-rm -f /usr/sbin/hal*
-rm -f /sbin/re*
-rm -f /sbin/pow*
-rm -f /sbin/hal*
+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 --ignore filesystem,bash,glibc
pacman -R tcp_wrappers --noconfirm
pacman -S bash --noconfirm
-
-
-
pacman -U ./glibc-2.18-11-x86_64.pkg.tar.xz ./filesystem-itermediate.pkg.tar.xz --noconfirm
rc=$?
if [ $rc != 0 ]
then
- echo "Filesystem update was unable to install"
+ 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
@@ -104,4 +124,3 @@ else
echo "upgrade was a success"
echo "please reboot"
fi
-