Index: mutils/mutils.scm ================================================================== --- mutils/mutils.scm +++ mutils/mutils.scm @@ -21,10 +21,11 @@ srfi-69 ;; ports extras regex posix + data-structures ) (define (mutils:hierhash-ref hh . keys) (if (null? keys) #f @@ -186,14 +187,14 @@ ;;====================================================================== ;; Other utils ;;====================================================================== -#;(define (check-write-create fpath) +(define (check-write-create fpath) (and (file-write-access? fpath) - (let ((fname (conc fpath "/junk ". (current-seconds) "-" (random 10000)))) - (print "trying to create/remove " fname) + (let ((fname (conc fpath "/.junk-" (current-seconds) "-" (random 10000)))) + ;;(print "trying to create/remove " fname) (handle-exceptions exn #f (begin (with-output-to-file fname @@ -205,15 +206,16 @@ ;; do some sanity checks on the system ;; (define (mutils:syscheck) ;; current dir writeable and do megatest.config, runconfigs.config files exist/readable (print "Current directory " (current-directory) " writeable: " - (if #;(check-file-create ".") - (file-write-access? ".")"yes" "no")) + (if (check-write-create ".") "yes" "no")) ;; home dir writeable + (print "Home directory " (get-environment-variable "HOME") " writeable: " (if (check-write-create (get-environment-variable "HOME")) "yes" "no")) ;; /tmp writeable + (print "/tmp directory writeable: " (if (check-write-create "/tmp") "yes" "no")) ;; load configs ;; each run disk read/write ;; link tree writeable ) )