Blame tests/p_autofs/0-install_autofs.sh

Christoph Galuschka 8366ce
#!/bin/bash
Christoph Galuschka 8366ce
# Author: Christoph Galuschka <tigalch@tigalch.org>
Christoph Galuschka 8366ce
Christoph Galuschka 42352a
t_Log "Running $0 - Installing required packages"
a73551
a73551
if [ "$centos_ver" = "5" ] ; then
a73551
   t_InstallPackage autofs nfs-utils portmap
a73551
else
a73551
   t_InstallPackage autofs nfs-utils rpcbind 
a73551
fi
a73551
Christoph Galuschka 8366ce
Christoph Galuschka f15a77
t_Log 'Preparing NFS-Share and starting NFS-Server'
Christoph Galuschka f15a77
echo '/var/lib/ 127.0.0.1(ro)' >> /etc/exports
a73551
a73551
if [ "$centos_ver" = "5" ] ; then
a73551
   t_ServiceControl portmap restart
a73551
   t_ServiceControl nfs restart
Pablo Greco a2aa89
elif [ "$centos_ver" -ge 8 ] ; then
Pablo Greco a2aa89
   t_ServiceControl rpcbind restart
Pablo Greco a2aa89
   t_ServiceControl nfs-server restart
a73551
else
a73551
   t_ServiceControl rpcbind restart
a73551
   t_ServiceControl nfs restart
a73551
fi
a73551
Christoph Galuschka 8366ce
Christoph Galuschka 42352a
t_Log 'verify if NFS is mountable'
Christoph Galuschka 8366ce
mount -t nfs 127.0.0.1:/var/lib /mnt
Pablo Greco a2aa89
ls -al /mnt | egrep -q '(dnf|yum)'
Christoph Galuschka 8366ce
Christoph Galuschka 8366ce
t_CheckExitStatus $?
Christoph Galuschka 8366ce
umount /mnt