13 lines
406 B
Bash
Executable File
13 lines
406 B
Bash
Executable File
#!/bin/bash
|
|
# FILE: wgapi:back/lib/ns/update/rev_ipv6
|
|
# DESCRIPTION: Returns the rDNS reversed version of an IPv6 address
|
|
# USAGE: rev_ipv6 ...
|
|
# OUTPUT: ...ip6.arpa
|
|
# ERRORS:
|
|
# 3: Bad usage
|
|
# 4: Calculation failed
|
|
|
|
# TODO: Do this in bash or whatever and remove the ipv6calc from dependencies
|
|
[ ${#} -eq 1 ] || exit 3
|
|
ipv6calc --out 'revnibbles.arpa' --in 'ipv6addr' "${1}" || exit 4
|