Commit d6958b33 by wangtingwei

fix自动挂载

1 parent 192bbef3
Showing with 6 additions and 6 deletions
#!/bin/bash
#王庭威
#2020/1/7
local_ip=192.168.137.200
local_ip=192.168.1.93
nfs_disk=
data_disk=/dev/sdb
data_disk=/dev/sdi
data_mount_path=/data
##################################################不常改变的变量##############################
repo_ip=192.168.1.145
repo_host=apt.offline.com
end_ip=`echo $repo_ip |awk -F "." '{print $4}'`
end_ip=`echo $local_ip |awk -F "." '{print $4}'`
##################################################基础函数###################################3
base() {
echo "##################设置修改内网apt源############################################"
......@@ -43,10 +43,10 @@ mkdir $data_mount_path
echo "#########################挂载数据盘到挂载点#########################"
mount ${data_disk}1 $data_mount_path
echo "##########################根据UUID设置自动挂载######################"
uuid=`blkid |grep {data_disk}1 |awk -F '"' '{print $2}'`
uuid=`blkid |grep ${data_disk}1 |awk -F '"' '{print $2}'`
echo "uuid值为$uuid"
echo "{data_disk}1"
echo "UUID\=$uuid $data_mount_path ext4 defaults 0 0" >>/etc/fstab
echo "${data_disk}1"
echo "UUID=$uuid $data_mount_path ext4 defaults 0 0" >>/etc/fstab
}
#########################################上层函数##################################
cpu() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!