```python:/usr/local/sbin/writehostid
#!/usr/bin/env python3
from struct import pack
import argparse
import ipaddress
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file', type=str, required=False, help='Path to hostid file', default="/etc/hostid")
parser.add_argument("ipv4addr", help="IPv4 Address")
args = parser.parse_args()
hostid = pack("I",int(ipaddress.IPv4Address(args.ipv4addr)))
open(args.file,"wb").write(hostid)
```

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.tokyo/users/h12o/statuses/115631947057330083 on your instance and quote it. (Note that quoting is not supported in Mastodon.)