Magellan Linux

Diff of /alx-src/branches/alxconf-060/bin/update-alx.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3467 by niro, Tue Jun 14 10:43:26 2011 UTC revision 3468 by niro, Fri Apr 13 17:34:40 2012 UTC
# Line 24  diskfree() Line 24  diskfree()
24   df -kP "${dev}" |grep "${dev}" | xargs | cut -d' ' -f4   df -kP "${dev}" |grep "${dev}" | xargs | cut -d' ' -f4
25  }  }
26    
   
27  mount_server()  mount_server()
28  {  {
29   local ret   local ret
# Line 88  sed -i -e "s@^\(MIRRORS=\).*@\1\"${MAGE_ Line 87  sed -i -e "s@^\(MIRRORS=\).*@\1\"${MAGE_
87   -e "s@^\(RSYNC=\).*@\1\"${MAGE_RSYNC}\"@" \   -e "s@^\(RSYNC=\).*@\1\"${MAGE_RSYNC}\"@" \
88   /etc/mage.rc || die "fixing /etc/mage.rc"   /etc/mage.rc || die "fixing /etc/mage.rc"
89    
90  if [ $(diskfree /) -le ${MIN_SPACE} ]; then  if [ $(diskfree /) -le ${MIN_SPACE} ]
91    then
92   echo "Mounting server '${SERVER_SHARE}' ..."   echo "Mounting server '${SERVER_SHARE}' ..."
93   # make a secure tmp dir   # make a secure tmp dir
94   if [ -x /bin/mktemp ]; then   if [ -x /bin/mktemp ]; then
# Line 124  then Line 124  then
124   mage install mage || die "install mage"   mage install mage || die "install mage"
125  fi  fi
126    
127  # then clean forcefully all packages that does not fit the profile  # then clean forcefully all packages that does not match the profile
128  if [ -f /etc/mage-profile/forced-uninstall ]  if [ -f /etc/mage-profile/forced-uninstall ]
129  then  then
130   sh /etc/mage-profile/forced-uninstall   bash /etc/mage-profile/forced-uninstall
131  fi  fi
132    
133  # update the whole system  # update the whole system
134  mage upgrade || die "system upgrade"  mage upgrade || die "system upgrade"
135    
136  # umount BUILDDIR  # umount BUILDDIR
137  if is_mounted ${BUILDDIR}; then  if is_mounted ${BUILDDIR}
138    then
139   umount ${BUILDDIR}   umount ${BUILDDIR}
140  fi  fi
141    
142  # umount MAGEDIR  # umount MAGEDIR
143  if is_mounted ${MAGEDIR}; then  if is_mounted ${MAGEDIR}
144    then
145   umount ${MAGEDIR}   umount ${MAGEDIR}
146  fi  fi
147    
148  if is_mounted ${PKGDIR}; then  if is_mounted ${PKGDIR}
149    then
150   umount ${PKGDIR}   umount ${PKGDIR}
151  fi  fi
152    
153  # umount TEMPDIR  # umount TEMPDIR
154  if is_mounted ${TEMPDIR}; then  if is_mounted ${TEMPDIR}
155    then
156   umount_server   umount_server
157  fi  fi

Legend:
Removed from v.3467  
changed lines
  Added in v.3468