[FS#1155] sysupgrade always backups changed files in /etc, regardless of option flag

LEDE Bugs lede-bugs at lists.infradead.org
Tue Nov 7 02:23:52 PST 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Koen Vandeputte (xback) 

Attached to Project - LEDE Project
Summary - sysupgrade always backups changed files in /etc, regardless of option flag
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - - Latest trunk


Synopsis:

sysupgrade contains an option (-c) to preserve all changed files in /etc/
When deleting all files in /lib/upgrade/keep.d, one would expect all changed files to be overwritten, unless option -c is provided.

When not providing this option, sysupgrade still saves these.

The script seems to run "opkg list-changed-conffiles" to fetch a list if changed files, which it should only do if option "-c" is provided


Reproduction:

- alter a file in /etc  (ex:  add  some comment lines in /etc/rc.local )
- reboot
- wipe all files in /lib/upgrade/keep.d
- run "sysupgrade -l" which shows all files that will be backupped.  (there should be none!)
* Output will show /etc/rc.local will be saved .. which it should not do as -c is not provided
- Run the actual upgrade
* after flashing, the added comment lines will still be present in /etc/rc.local ..





[ Node 3 | node-3 ] rm -f /lib/upgrade/keep.d/*
[ Node 3 | node-3 ] sysupgrade -l
/etc/config/dhcp
/etc/config/dropbear
/etc/dropbear/dropbear_rsa_host_key
/etc/group
/etc/hosts
/etc/inittab
/etc/iproute2/rt_tables
/etc/passwd
/etc/profile
/etc/rc.local
/etc/shadow
/etc/shells
/etc/sudoers



More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=1155



More information about the lede-bugs mailing list