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

Koen Vandeputte koen.vandeputte at ncentric.com
Fri Nov 17 00:56:59 PST 2017



On 2017-11-17 02:07, Luiz Angelo Daros de Luca wrote:
> 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
>
<snip>

Hi,

Did you also account that some of the files will still be backupped 
(even when unchanged) as they are also referenced here? :

[ Casino BB | node-10 ] cd /lib/upgrade/keep.d/
[ Casino BB | node-10 ] ls
base-files            netdata               sudo
base-files-essential  openvpn               uboot-envtools
dbus                  opkg
isc-dhcp-server-ipv4  ppp
[ Casino BB | node-10 ] cat *
/etc/config/
/etc/config/network
/etc/config/system
/etc/crontabs/
/etc/dropbear/
/etc/profile.d
/etc/sysctl.d/
# Essential files that will be always kept
/etc/hosts
/etc/inittab
/etc/group
/etc/passwd
/etc/profile
/etc/shadow
/etc/shells
/etc/sysctl.conf
/etc/rc.local
/etc/dbus-1/session.conf
/etc/dbus-1/system.conf
/etc/dhcpd.conf
/etc/netdata/
/etc/openvpn/
/etc/opkg/keys/
/etc/ppp/ip-down
/etc/ppp/ip-up
/etc/ppp/ipv6-down
/etc/ppp/ipv6-up
/etc/sudoers.d/
/etc/config/ubootenv
/etc/fw_env.config
[ Casino BB | node-10 ]


Only "sysupgrade -n" will change this behaviour, but in that case, 
*nothing* is saved at all.

Koen



More information about the Lede-dev mailing list