system/5150: ams master map in NIS

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

system/5150: ams master map in NIS

Raimo Niskanen
>Number:         5150
>Category:       system
>Synopsis:       It should be possible to use NIS master map for the automounter
>Confidential:   yes
>Severity:       non-critical
>Priority:       medium
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 07 08:00:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Raimo Niskanen
>Release:        OpenBSD 3.9, unpatched
>Organization:
net
>Environment:
       
        System      : OpenBSD 3.9
        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
        It is not possible to use a NIS map as master map for
        the 4.4 BSD automounter (amd) without tweaking /etc/rc.
        The master map has to be supplied on the command line to amd,
        and /etc/rc does `cat ${amd_master}` at the end of the
        command line.
>How-To-Repeat:
       
>Fix:
        E.g by changing the amd startup in /etc/rc to:

if [ X"${amd}" = X"YES" -a -x ${amd_master} ]; then
        echo -n ' amd'
        (cd /etc/amd; amd -l syslog -x error,noinfo,nostats -p \
            -a ${amd_dir} `${amd_master}` > /var/run/amd.pid )
fi

        i.e using a script for master map file, and changing
        /etc/amd/master.sample to:

#! /bin/cat
/home amd.home

        Then anyone that wants to use a NIS master map can create
        /etc/amd/master as:

#! /bin/sh
cat <<-EOF
        -r
        `ypcat -k amd.master`
EOF

        The `-r' flag is unrelated but it is nice to still be able
        to have extra command line flags in /etc/amd/master.
       
        There are of course numerous other good solutons, but
        getting the output from `ypcat -k $MASTERMAP` onto
        the amd startup command line is essential.


>Release-Note:
>Audit-Trail:
>Unformatted: