|
|
自习写的一个小脚本 automount
内容如下:
mount --bind /mnt/ftp2/ftp2/gandankunlun /mnt/ftp1/gandankunlun
mount --bind /mnt/ftp2/ftp2/qita /mnt/ftp1/qita
mount --bind /mnt/ftp2/ftp2/uploadfromforum /mnt/ftp1/uploadfromforum
mount --bind /mnt/ftp2/ftp2/deutschstudy /mnt/ftp1/deutschstudy
mount --bind /mnt/ftp2/ftp2/music /mnt/ftp1/music
mount --bind /mnt/ftp2/ftp2/software /mnt/ftp1/software
mount --bind /mnt/ftp2/ftp2/Veranstaltungsfoto /mnt/ftp1/Veranstaltungsfoto
如何让这个脚本在开机的时候自启动。
我把这个脚本改成
#!/bin/bash
if [ "$1" = "start" ]
then
mount --bind /mnt/ftp2/ftp2/gandankunlun /mnt/ftp1/gandankunlun
mount --bind /mnt/ftp2/ftp2/qita /mnt/ftp1/qita
mount --bind /mnt/ftp2/ftp2/uploadfromforum /mnt/ftp1/uploadfromforum
mount --bind /mnt/ftp2/ftp2/deutschstudy /mnt/ftp1/deutschstudy
mount --bind /mnt/ftp2/ftp2/music /mnt/ftp1/music
mount --bind /mnt/ftp2/ftp2/software /mnt/ftp1/software
mount --bind /mnt/ftp2/ftp2/Veranstaltungsfoto /mnt/ftp1/Veranstaltungsfoto
fi
然后,拷贝到/etc/init.d/automount
接下来,在/etc/rc5.d/中创建链接 S20automount --------->/etc/init.d/automount
重启系统后发现根本没有效果。
不知道错在哪里,还有没有其他的好方法。 |
|