472a3b70d8
As before, cifs-utils gating tests don't do anything tests. Now add simple tests. Such as mount/umount cifs. Signed-off-by: Xiaoli Feng <xifeng@redhat.com>
25 lines
580 B
Bash
Executable File
25 lines
580 B
Bash
Executable File
#!/usr/bin/bash
|
|
set -x
|
|
CIFS_SHARE=$PWD/cifs-share
|
|
CIFS_MNT=$PWD/cifs-mnt
|
|
mount.cifs -V
|
|
cp /etc/samba/smb.conf /etc/samba/smb.conf.bark
|
|
cat << __EOF__ >/etc/samba/smb.conf
|
|
[cifs]
|
|
path=$CIFS_SHARE
|
|
writeable=yes
|
|
__EOF__
|
|
|
|
testparm -s
|
|
mkdir -p $CIFS_SHARE $CIFS_MNT
|
|
chcon -t samba_share_t $CIFS_SHARE
|
|
setsebool -P samba_export_all_rw on
|
|
echo -e "redhat\nredhat" | smbpasswd -a root -s
|
|
systemctl start smb
|
|
sleep 5
|
|
mount //localhost/cifs $CIFS_MNT -o user=root,password=redhat
|
|
ls -l $CIFS_MNT
|
|
umount $CIFS_MNT
|
|
cp /etc/samba/smb.conf.bark /etc/samba/smb.conf
|
|
rm -rf $CIFS_SHARE $CIFS_MNT
|