--- mage/branches/alx-0_6_0/profiles/alx-060/forced-uninstall 2011/05/18 22:55:40 2180 +++ mage/branches/alx-0_6_0/profiles/alx-060/forced-uninstall 2011/06/07 12:32:27 2181 @@ -1,6 +1,21 @@ #!/bin/bash # $Id$ +# setup exit trap for reboot +trap_exit() +{ + if [[ -f /.dist-upgrade ]] + then + rm -f /.dist-upgrade + # force a reboot at this point here + ( sleep 3 && reboot -f & ); exit 0 + fi +} +trap "trap_exit" EXIT + +# get a suitable environment +source /etc/profile + MAGERC="/etc/mage.rc" MAGEPROFILE="alx-060" NEW_MAGE_DISTRIBUTION="unstable" @@ -151,6 +166,8 @@ do # excludes case ${i} in + alxconfig-ng) continue ;; + alxinstall-ng) continue ;; kernel-alx) continue ;; kernel26-alx) continue ;; kernel-sources-alx) continue ;; @@ -206,9 +223,9 @@ rm -f /.orphaned fi -if [[ -f /.dist-upgrade ]] -then - rm -f /.dist-upgrade - # force a reboot at this point here - reboot -f -fi +#if [[ -f /.dist-upgrade ]] +#then +# rm -f /.dist-upgrade +# # force a reboot at this point here +# ( reboot -f & ); exit 0 +#fi