操作系统:CentOS-5.2
目
标:开机自动挂载局域网中windows的共享目录
一、root权限编辑/etc/rc.d/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
另外复习一个VI编辑命令-拷贝
yy
p
三、虽然搞定,还是补充一下