Changeset 167
- Timestamp:
- 07/05/2007 18:14:12 (5 years ago)
- Location:
- trunk/confman
- Files:
-
- 4 edited
-
confman (modified) (7 diffs)
-
confmancommon.sh (modified) (1 diff)
-
confmanlib.sh (modified) (4 diffs)
-
confsync.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/confman/confman
r145 r167 62 62 function update { 63 63 if [ -z $* ] ; then 64 conf_update_tree || conf_clean exit64 conf_update_tree || conf_cleanExit 65 65 else 66 66 print_usage 1 … … 84 84 ${EDITOR} $msg 85 85 sudo -v 86 update || conf_clean exit86 update || conf_cleanExit 87 87 88 88 echo "Commit operation started" >&2 … … 117 117 ${EDITOR} $msg 118 118 sudo -v 119 update || conf_clean exit119 update || conf_cleanExit 120 120 121 121 echo "Installation operation started." >&2 … … 125 125 done 126 126 for file in $SINGULARITIES ; do 127 conf_assemble_sing $file || conf_clean exit127 conf_assemble_sing $file || conf_cleanExit 128 128 done 129 129 conf_recordAction install … … 184 184 if sudo [ -L $file ] ; then 185 185 echo "$file is a symbolic link!" >&4 186 conf_clean exit186 conf_cleanExit 187 187 fi 188 188 … … 492 492 else 493 493 echo "Rolling $module back to $checkpoint $clock" >&2 494 conf_rollback $module $checkpoint $clock || conf_clean exit494 conf_rollback $module $checkpoint $clock || conf_cleanExit 495 495 for layer in $LAYERS ; do 496 496 echo "Rolling on $layer..." 497 conf_rollout $layer || conf_clean exit497 conf_rollout $layer || conf_cleanExit 498 498 done 499 499 500 500 for file in $SINGULARITIES ; do 501 conf_assemble_sing $file || conf_clean exit501 conf_assemble_sing $file || conf_cleanExit 502 502 done 503 503 echo "Rollback succeeded." >&2 … … 521 521 if [ ! -d "${WORK_PATH}/${oldmod}" ] ; then 522 522 echo "${MYNAME}: Error: ${WORK_PATH}/${oldmod} doesn't exist" >&4 523 conf_clean exit523 conf_cleanExit 524 524 fi 525 525 if [ -e "${WORK_PATH}/${newmod}" ] ; then 526 526 echo "${MYNAME}: Error: ${WORK_PATH}/${newmod}: file exists" >&4 527 conf_clean exit527 conf_cleanExit 528 528 fi 529 529 conf_rename $oldmod $newmod -
trunk/confman/confmancommon.sh
r165 r167 86 86 87 87 # And we'll set a trap: 88 trap "conf_clean exit" SIGINT SIGTERM SIGHUP88 trap "conf_cleanExit" SIGINT SIGTERM SIGHUP 89 89 -
trunk/confman/confmanlib.sh
r166 r167 377 377 svn mv ${WORK_PATH}/${oldmod} ${WORK_PATH}/${newmod} || \ 378 378 { echo "There was a problem renaming the modules." >&4 ; \ 379 conf_clean _exit 1379 conf_cleanExit 1 380 380 } 381 381 svn mv ${WORK_PATH}/${REPO_CHECKPTS}/${oldmod} \ 382 382 ${WORK_PATH}/${REPO_CHECKPTS}/${newmod} || \ 383 383 { echo "There was a problem renaming the checkpts." >&4 ; \ 384 conf_clean _exit 1384 conf_cleanExit 1 385 385 } 386 386 387 387 svn update ${WORK_PATH} || \ 388 388 { echo "Your working copy didn't update correctly." >&4 ; \ 389 conf_clean _exit 1389 conf_cleanExit 1 390 390 } 391 391 svn commit -m "Renaming ${oldmod} to ${newmod}, phase 1." \ 392 392 ${WORK_PATH}/{,${REPO_CHECKPTS}}/{${oldmod},${newmod}} || \ 393 { echo "Committing the changes failed." >&4 ; conf_clean _exit 1393 { echo "Committing the changes failed." >&4 ; conf_cleanExit 1 394 394 } 395 395 … … 404 404 svn update ${WORK_PATH} || \ 405 405 { echo "Your working copy didn't update correctly." >&4 ; \ 406 conf_clean _exit 1406 conf_cleanExit 1 407 407 } 408 408 svn commit -m "Renaming ${oldmod} to ${newmod}, phase 2." \ 409 409 ${WORK_PATH}/${newmod} || \ 410 { echo "Committing the changes failed." >&4 ; conf_clean _exit 1410 { echo "Committing the changes failed." >&4 ; conf_cleanExit 1 411 411 } 412 412 … … 418 418 svn update ${WORK_PATH} || \ 419 419 { echo "Your working copy didn't update correctly." >&4 ; \ 420 conf_clean _exit 1420 conf_cleanExit 1 421 421 } 422 422 svn commit -m "Renaming ${oldmod} to ${newmod}, complete." \ 423 423 ${WORK_PATH}/${newmod} || \ 424 { echo "Committing the changes failed." >&4 ; conf_clean _exit 1424 { echo "Committing the changes failed." >&4 ; conf_cleanExit 1 425 425 } 426 426 } … … 536 536 # The SIGNAL seems to kill the logger process spawned by the parent 537 537 # process, which is receiving its input from our fd 2. 538 function conf_clean exit {538 function conf_cleanExit { 539 539 echo "Received a signal. Exiting cleanly." | conf_logger 540 540 echo "Abort, Abort! Patience is a virtue." >&4 -
trunk/confman/confsync.sh
r157 r167 58 58 for layer in $LAYERS ; do 59 59 echo "Rolling on $layer..." 60 conf_rollout $layer || conf_clean exit60 conf_rollout $layer || conf_cleanExit 61 61 done 62 62 for file in $SINGULARITIES ; do 63 63 echo "Assembing singularity $file..." 64 conf_assemble_sing $file || conf_clean exit64 conf_assemble_sing $file || conf_cleanExit 65 65 done 66 66 conf_markclean
Note: See TracChangeset
for help on using the changeset viewer.
