Hi Norman,

> Package: autofs
> Version: 4.1.4+debian-1
> Severity: normal

are you filing this bug because your map has worked before (behaviour of autofs
has changed), or did it never work?

> I am trying to use autofs to automount a Samba filesystem exported by
> a machine whose IP address is assigned dynamically.  To find the IP
> address I need to do a lookup in the .local namespace using Avahi.
> (It turns out with the very latest autofs this isn't necessary, but
> with earlier versions it seemed to be.)
> So I created the following executable map file:
> 
>   #!/bin/ksh
>   set -x
>   key="$1"
>   server=$(getent hosts $key.local)
>   server="${server%% *}"
>   echo "$key -fstype=cifs,rw,guest,uid=32074,gid=6202 ://$server/SharedDocs"

Don't include the key in the output. For a "regular" entry (not considering
multimaps) program maps should just print two columns - options and mount
source. Here's for example the output of the default auto.net file that's
shipped in /usr/share/doc/autofs/examples/:

] [EMAIL PROTECTED]:/usr/share/doc/autofs>showmount -e c17
] Export list for c17:
] /      @somenetgroup
] /tmp   @somenetgroup
] /var   @somenetgroup
] /usr   @somenetgroup
] /boot  @somenetgroup
] /extra @somenetgroup
] [EMAIL PROTECTED]:/usr/share/doc/autofs>examples/auto.net c17
] -fstype=nfs,hard,intr,nodev,nosuid,nonstrict,async \
]         / c17:/ \
]         /boot c17:/boot \
]         /extra c17:/extra \
]         /tmp c17:/tmp \
]         /usr c17:/usr \
]         /var c17:/var
] [EMAIL PROTECTED]:/usr/share/doc/autofs>


Regards,

Jan

Attachment: signature.asc
Description: Digital signature

Reply via email to