diff --git a/tests/p_autofs/0-install_autofs.sh b/tests/p_autofs/0-install_autofs.sh index 5b9f34e..0f748b6 100755 --- a/tests/p_autofs/0-install_autofs.sh +++ b/tests/p_autofs/0-install_autofs.sh @@ -1,15 +1,15 @@ #!/bin/bash # Author: Christoph Galuschka -t_Log "Running $0 - Installing required packages" +t_Log 'Running $0 - Installing required packages' t_InstallPackage autofs nfs-utils rpcbind -t_Log "Preparing NFS-Share and starting NFS-Server" -cat '/var/lib/ 127.0.0.1(ro)' > /etc/exports +t_Log 'Preparing NFS-Share and starting NFS-Server' +echo '/var/lib/ 127.0.0.1(ro)' >> /etc/exports t_ServiceControl rpcbind restart t_ServiceControl nfs restart -t_Log "verify if NFs is mountable" +t_Log 'verify if NFs is mountable' mount -t nfs 127.0.0.1:/var/lib /mnt ls -al /mnt | grep -q yum diff --git a/tests/p_autofs/10-autofs-nfs-mount.sh b/tests/p_autofs/10-autofs-nfs-mount.sh index 5f93fc9..395eab1 100755 --- a/tests/p_autofs/10-autofs-nfs-mount.sh +++ b/tests/p_autofs/10-autofs-nfs-mount.sh @@ -1,12 +1,12 @@ #!/bin/sh # Author: Christoph Galuschka -t_Log "Running $0 - autofs can mount nfs share test." +t_Log 'Running $0 - autofs can mount nfs share test.' t_Log 'Preparing autofs configuration' cp -a /etc/auto.master /etc/auto.master_orig -cat '/autofs /etc/auto.autofs' >> /etc/auto.master -cat 'nfs -fstype=nfs 127.0.0.1:/var/lib' > /etc/auto.autofs +echo '/autofs /etc/auto.autofs' >> /etc/auto.master +echo 'nfs -fstype=nfs 127.0.0.1:/var/lib' > /etc/auto.autofs t_ServiceControl autofs start @@ -14,3 +14,8 @@ t_Log 'Running test' grep yum /autofs/nfs/ #t_CheckExitStatus $ret_val + +# return everything to previous state +cp -a /etc/auto.master_orig /etc/auto.master +rm -rf /etc/auto.autofs +cat /dev/null > /etc/exports