Changeset 3 for trunk/dsys/funcINSTALL
- Timestamp:
- Dec 21, 2005, 10:07:54 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dsys/funcINSTALL
r1 r3 91 91 DATABASE="${basedir}/${defdatabase}" 92 92 fi 93 94 updlock="${DATABASE}.lockdir" 95 trap "rm -rf ${updlock}" 1 2 13 15 96 97 # 98 # A lockfile will not work, because 'root' can write anyway. 99 # However, 'mkdir' an existing directory will fail even for root 100 # 101 until (umask 222; mkdir "${updlock}") 2>/dev/null # test & set 102 do 103 printINFO "Waiting for lock" 104 sleep 1 105 done 106 93 107 94 108 IDATE=`date +"%Y-%m-%d %H:%M:%S"` … … 223 237 fi 224 238 225 chown ${rcfile_owner}:${rcfile_group} "${DATABASE}" || printFATAL "Could not chown ${rcfile_owner}:${rcfile_group} ${DATABASE}" 226 chmod ${rcfile_perm} "${DATABASE}" || printFATAL "Could not chmod ${rcfile_perm} ${DATABASE}" 227 239 chown ${rcfile_owner}:${rcfile_group} "${DATABASE}" 240 if [ $? -ne 0 ]; then 241 rm -rf "${instlock}" 242 printFATAL "Could not chown ${rcfile_owner}:${rcfile_group} ${DATABASE}" 243 fi 244 chmod ${rcfile_perm} "${DATABASE}" 245 if [ $? -ne 0 ]; then 246 rm -rf "${instlock}" 247 printFATAL "Could not chmod ${rcfile_perm} ${DATABASE}" 248 fi 249 250 rm -rf "${updlock}" 228 251 } 229 252
Note:
See TracChangeset
for help on using the changeset viewer.