[LEDE-DEV] [PATCH] base-files: do not backup unchanged files

Luiz Angelo Daros de Luca luizluca at gmail.com
Thu Nov 16 17:07:22 PST 2017


After applied, the list of files in backup in a fresh installation change from:

root at LEDE:~# sysupgrade  -l
/etc/config/dhcp
/etc/config/dropbear
/etc/config/firewall
/etc/config/network
/etc/config/system
/etc/dropbear/dropbear_rsa_host_key
/etc/group
/etc/hosts
/etc/inittab
/etc/opkg/keys/5151f69420c3f508
/etc/opkg/keys/603b85163caded45
/etc/opkg/keys/72a57f2191b211e0
/etc/opkg/keys/792d9d9b39f180dc
/etc/opkg/keys/9ef4694208102c43
/etc/opkg/keys/b5043e70f9a75cde
/etc/opkg/keys/dace9d4df16896bf
/etc/opkg/keys/dd6de0d06bbd3d85
/etc/passwd
/etc/profile
/etc/rc.local
/etc/shadow
/etc/shells
/etc/sysctl.conf
/etc/sysctl.d/local.conf

to:

root at LEDE:~# sysupgrade  -l
/etc/config/dhcp
/etc/config/firewall
/etc/config/network
/etc/config/system
/etc/dropbear/dropbear_rsa_host_key

This solves a problem that, on a upgrade, LEDE/OpenWrt always use
/etc/profile (and others) way back from the first
LEDE/OpenWrt installation, even if the user never touched those files.

Even files listed in "opkg list-changed-conffiles" might be skipped if
they are equal to /rom version. For example,
some packages (dnsmasq) add a new user/group, changing /etc/passwd. If
the changed /etc/passwd is in /rom (changes done while
building the image), it will not be in backup.

Regards,

---
     Luiz Angelo Daros de Luca, Me.
            luizluca at gmail.com



More information about the Lede-dev mailing list