projects
/
live-boot-grml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update standards version to 4.5.0, no changes needed.
[live-boot-grml.git]
/
components
/
9990-networking.sh
diff --git
a/components/9990-networking.sh
b/components/9990-networking.sh
index
88bad20
..
92c66ee
100755
(executable)
--- a/
components/9990-networking.sh
+++ b/
components/9990-networking.sh
@@
-133,6
+133,12
@@
do_netsetup ()
HWADDR="$(cat "/sys/class/net/${interface}/address")"
fi
HWADDR="$(cat "/sys/class/net/${interface}/address")"
fi
+ if [ ! -e "/etc/hostname" ] && [ -n "${HOSTNAME}" ]
+ then
+ echo "Creating /etc/hostname"
+ echo "${HOSTNAME}" > /etc/hostname
+ fi
+
# Only create /etc/hosts if FQDN is known (to let 'hostname -f' query
# this file). Otherwise DNS will be queried to determine the FQDN.
if [ ! -e "/etc/hosts" ] && [ -n "${DNSDOMAIN}" ]
# Only create /etc/hosts if FQDN is known (to let 'hostname -f' query
# this file). Otherwise DNS will be queried to determine the FQDN.
if [ ! -e "/etc/hosts" ] && [ -n "${DNSDOMAIN}" ]
@@
-156,7
+162,6
@@
EOF
if [ -n "${DNSDOMAIN}" ]
then
echo "domain ${DNSDOMAIN}" > /etc/resolv.conf
if [ -n "${DNSDOMAIN}" ]
then
echo "domain ${DNSDOMAIN}" > /etc/resolv.conf
- echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
fi
for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVERS}
fi
for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVERS}
@@
-166,6
+171,14
@@
EOF
echo "nameserver $i" >> /etc/resolv.conf
fi
done
echo "nameserver $i" >> /etc/resolv.conf
fi
done
+
+ if [ -n "${DOMAINSEARCH}" ]
+ then
+ echo "search ${DOMAINSEARCH}" >> /etc/resolv.conf
+ elif [ -n "${DNSDOMAIN}" ]
+ then
+ echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
+ fi
fi
# Check if we have a network device at all
fi
# Check if we have a network device at all