Debian Codegraph @

scripts/bin/get-assigned-hn-by-ip

raw symbols SCIP
1 #!/bin/bash
2 # Author: Steven Shiau <steven _at_ clonezilla org>
3 # License: GPL
4 # Description: To get the hostname by IP address assigend in /etc/drbl/client-ip-hostname
5
6 #
7 IP=$1
8 [ -z "$IP" ] && exit 1
9 if [ -f /etc/drbl/client-ip-hostname ]; then
10 LC_ALL=C grep -iEw "^[[:space:]]*${IP}" /etc/drbl/client-ip-hostname | awk -F" " '{print $2}'
11 fi