#!/bin/bash
#Program:
# This program is used to samba configuration.
#History:
# 2012/05/03 guobo first relase
read -p "Please input the command(y:mount;n:umount): " yn
if [ "$yn" == "y" ] || [ "$yn" == "Y" ];then
service smb start
smbclient -L //192.168.1.101 -U Administrator
mount -t cifs //192.168.1.101/guobo-share /mnt/samba
fi
if [ "$yn" == "n" ] || [ "$yn" == "N" ];then
umount /mnt/samba
#Program:
# This program is used to samba configuration.
#History:
# 2012/05/03 guobo first relase
read -p "Please input the command(y:mount;n:umount): " yn
if [ "$yn" == "y" ] || [ "$yn" == "Y" ];then
service smb start
smbclient -L //192.168.1.101 -U Administrator
mount -t cifs //192.168.1.101/guobo-share /mnt/samba
fi
if [ "$yn" == "n" ] || [ "$yn" == "N" ];then
umount /mnt/samba
fi
注:if [ ] == 等符号,都需要空格隔开。