Skip to content
Snippets Groups Projects
Commit d353ba97 authored by Philippe Caseiro's avatar Philippe Caseiro
Browse files

Managing resolv.conf at pre-template stage

parent 7f103c95
No related branches found
No related tags found
1 merge request!7Managing resolv.conf at pre-template stage
#!/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
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment