Blame tests/p_autofs/10-autofs-nfs-mount.sh
|
Christoph Galuschka |
8366ce |
#!/bin/sh
|
|
Christoph Galuschka |
8366ce |
# Author: Christoph Galuschka <tigalch@tigalch.org>
|
|
|
40b4c8 |
if [ $CONTAINERTEST -eq 1 ]; then
|
|
Adam Saleh |
9d8d96 |
echo "Skipping this test ..."
|
|
Adam Saleh |
9d8d96 |
else
|
|
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 |
|
|
Pablo Greco |
a2aa89 |
ls -al /autofs/nfs | egrep -q '(dnf|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
|
|
Pablo Greco |
a2aa89 |
t_ServiceControl nfs-server stop
|
|
Christoph Galuschka |
19ed8b |
t_ServiceControl rpcbind stop
|
|
Adam Saleh |
9d8d96 |
fi
|