+if (( pre_open ))
+then
+ if [[ -z $mtype_list ]]
+ then
+ if [[ -z $data ]]
+ then
+ echo "error: cannot determine a mtype list from stdin:"
+ echo " -p given with out a list (-m) and input file set to default to stdin (missing -f)"
+ exit 1
+ fi
+
+ rdc_extract $data 0 | sort -u | while read t
+ do
+ mtype_list="$mtype_list$t "
+ done
+ fi
+
+ (
+ cd $fifo_dir
+ count=0
+ for t in ${mtype_list//,/ }
+ do
+ name=$( printf "MT_%09d" t )
+ echo "making FIFO: $name"
+ mkfifo -m 664 $name 2>/dev/null # if these are there, don't natter on about them
+ (( count++ ))
+ done
+
+ ls MT_* | wc -l | read found
+ if (( count != found ))
+ then
+ echo "warn: after pre-create, expected $count FIFOs, but found only $found"
+ fi
+ )
+fi
+