#! /bin/sh
#
#   ログ保存先デバイスを探す
#
#	0.0: May  21, 2020 by Dai ISHIJIMA (for v2.0, FreeBSD 11.3R)
#

searchfor="fd0 da0 da*s*"
ndevs=0
devs=''
for dev in $searchfor ; do
	echo -e "\r                                        \r\c" 1>&2
	echo -n "checking $dev" 1>&2
	if mount_msdosfs -s -o rdonly /dev/$dev /floppy > /dev/null 2>&1; then
		if [ -d /floppy/wipe-out ]; then
			devs="$devs $dev"
			ndevs=$(( $ndevs + 1 ))
		fi
		umount /floppy
	fi
done

cat "$devs"
exit 0

# EOF
