我有下面的代码.. while read copy
do
cp -v $copy | tee -a $LOGFILE
echo $?
if [[ $? -ne 0 ]]
then
echo "Error copying files. Exiting ..." | tee -a $LOGFILE
exit 1
fi
d
得到错误我已经加入到我的rc.local文件中 #wait until the internet connection is ready
wget -q --tries=10 --timeout=20 -O - http://google.com > /dev/null
while [ $? -ne 0 ]; do
printf "Waiting for internet conn
这里是我的整个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