红联Linux门户
Linux帮助

请教版主一个棘手的debian开机自动运行命令的问题

发布时间:2010-10-06 07:10:05来源:红联作者:green6
版主好!各位好!以下是我增加的在rc.local的内容
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo "testtestestesttestestesttestestesttestestesttestes"
echo "testtestestesttestestesttestestesttestestesttestes"
echo "testtestestesttestestesttestestesttestestesttestes"
echo "testtestestesttestestesttestestesttestestesttestes"
echo "testtestestesttestestesttestestesttestestesttestes"
echo "testtestestesttestestesttestestesttestestesttestes"
#cd /root
if `mount -t cifs -o username=administrator,password=asdf-123 //192.168.222.242/share /root/testmount` ;then
echo "the mount is ok!!!!"
else
echo "nonononoon!!"
fi
exit 0

我的目的是使每次开机后都自动mount上我的windows 共享文件夹,我在shell 命令行直接执行是可以的。但是自动启动就是出现以下错误提示,请版主和高手指点,谢谢!
错误提示:
【40.48951】 CIFS VFS : Error connecting ot Ipv4 sockcet. Aborting operation
[40.785288] CIFS VFS : cifs_mount failed w/return code =101
mount: Network is unreachable
文章评论

共有 2 条评论

  1. 太平桥 于 2010-10-06 12:17:38发表:

    要看报在哪里的,可能网络还没启动。

  2. 绿色圣光 于 2010-10-06 12:15:30发表:

    引用:
    Network is unreachable
    网络……