Subject: amq -u fails on type:=program
To: None <current-users@netbsd.org>
From: HIROSE Yuuji <yuuji-netbsd@es.gentei.org>
List: current-users
Date: 02/02/2005 00:45:42
Since 2.9.11 or around that...

Unmounting by 'amq -u' fails on type:=program filesystem.
Is this my fault???

Here is small example.

Suppose if your flash memory card can be mounted with

  mount -t msdos /dev/wd1e /.mnt/cf

and unmounted with below.

  umount /.mnt/cf

Map file below should work for both action.

---------[ /tmp/test.map ]----------------------------------
cf	type:=program;fs:=/.mnt/cf;\ 
	mount:="/sbin/mount mount -t msdos /dev/wd1e /.mnt/cf";\ 
	unmount:="/sbin/umount umount /.mnt/cf" 
------------------------------------------------------------

# amd -l /var/tmp/amd.log /y /tmp/test.map
# ls /y/cf/.
dcim/   intro/  misc/   system/ 

It's all right here.
But unmounting by amq -u fails.

# amq -u /y/cf
(This should unmount /y/cf)

# amq
/      root     "root"                             tmax:(pid3907) 
/y     toplvl   /tmp/test.map                      /y 
/y/cf  program  mount -t msdos /dev/wd1e /.mnt/cf  /.mnt/cf 

Error messages in log file(/var/tmp/amd.log);

Feb  2 02:49:56 tmax amd[3907]/error: Process 6335 exited with signal 11 
Feb  2 02:49:56 tmax amd[3907]/error: unmount for /y/cf got signal 11 


Althogh this example describes on msdos-filesystem, any other
filesystem via type:=program can't be unmounted by amq -u.

What's wrong with my settings?

--yuuji