Debian Codegraph @

scripts/bin/fqdn-etc-host.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/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 [scip-shell system . . `[`. -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="$(hostnamescip-shell system . . hostname. | cutscip-shell system . . cut. -d"." -f1)"
17 dnsdomainnm="$(dnsdomainnamescip-shell system . . dnsdomainname.)"
18 fqdn="$hostnm.$dnsdomainnm"
19 echoscip-shell system . . echo. "$eth_wan_ip $fqdn $hostnm"