|
From: Bruce S. <bl...@us...> - 2008-04-30 18:09:35
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv13427/scripts/scripts Modified Files: save-config Log Message: changed save-config to optionally delete pre-aufs config Index: save-config =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/scripts/save-config,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- save-config 16 Apr 2008 13:19:16 -0000 1.37 +++ save-config 30 Apr 2008 18:09:32 -0000 1.38 @@ -15,7 +15,8 @@ QUIET="" DL_CONFIG_SOURCE="" -DL_CONFIG_FILE="etc.tar.bz2" +DL_CONFIG_FILE="etc-mods.tar.bz2" +OLD_CONFIG_FILE="etc.tar.bz2" CONFIG_MOUNT=/var/adm/mount mkdir -p $CONFIG_MOUNT || exit 1 @@ -236,7 +237,7 @@ umount $CONFIG_MOUNT $FAILURE - echo "Do you still want to save?" + echo -n "Do you still want to save?" $NORMAL if ! ask_yes_no ; then exit 1 @@ -253,6 +254,31 @@ mount -o remount,rw,noatime $CONFIG_MOUNT fi +# check for old (pre-aufs) config file +if [ -e $CONFIG_MOUNT/$OLD_CONFIG_FILE ] ; then + $WARNING + echo + echo "There is an old config $OLD_CONFIG_FILE on $DL_CONFIG_SOURCE" + echo "Depending on file and media sizes, you may run out of disk space." + echo + echo -n "Would you like me to remove: $OLD_CONFIG_FILE ?" + $NORMAL + if ask_yes_no ; then + $FAILURE + echo -n "Last chance, are you sure?" + $NORMAL + if ask_yes_no ; then + $WARNING + echo -n "Removing: $CONFIG_MOUNT/$OLD_CONFIG_FILE ... " + sleep 5 # give them a couple seconds to hit CTRL-C + rm -f $CONFIG_MOUNT/$OLD_CONFIG_FILE + $SUCCESS + echo "done" + fi + fi + $NORMAL +fi + $SUCCESS echo "Saving current configuration" $NORMAL |