--- mage/branches/alx-0_6_0/profiles/alx-060/forced-uninstall 2011/08/11 14:28:46 2730 +++ mage/branches/alx-0_6_0/profiles/alx-060/forced-uninstall 2011/08/31 09:14:41 2816 @@ -7,8 +7,10 @@ MAGERC="/etc/mage.rc" MAGEPROFILE="alx-060" NEW_MAGE_DISTRIBUTION="unstable" -NEW_RSYNC="rsync://magellan-linux.de/mage-alx-0.6.0" -NEW_MIRRORS="http://magellan-linux.de/magellan/alx-0.6.0/${NEW_MAGE_DISTRIBUTION}" +#NEW_RSYNC="rsync://magellan-linux.de/mage-alx-0.6.0" +#NEW_MIRRORS="http://magellan-linux.de/magellan/alx-0.6.0/${NEW_MAGE_DISTRIBUTION}" +NEW_RSYNC="rsync://128.20.41.110/mage-alx-060" +NEW_MIRRORS="http://128.20.41.110/magellan/alx-060" NEW_PACKAGES_SERVER_PATH='packages/${ARCH}' NEW_MAGE_UNINSTALL_TIMEOUT=0 @@ -18,7 +20,8 @@ NEW_ALX_DHCP_START="-T 10 -t 5 -n -i" NEW_ALX_DHCP_STOP="" NEW_MIN_DISK_SPACE="85000" -NEW_ALX_PLUGINS="/etc/alxconfig-ng/plugins" +NEW_ALX_PLUGINS="/usr/lib/alxconfig-ng/plugins" +NEW_ALX_FUNCTIONS="/usr/lib/alxconfig-ng/functions" # fake mage upgrade to prevent annoying error messages if [[ ! -x /usr/sbin/mageupgrade ]] @@ -79,23 +82,6 @@ install -m0644 /lib/grub/*/video.lst /boot/grub/video.lst fi - # check for special hardware - if [[ -x $(which hwinfo) ]] - then - # zotac devices - if [[ ! -z $(hwinfo --bios --storage | grep -i zotac) ]] - then - grubopts="rootdelay=8" - echo "Special device 'ZOTAC' detected!" - fi - fi - - # fix grubconfig for special devices - if [[ -n ${grubopts} ]] - then - sed -i "s:^\(export GRUB_CMDLINE_LINUX=\).*:\1\"${grubopts}\":" /etc/conf.d/grub - fi - # update grub.cfg grub-mkconfig -o /boot/grub/grub.cfg @@ -113,7 +99,7 @@ # fix config.rc CONFIG="${CONFIGRC}" -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 # fix profile if [[ $(readlink /etc/mage-profile) != */${MAGEPROFILE} ]] @@ -127,7 +113,7 @@ then echo "fixing missing /dev/root symlink ..." rootdev=$(basename $(mount | grep ' / ' | cut -d' ' -f1)) - [[ ! -e /dev/${rootdev} ]] && ln -snf ${rootdev} /dev/root + [[ -e /dev/${rootdev} ]] && ln -snf ${rootdev} /dev/root fi # update mage3 -> mage4 @@ -298,6 +284,8 @@ FBMODS="uvesafb" echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS}\"" > /etc/conf.d/mkinitrd kernelver=$(readlink /boot/vmlinuz | sed 's:kernel-::') + # run depmod before + depmod -aF /boot/System.map-${kernelver} mkinitrd -f /boot/initrd-${kernelver}.img ${kernelver} # update grub bootloader updategrub2 @@ -310,11 +298,22 @@ [[ ! -d /var/spool/cron/crontabs ]] && install -d /var/spool/cron/crontabs # setup a proper cronjob tmp=$(mktemp) - echo "* * * * * crontab -r && reboot -f" > ${tmp} + :> ${tmp} + # fake mageupgrade to fix annoying error messages + if [[ ! -x /sbin/mageupgrade ]] + then + echo '!/bin/sh' > /sbin/mageupgrade + echo 'exit 0' >> /sbin/mageupgrade + chmod +x /sbin/mageupgrade + echo "* * * * * rm /sbin/mageupgrade" >> ${tmp} + fi + echo "* * * * * crontab -r && reboot -f" >> ${tmp} crontab ${tmp} [[ -f ${tmp} ]] && rm -f ${tmp} # start cron daemon in background crond -b -S + + rm -f /.dist-upgrade fi exit 0