Issue resolving hosts by name

Weird. I hate to say it but I'd nuke it all & start over. It ain't much but here's something handy to help save states as you build up a clean config:

#!/bin/sh

HOST="$(uci show system.@system[0].hostname | cut -d "'" -f '2')"
DOMAIN="$(uci show dhcp.@dnsmasq[0].domain | cut -d "'" -f '2')"
timestamp="$(env TZ=UTC date +'%Y%m%dT%H%M%Z')"

sysupgrade --create-backup /tmp/backup-"${HOST}"."${DOMAIN}"-"${timestamp}".tar.gz

exit 0

Throw that into a script file & run it as a check point any time you need it. It'll output a tarball in /tmp/ for you to pull down via SFTP (opkg update && opkg install openssh-server). You can always restore via LuCI -> System -> Backup/flash firmware (LuCI is found under System -> Advanced Settings).

1 Like