| 1 | #!/bin/bashscip-shell filesystem . . `/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 | [scip-shell system . . `[`. -z "$IP" ] && exit 1 |
| 9 | if [scip-shell system . . `[`. -f /etc/drbl/client-ip-hostnamescip-shell filesystem . . `/etc/drbl/client-ip-hostname`. ]; then |
| 10 | LC_ALL=C grepscip-shell system . . grep. -iEw "^[[:space:]]*${IP}" /etc/drbl/client-ip-hostnamescip-shell filesystem . . `/etc/drbl/client-ip-hostname`. | awkscip-shell system . . awk. -F" " '{print $2}' |
| 11 | fi |