34 |
addconfig "${value}" |
addconfig "${value}" |
35 |
hostname "${value}" |
hostname "${value}" |
36 |
|
|
37 |
|
# update hosts file |
38 |
|
CONFIG="/etc/hosts" |
39 |
|
clearconfig |
40 |
|
addconfig "127.0.0.1 localhost ${value}" |
41 |
|
# add ipv6 defaults |
42 |
|
addconfig "::1 ip6-localhost ip6-loopback" |
43 |
|
addconfig "fe00::0 ip6-localnet" |
44 |
|
addconfig "ff00::0 ip6-mcastprefix" |
45 |
|
addconfig "ff02::1 ip6-allnodes" |
46 |
|
addconfig "ff02::2 ip6-allrouters" |
47 |
|
addconfig "ff02::3 ip6-allhosts" |
48 |
|
|
49 |
# check for running x11 and recreate the xauth cookie with the correct hostname |
# check for running x11 and recreate the xauth cookie with the correct hostname |
50 |
if [[ ! -z $(pidof X) ]] |
if [[ ! -z $(pidof X) ]] |
51 |
then |
then |
128 |
{ |
{ |
129 |
local gw |
local gw |
130 |
gw=$(ip route | grep default | sed 's:.*via[[:space:]]\(.*\)[[:space:]]dev.*:\1:') |
gw=$(ip route | grep default | sed 's:.*via[[:space:]]\(.*\)[[:space:]]dev.*:\1:') |
131 |
echo "${gw}" |
rvecho "${gw}" |
132 |
} |
} |
133 |
|
|
134 |
set_network_gateway() |
set_network_gateway() |
168 |
dns=$(grep nameserver /etc/resolv.conf | sed 's:.*[[:space:]]\(.*\):\1:g') |
dns=$(grep nameserver /etc/resolv.conf | sed 's:.*[[:space:]]\(.*\):\1:g') |
169 |
for i in ${dns} |
for i in ${dns} |
170 |
do |
do |
171 |
echo "${i}" |
rvecho "${i}" |
172 |
done |
done |
173 |
} |
} |
174 |
|
|