toolkit/func/core/pkg_nfs/10-prepare-nfs-ro.sh

17 lines
422 B
Bash
Raw Permalink Normal View History

2021-07-05 06:50:25 +00:00
#!/bin/bash
r_log "nfs" "Setup (ro) NFS share"
mkdir -p /export/rotest
touch /export/rotest/nfsfile
echo '/export/rotest/ 127.0.0.1(ro)' >> /etc/exports
/usr/sbin/exportfs -ar
m_serviceCycler rpcbind restart
m_serviceCycler nfs-server restart
r_log "nfs" "Mount NFS share"
mount -t nfs 127.0.0.1:/export/rotest /mnt
2021-07-06 20:16:01 +00:00
find /mnt | grep -q "nfsfile"
2021-07-05 06:50:25 +00:00
r_checkExitStatus $?
umount /mnt
/usr/bin/sed -i '/rotest/d' /etc/exports