Changeset 91
- Timestamp:
- 04/19/2006 15:49:56 (6 years ago)
- Location:
- confman
- Files:
-
- 3 edited
-
confman (modified) (9 diffs)
-
confman.conf (modified) (1 diff)
-
confmanlib.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
confman/confman
r90 r91 22 22 # we re-spawn confman inside a pipe. 23 23 if (true >&5) 2>/dev/null ; then 24 exec 2>&524 exec 4>&2 2>&5 >&3- 25 25 else 26 26 exec 3>&1 … … 42 42 fi 43 43 44 # Set debugging: 45 if [ -z $DEBUG ] ; then 46 DEBUG="false" 47 fi 48 44 49 # Now, we source the library 45 50 if [ -f $REPO_LIBRARY ] ; then … … 87 92 function setup { 88 93 local response 94 $DEBUG && echo "Running setup" >&4 89 95 if [ ! -z $* ] ; then 90 96 print_usage 1 … … 97 103 setup 98 104 else 99 echo "Setup failed." >& 2105 echo "Setup failed." >&4 100 106 exit 1 101 107 fi … … 176 182 echo "Installation operation started." >&2 177 183 for layer in $LAYERS ; do 178 echo "Layer: $layer"184 $DEBUG && echo "Layer: $layer" >&4 179 185 conf_commit $layer $msg || return $? 180 186 conf_install $layer $* … … 233 239 # Error out when trying to import a symbolic link. 234 240 if sudo [ -L $file ] ; then 235 echo "$ MYNAME: Error: $file is a symbolic link!" >&2241 echo "$file is a symbolic link!" >&4 236 242 conf_cleanexit 237 243 fi 238 244 239 245 if [ -f ${WORK_PATH}/${module}${file}${suffix} ] ; then 240 echo "$MYNAME: Error: $file already exists in your working" \ 241 "copy of $module." 246 echo "$file already exists in your working copy of $module." >&4 242 247 conf_cleanexit 243 248 fi … … 246 251 for layer in $LAYERS ; do 247 252 if [ -f ${WORK_PATH}/${layer}${file}${suffix} ] ; then 248 echo "$ MYNAME: Error: $file already exists in" \249 "the ${layer} module." >&2250 echo "Did you mean -f ?" >& 2253 echo "$file already exists in the ${layer}" \ 254 "module." >&4 255 echo "Did you mean -f ?" >&4 251 256 conf_cleanexit 252 257 fi … … 507 512 ls $chkdir 508 513 else 509 echo " $MYNAME:There are no checkpoints for ${module}."514 echo "There are no checkpoints for ${module}." 510 515 fi 511 516 } … … 586 591 } 587 592 593 # Dubug mode? 594 while getopts "d" opt ; do 595 case $opt in 596 d) 597 DEBUG="true" 598 shift 599 ;; 600 *) 601 print_help 1 602 ;; 603 esac 604 done 588 605 589 606 -
confman/confman.conf
r74 r91 39 39 DEFAULT_COMMENT="#" 40 40 41 # Enable or disable debugging 42 DEBUG="false" 43 41 44 # A prefix to the live filesystem image. This should be unset if you don't 42 45 # want to use a prefix. Useful for testing confman, by having files installed -
confman/confmanlib.sh
r90 r91 328 328 329 329 function conf_cleanexit { 330 echo "Abort, Abort! Patience is a virtue." >&2 330 331 rm -f /tmp/confman* 331 332 … … 336 337 # And this clears any locks we may have created on our working copy: 337 338 svn cleanup ${WORK_PATH} 339 echo "All clean. Terminating." >&2 338 340 339 341 if [ -z $1 ] ; then
Note: See TracChangeset
for help on using the changeset viewer.
