Debian Codegraph @

scripts/bin/fqdn-etc-host.sh

raw symbols SCIP
1 #!/bin/bash
2 # Author: Steven Shiau <steven _at_ clonezilla org>
3 # License: GPL
4
5 # Load DRBL setting and functions
6 DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}"
7
8 . $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
9
10 #
11 eth_wan_port="$1"
12 [ -z "$eth_wan_port" ] && exit 1
13 eth_wan_ip="$(drbl-get-ipadd $eth_wan_port)"
14
15 # authough RH-like hostname will give FQDN name, but it is not in Debian.
16 hostnm="$(hostname | cut -d"." -f1)"
17 dnsdomainnm="$(dnsdomainname)"
18 fqdn="$hostnm.$dnsdomainnm"
19 echo "$eth_wan_ip $fqdn $hostnm"