Anyway back to autofs... two annoyances remain -
- I don't have a dns or mdns or zeroconfig solution on my home network
- On linpus, /etc/hosts is replaced at each boot
- autofs needs the hostname for my NAS (could be avoided using the IP address I guess)
- for some reason autofs isn't starting automatically, although chkconfig shows it configured
Well here's my somewhat ugly solution to the host name problem
[user@localhost ~]$ cat /etc/NetworkManager/dispatcher.d/02-hosts
#!/bin/bash
if [ "$2" = "up" ];
then
FOUND=`grep dlink-EEF76A /etc/hosts | wc -l`
if [ $FOUND = "0" ];
then
echo "Updating /etc/hosts"
DATE=`date`
echo "#updated by $0 at ${DATE}" >> /etc/hosts
echo "192.168.1.10 dlink-EEF76A" >> /etc/hosts
fi;
fi