一、root权限编辑/etc/rc.d/rc.local

su 
cd /etc/rc.d/  
vi rc.local

二、在这个文件加上你要执行的脚本,全部内容如下:

#!/bin/sh  
#  
# This script will be executed *after* all the other init scripts.  
# You can put your own initialization stuff in here if you don't  
# want to do the full Sys V style init stuff.  
    
touch /var/lock/subsys/local 
mount //192.168.0.3/data2-1 /mnt/data2-1 -o username=un,password=123  
mount //192.168.0.3/data2-2 /mnt/data2-2 -o username=un,password=123  
mount //192.168.0.3/data2-3 /mnt/data2-3 -o username=un,password=123  
mount //192.168.0.3/data2-4 /mnt/data2-4 -o username=un,password=123  
mount //192.168.0.3/data2-5 /mnt/data2-4 -o username=un,password=123

 

相关文章:

  • 2022-12-23
  • 2021-07-13
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-03-08
  • 2022-01-12
猜你喜欢
  • 2021-09-12
  • 2021-11-20
  • 2022-12-23
  • 2021-11-23
  • 2022-01-09
  • 2021-12-28
相关资源
相似解决方案