Newer
Older
#!/bin/sh
# /etc/resolv.conf needs to be a file
# if it's a link we copy the content of
# the link target into /etc/resolv.conf
manageResolvConf()
{
local source="/etc/resolv.conf"
local target=""
if [ -L "${source}" ]
then
target=$(readlink -f ${source})
rm /etc/resolv.conf
if [ -f ${taget} ]
then
cp ${target} ${source}
return ${?}
else
echo "${target} does not exits!"
return 1
fi
fi
}
manageResolvConf