Changeset 76
- Timestamp:
- 04/14/2006 19:17:22 (6 years ago)
- Location:
- confman
- Files:
-
- 3 edited
-
confman (modified) (5 diffs)
-
confmandoc.sh (modified) (3 diffs)
-
confmanlib.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
confman/confman
r75 r76 108 108 if [ -z $* ] ; then 109 109 for layer in $LAYERS ; do 110 conf_update_module $layer || return $? 111 done 110 conf_update_module $layer || cleanexit 111 done 112 conf_update_module ${REPO_CHECKPTS} || cleanexit 112 113 else 113 114 print_usage 1 … … 118 119 if [ -z $* ] ; then 119 120 local msg=`mktemp -t confman` 120 update || return $?121 # Moved up per Ian's request. 121 122 echo "Change this file to your log message." > $msg 122 123 ${EDITOR} $msg 124 update || cleanexit 123 125 124 126 for layer in $LAYERS ; do … … 138 140 fi 139 141 } 142 143 # Short name intentional, don't want collision with real install. 144 function inst { 145 local file 146 147 if [ -z $* ] ; then 148 print_usage 1 149 else 150 local msg=`mktemp -t confman` 151 # Moved up per Ian's request. 152 echo "Change this file to your log message." > $msg 153 ${EDITOR} $msg 154 update || cleanexit 155 156 for layer in $LAYERS ; do 157 conf_commit $layer $msg || return $? 158 done 159 160 for file in $* ; do 161 file=`abspath $file` 162 163 for layer in $LAYERS ; do 164 conf_install $layer $file 165 done 166 167 if [[ "$SINGULARITIES" =~ "$file" ]] ; then 168 conf_assemble_file $file 169 fi 170 done 171 fi 172 } 173 140 174 141 175 function import { … … 494 528 conf_rollout $layer 495 529 done 530 531 for file in $SINGULARITIES ; do 532 conf_assemble_sing $file 533 done 496 534 fi 497 535 } … … 564 602 commit $* 565 603 ;; 566 import|i * )604 import|im* ) 567 605 import $* 606 ;; 607 install|in* ) 608 inst $* 568 609 ;; 569 610 remove|re*|rm ) -
confman/confmandoc.sh
r75 r76 26 26 $MYNAME rmmod module 27 27 $MYNAME import module livefile 28 $MYNAME install working_copy 28 29 $MYNAME rm workingfile 29 30 $MYNAME cp src_working_copy dest_working_copy … … 181 182 EOF 182 183 ;; 183 i * )184 im* ) 184 185 cat <<EOF 185 186 $MYNAME provides a command-line interface to Rescomp's server … … 191 192 The import subcommand adds the specified file to your working copy of the 192 193 repository. 194 195 EOF 196 ;; 197 in* ) 198 cat <<EOF 199 $MYNAME provides a command-line interface to Rescomp's server 200 configuration management system. 201 202 Usage: 203 $MYNAME install working_file [ working_file ... ] 204 205 The install subcommand allows you to roll out a single file from your working 206 copy. 193 207 194 208 EOF -
confman/confmanlib.sh
r68 r76 95 95 $cmd 96 96 done 97 for file in $SINGULARITIES ; do98 conf_assemble_sing ${module} ${file}99 done100 97 # This is a hack to work around NFS home dirs, for now: 101 98 chmod o-rx ${WORK_PATH} 102 99 } 100 101 function conf_install { 102 local module="$1" 103 local file="$2" 104 local moduledir="${WORK_PATH}/$module" 105 local livefile=`echo "$file" | sed -E "s:${WORK_PATH}/[^/]+::"` 106 107 # See if it even exists 108 file="${moduledir}${livefile}" 109 if [ ! -f $file ] ; then 110 return 0 111 fi 112 113 # If we got here, figure it out 114 local owner=`conf_get_prop ${file} owner` 115 local group=`conf_get_prop ${file} group` 116 local mode=`conf_get_prop ${file} mode` 117 local opts="-Sp -o $owner -g $group -m $mode" 118 local cmd="sudo install $opts $file ${LIVE_ROOT}$livefile" 119 120 chmod o+rx ${WORK_PATH} 121 echo $cmd 122 $cmd 123 chmod o-rx ${WORK_PATH} 124 } 125 103 126 104 127 function conf_list {
Note: See TracChangeset
for help on using the changeset viewer.
