GeekVisit / uproot

A tool to migrate static leases between routers
134 stars 0 forks source link

README.md - OpenWRT Export Description Incorrect #1

Closed preikschat closed 2 years ago

preikschat commented 2 years ago

Great software!

Using the example REAME.md writeup to export & convert the static leases for an OpenWRT router caused the utility to exit abnormally with error messages.

Incorrect syntax: _grep -hnr -A3 "config host" /etc/config/dhcp > staticleases.openwrt

Suggest to change this to: _cat /etc/config/dhcp > staticleases.openwrt

GeekVisit commented 2 years ago

Thank you. I will see if I can duplicate.

GeekVisit commented 2 years ago

It works for me but on my VM I am using an image which probably has more packages than most bare metal installs of OpenWrt and may be more recent. I think it has to do with the version of busybox that is packaged with the OpenWrt router. I believe grep is either included in busybox or can be installed as a separate package.

In any event, the step is actually unnecessary as uprt can extract the leases from /etc/config/dhcp without relying on grep so a user can actually just download dhcp and use it as the source file directly (which is why your cat command works).

IMO it is preferable to delete the non-lease related configurations but it is unnecessary.

I have revised the documentation and just committed that change. Thanks!