Magellan Linux

Diff of /alx-src/branches/alxconf_20060908/bin/update-alx.sh

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

revision 1580 by niro, Wed Feb 4 20:07:30 2009 UTC revision 1581 by niro, Tue Nov 23 12:20:59 2010 UTC
# Line 17  diskfree() Line 17  diskfree()
17    
18  mount_server()  mount_server()
19  {  {
20     local ret
21    
22   [ ! -d ${TEMPDIR} ] && install -d ${TEMPDIR}   [ ! -d ${TEMPDIR} ] && install -d ${TEMPDIR}
23   # use cifs only if supported   # use cifs only if supported
24   modprobe cifs &> /dev/null   modprobe cifs &> /dev/null
# Line 25  mount_server() Line 27  mount_server()
27   mount -t cifs "${SERVER_SHARE}" \   mount -t cifs "${SERVER_SHARE}" \
28   ${TEMPDIR} \   ${TEMPDIR} \
29   -o user="${USER}",pass="${PASS}"   -o user="${USER}",pass="${PASS}"
30     ret="$?"
31   else   else
32   # unix extensions must be enabled on server-side !   # unix extensions must be enabled on server-side !
33   mount -t smbfs "${SERVER_SHARE}" \   mount -t smbfs "${SERVER_SHARE}" \
34   ${TEMPDIR} \   ${TEMPDIR} \
35   -o username="${USER}",password="${PASS}"   -o username="${USER}",password="${PASS}"
36     ret="$?"
37   fi   fi
38    
39   sleep 3   sleep 3
40    
41     return "${ret}"
42  }  }
43    
44  umount_server()  umount_server()
# Line 76  if [ $(diskfree /) -le ${MIN_SPACE} ]; t Line 82  if [ $(diskfree /) -le ${MIN_SPACE} ]; t
82   fi   fi
83    
84   # mount the server share to TEMPDIR   # mount the server share to TEMPDIR
85   mount_server   mount_server || die "netshare mount failed, updated aborted."
86    
87   # now fake a new builddir so that multiple clients   # now fake a new builddir so that multiple clients
88   # can use one server share   # can use one server share
# Line 92  echo "Running update ..." Line 98  echo "Running update ..."
98  echo "Fetching mage database update ..."  echo "Fetching mage database update ..."
99  mage update > /dev/null || die "mage update"  mage update > /dev/null || die "mage update"
100    
101  ### demo hotfix###  # to be safe, mount boot (kernel updates !)
 #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 !)  
102  mount /boot &> /dev/null  mount /boot &> /dev/null
103    
104  # first update mage  # first update mage
105  mage install mage-alx || die "install mage"  mage install mage-alx || die "install mage"
106    
107  # than clean forcefully all packages that does not fit the profile  # then clean forcefully all packages that does not fit the profile
108  if [ -f /etc/mage-profile/forced-uninstall ]  if [ -f /etc/mage-profile/forced-uninstall ]
109  then  then
110   sh /etc/mage-profile/forced-uninstall   sh /etc/mage-profile/forced-uninstall
111  fi  fi
112    
113  # than update the whole system  # update the whole system
114  mageupgrade --no-calc --autoclean --autoanswer || die "system upgrade" #--debug  mageupgrade --no-calc --autoclean --autoanswer || die "system upgrade" #--debug
115    
116  # umount BUILDDIR  # umount BUILDDIR

Legend:
Removed from v.1580  
changed lines
  Added in v.1581