bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_autofs/10-autofs-nfs-mount.sh

Christoph Galuschka 8366ce
#!/bin/sh
Christoph Galuschka 8366ce
# Author: Christoph Galuschka <tigalch@tigalch.org>
Christoph Galuschka 8366ce
Christoph Galuschka 42352a
t_Log "Running $0 - autofs can mount nfs share test."
Christoph Galuschka 8366ce
Christoph Galuschka 8366ce
t_Log 'Preparing autofs configuration'
Christoph Galuschka 8366ce
cp -a /etc/auto.master /etc/auto.master_orig
Christoph Galuschka f15a77
echo '/autofs /etc/auto.autofs' >> /etc/auto.master
Christoph Galuschka f15a77
echo 'nfs -fstype=nfs 127.0.0.1:/var/lib' > /etc/auto.autofs
Christoph Galuschka 8366ce
Christoph Galuschka 19ed8b
t_ServiceControl autofs restart
Christoph Galuschka 8366ce
Christoph Galuschka 19ed8b
t_Log 'Running test - accessing /var/lib via autofs'
Christoph Galuschka 8366ce
Christoph Galuschka 19ed8b
ls -al /autofs/nfs | grep -q yum
Christoph Galuschka 19ed8b
t_CheckExitStatus $?
Christoph Galuschka f15a77
Christoph Galuschka f15a77
# return everything to previous state
Christoph Galuschka f15a77
cp -a /etc/auto.master_orig /etc/auto.master
Christoph Galuschka f15a77
rm -rf /etc/auto.autofs
Christoph Galuschka f15a77
cat /dev/null > /etc/exports
Christoph Galuschka 19ed8b
t_ServiceControl autofs stop
Christoph Galuschka 19ed8b
t_ServiceControl nfs stop
Christoph Galuschka 19ed8b
t_ServiceControl rpcbind stop