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 2734 by niro, Thu Aug 11 14:51:25 2011 UTC revision 2823 by niro, Thu Sep 1 10:15:46 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  # fake mage upgrade to prevent annoying error messages
27  if [[ ! -x /usr/sbin/mageupgrade ]]  if [[ ! -x /usr/sbin/mageupgrade ]]
# Line 96  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 110  if [[ ! -e /dev/root ]] Line 113  if [[ ! -e /dev/root ]]
113  then  then
114   echo "fixing missing /dev/root symlink ..."   echo "fixing missing /dev/root symlink ..."
115   rootdev=$(basename $(mount | grep ' / ' | cut -d' ' -f1))   rootdev=$(basename $(mount | grep ' / ' | cut -d' ' -f1))
116   [[ ! -e /dev/${rootdev} ]] && ln -snf ${rootdev} /dev/root   [[ -e /dev/${rootdev} ]] && ln -snf ${rootdev} /dev/root
117  fi  fi
118    
119  # update mage3 -> mage4  # update mage3 -> mage4
# Line 233  fi Line 236  fi
236    
237  if [[ -f /.dist-upgrade ]]  if [[ -f /.dist-upgrade ]]
238  then  then
239     # busybox gets installed before the new busybox initscripts
240     # and the syslog daemon gets started at the wrong runlevels (rc3.d instead of rc.sysinit)
241     # these runlevel symlinks will be deleted by the prune-orphaned-files script
242     # and syslogd will be left never started. so add syslogd here
243     rc-config add syslogd
244    
245   # array of wireless opts   # array of wireless opts
246   WIRELESS_OPTS=( WIRELESS_BITRATE WIRELESS_CHANNEL WIRELESS_ESSID WIRELESS_FREQUENCY WIRELESS_MODE WIRELESS_NICK WIRELESS_AUTH_MODE WIRELESS_KEY_LENGTH WIRELESS_KEY WIRELESS_KEY_ASCII WIRELESS_WPA_DRIVER )   WIRELESS_OPTS=( WIRELESS_BITRATE WIRELESS_CHANNEL WIRELESS_ESSID WIRELESS_FREQUENCY WIRELESS_MODE WIRELESS_NICK WIRELESS_AUTH_MODE WIRELESS_KEY_LENGTH WIRELESS_KEY WIRELESS_KEY_ASCII WIRELESS_WPA_DRIVER )
247    
# Line 281  then Line 290  then
290   FBMODS="uvesafb"   FBMODS="uvesafb"
291   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
292   kernelver=$(readlink /boot/vmlinuz | sed 's:kernel-::')   kernelver=$(readlink /boot/vmlinuz | sed 's:kernel-::')
293     # run depmod before
294     depmod -aF /boot/System.map-${kernelver}
295   mkinitrd -f /boot/initrd-${kernelver}.img ${kernelver}   mkinitrd -f /boot/initrd-${kernelver}.img ${kernelver}
296   # update grub bootloader   # update grub bootloader
297   updategrub2   updategrub2
# Line 288  fi Line 299  fi
299    
300  if [[ -f /.dist-upgrade ]]  if [[ -f /.dist-upgrade ]]
301  then  then
302   echo "preparing a reboot in 60 seconds ..."   echo "preparing for a reboot in 60 seconds ..."
303   # reboot via cronjob   # reboot via cronjob
304   [[ ! -d /var/spool/cron/crontabs ]] && install -d /var/spool/cron/crontabs   [[ ! -d /var/spool/cron/crontabs ]] && install -d /var/spool/cron/crontabs
305   # setup a proper cronjob   # setup a proper cronjob
306   tmp=$(mktemp)   tmp=$(mktemp)
307   echo "* * * * * crontab -r && reboot -f" > ${tmp}   :> ${tmp}
308     # fake mageupgrade to fix annoying error messages
309     if [[ ! -x /sbin/mageupgrade ]]
310     then
311     echo '#!/bin/sh' > /sbin/mageupgrade
312     echo 'exit 0'  >> /sbin/mageupgrade
313     chmod +x /sbin/mageupgrade
314     echo "* * * * * rm /sbin/mageupgrade" >> ${tmp}
315     fi
316     echo "* * * * * crontab -r && reboot -f" >> ${tmp}
317   crontab ${tmp}   crontab ${tmp}
318   [[ -f ${tmp} ]] && rm -f ${tmp}   [[ -f ${tmp} ]] && rm -f ${tmp}
319   # start cron daemon in background   # start cron daemon in background
320   crond -b -S   crond -b -S
321    
322     rm -f /.dist-upgrade
323  fi  fi
324    
325  exit 0  exit 0

Legend:
Removed from v.2734  
changed lines
  Added in v.2823