--- alx-src/branches/alxconf_20060908/bin/update-alx.sh 2010/10/18 14:22:07 1580 +++ alx-src/branches/alxconf_20060908/bin/update-alx.sh 2010/11/23 12:20:59 1581 @@ -17,6 +17,8 @@ mount_server() { + local ret + [ ! -d ${TEMPDIR} ] && install -d ${TEMPDIR} # use cifs only if supported modprobe cifs &> /dev/null @@ -25,14 +27,18 @@ mount -t cifs "${SERVER_SHARE}" \ ${TEMPDIR} \ -o user="${USER}",pass="${PASS}" + ret="$?" else # unix extensions must be enabled on server-side ! mount -t smbfs "${SERVER_SHARE}" \ ${TEMPDIR} \ -o username="${USER}",password="${PASS}" + ret="$?" fi sleep 3 + + return "${ret}" } umount_server() @@ -76,7 +82,7 @@ fi # mount the server share to TEMPDIR - mount_server + mount_server || die "netshare mount failed, updated aborted." # now fake a new builddir so that multiple clients # can use one server share @@ -92,27 +98,19 @@ echo "Fetching mage database update ..." mage update > /dev/null || die "mage update" -### demo hotfix### -#cp /usr/mage/profiles/alx-041/* /etc/mage-profile -#cp /usr/mage/fake/basesystem041-alx/basesystem041-alx-0.3-r1.mage \ -# /usr/mage/fake/basesystem-alx/basesystem-alx-0.3-r1.mage -#sed -i 's:PKGNAME="basesystem041-alx-0.3-${ARCH}-r1":PKGNAME="basesystem-alx-0.3-${ARCH}-r1":g' \ -# /usr/mage/fake/basesystem-alx/basesystem-alx-0.3-r1.mage - - -# an to be sure mount boot (kernel updates !) +# to be safe, mount boot (kernel updates !) mount /boot &> /dev/null # first update mage mage install mage-alx || die "install mage" -# than clean forcefully all packages that does not fit the profile +# then clean forcefully all packages that does not fit the profile if [ -f /etc/mage-profile/forced-uninstall ] then sh /etc/mage-profile/forced-uninstall fi -# than update the whole system +# update the whole system mageupgrade --no-calc --autoclean --autoanswer || die "system upgrade" #--debug # umount BUILDDIR