Magellan Linux

Diff of /mage/branches/alx-0_6_0/profiles/alx-060/forced-uninstall

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

revision 2728 by niro, Thu Aug 11 12:08:18 2011 UTC revision 2822 by niro, Wed Aug 31 16:09:44 2011 UTC
# Line 7  source /etc/profile Line 7  source /etc/profile
7  MAGERC="/etc/mage.rc"  MAGERC="/etc/mage.rc"
8  MAGEPROFILE="alx-060"  MAGEPROFILE="alx-060"
9  NEW_MAGE_DISTRIBUTION="unstable"  NEW_MAGE_DISTRIBUTION="unstable"
10  NEW_RSYNC="rsync://magellan-linux.de/mage-alx-0.6.0"  #NEW_RSYNC="rsync://magellan-linux.de/mage-alx-0.6.0"
11  NEW_MIRRORS="http://magellan-linux.de/magellan/alx-0.6.0/${NEW_MAGE_DISTRIBUTION}"  #NEW_MIRRORS="http://magellan-linux.de/magellan/alx-0.6.0/${NEW_MAGE_DISTRIBUTION}"
12    NEW_RSYNC="rsync://128.20.41.110/mage-alx-060"
13    NEW_MIRRORS="http://128.20.41.110/magellan/alx-060"
14  NEW_PACKAGES_SERVER_PATH='packages/${ARCH}'  NEW_PACKAGES_SERVER_PATH='packages/${ARCH}'
15  NEW_MAGE_UNINSTALL_TIMEOUT=0  NEW_MAGE_UNINSTALL_TIMEOUT=0
16    
# Line 18  NEW_ALX_DHCP_PROG="/sbin/udhcpc" Line 20  NEW_ALX_DHCP_PROG="/sbin/udhcpc"
20  NEW_ALX_DHCP_START="-T 10 -t 5 -n -i"  NEW_ALX_DHCP_START="-T 10 -t 5 -n -i"
21  NEW_ALX_DHCP_STOP=""  NEW_ALX_DHCP_STOP=""
22  NEW_MIN_DISK_SPACE="85000"  NEW_MIN_DISK_SPACE="85000"
23  NEW_ALX_PLUGINS="/etc/alxconfig-ng/plugins"  NEW_ALX_PLUGINS="/usr/lib/alxconfig-ng/plugins"
24    NEW_ALX_FUNCTIONS="/usr/lib/alxconfig-ng/functions"
25    
26    # fake mage upgrade to prevent annoying error messages
27    if [[ ! -x /usr/sbin/mageupgrade ]]
28    then
29     mageupgrade() { true; }; export -f mageupgrade
30    fi
31    
32  read_value()  read_value()
33  {  {
# Line 90  updateconfig RSYNC MIRRORS MAGE_DISTRIBU Line 99  updateconfig RSYNC MIRRORS MAGE_DISTRIBU
99    
100  # fix config.rc  # fix config.rc
101  CONFIG="${CONFIGRC}"  CONFIG="${CONFIGRC}"
102  updateconfig ALX_NETWORKING ALX_DHCP_PROG ALX_DHCP_START ALX_DHCP_STOP MIN_DISK_SPACE ALX_PLUGINS  updateconfig ALX_NETWORKING ALX_DHCP_PROG ALX_DHCP_START ALX_DHCP_STOP MIN_DISK_SPACE ALX_PLUGINS ALX_FUNCTIONS
103    
104  # fix profile  # fix profile
105  if [[ $(readlink /etc/mage-profile) != */${MAGEPROFILE} ]]  if [[ $(readlink /etc/mage-profile) != */${MAGEPROFILE} ]]
# Line 99  then Line 108  then
108   ln -snf /usr/mage/profiles/${MAGEPROFILE} /etc/mage-profile   ln -snf /usr/mage/profiles/${MAGEPROFILE} /etc/mage-profile
109  fi  fi
110    
111    # fix missing /dev/root device
112    if [[ ! -e /dev/root ]]
113    then
114     echo "fixing missing /dev/root symlink ..."
115     rootdev=$(basename $(mount | grep ' / ' | cut -d' ' -f1))
116     [[ -e /dev/${rootdev} ]] && ln -snf ${rootdev} /dev/root
117    fi
118    
119  # update mage3 -> mage4  # update mage3 -> mage4
120  if [[ -z $(magequery -n mage) ]]  if [[ -z $(magequery -n mage) ]]
121  then  then
# Line 166  if [[ -z $(magequery -n ${BASESYSTEM}) ] Line 183  if [[ -z $(magequery -n ${BASESYSTEM}) ]
183  then  then
184   # first keep some important files   # first keep some important files
185    
  # fix missing /dev/root device  
  if [[ ! -e /dev/root ]]  
  then  
  rootdev=$(basename $(mount | grep ' / ' | cut -d' ' -f1))  
  [[ ! -e /dev/${rootdev} ]] && ln -snf ${rootdev} /dev/root  
  fi  
   
186   # export bootstrap to not start any services   # export bootstrap to not start any services
187   export MAGE_BOOTSTRAP=true   export MAGE_BOOTSTRAP=true
188   mage install ${BASESYSTEM}   mage install ${BASESYSTEM}
# Line 274  then Line 284  then
284   FBMODS="uvesafb"   FBMODS="uvesafb"
285   echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS}\"" > /etc/conf.d/mkinitrd   echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS}\"" > /etc/conf.d/mkinitrd
286   kernelver=$(readlink /boot/vmlinuz | sed 's:kernel-::')   kernelver=$(readlink /boot/vmlinuz | sed 's:kernel-::')
287     # run depmod before
288     depmod -aF /boot/System.map-${kernelver}
289   mkinitrd -f /boot/initrd-${kernelver}.img ${kernelver}   mkinitrd -f /boot/initrd-${kernelver}.img ${kernelver}
290   # update grub bootloader   # update grub bootloader
291   updategrub2   updategrub2
# Line 281  fi Line 293  fi
293    
294  if [[ -f /.dist-upgrade ]]  if [[ -f /.dist-upgrade ]]
295  then  then
296   echo "preparing a reboot in 60 seconds ..."   echo "preparing for a reboot in 60 seconds ..."
297   # reboot via cronjob   # reboot via cronjob
298   [[ ! -d /var/spool/cron/crontabs ]] && install -d /var/spool/cron/crontabs   [[ ! -d /var/spool/cron/crontabs ]] && install -d /var/spool/cron/crontabs
299   # setup a proper cronjob   # setup a proper cronjob
300   tmp=$(mktemp)   tmp=$(mktemp)
301   echo "* * * * * crontab -r && reboot -f" > ${tmp}   :> ${tmp}
302     # fake mageupgrade to fix annoying error messages
303     if [[ ! -x /sbin/mageupgrade ]]
304     then
305     echo '#!/bin/sh' > /sbin/mageupgrade
306     echo 'exit 0'  >> /sbin/mageupgrade
307     chmod +x /sbin/mageupgrade
308     echo "* * * * * rm /sbin/mageupgrade" >> ${tmp}
309     fi
310     echo "* * * * * crontab -r && reboot -f" >> ${tmp}
311   crontab ${tmp}   crontab ${tmp}
312   [[ -f ${tmp} ]] && rm -f ${tmp}   [[ -f ${tmp} ]] && rm -f ${tmp}
313   # start cron daemon in background   # start cron daemon in background
314   crond -b -S   crond -b -S
315    
316     rm -f /.dist-upgrade
317  fi  fi
318    
319  exit 0  exit 0

Legend:
Removed from v.2728  
changed lines
  Added in v.2822